mysql-5.1.40-linux-i686-glibc23.tar.gz安装笔记
mysql-5.1.40-linux-i686-glibc23.tar.gz安装笔记
1.首先添加mysql用户组
?
6、运行MySQL
#bin/mysqld_safe –user=mysql &
(如果没有问题的话,应该会出现类似这样的提示:
[1] 42264
# Starting mysqld daemon with databases from /usr/local/mysql/var
如果出现 mysql ended这样的语句,表示Mysql没有正常启动,你可以到log中查找问题,Log文件的通常在/etc/my.cnf中配置。
大多数问题是权限设置不正确引起的。 )
?
7、设置root密码。默认安装密码为空,为了安全你需要修改密码
#/usr/local/mysql/bin/mysqladmin -uroot password yourpassword
?
8、拷贝编译目录的一个脚本,设置开机自动启动
#cp support-files/mysql.server /etc/rc.d/init.d/mysqld
#chmod 700 /etc/init.d/mysqld
#chkconfig –add mysqld
#chkconfig –level 345 mysqld on
?
9、启动mysqld服务
#service mysqld start
?
10、查看3306端口是否打开。要注意在防火墙中开放该端口
#netstat -atln
?
免安装版/二进制版安装基本命令概述:
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /PATH/TO/MYSQL-VERSION-OS.tar.gz | tar xvf -
shell> ln -s FULL-PATH-TO-MYSQL-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db –user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe –user=mysql &
###############################################