shell> groupadd mysql(不要变这个名字)
shell> useradd -g mysql mysql(不要变这个名字)
shell> tar zxvf mysql-VERSION.tar.gz
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql --with-charset=gb2312
shell> make
shell> make install
shell> scripts/mysql_install_db
shell> chown -R root /usr/local/mysql
shell> chown -R mysql /usr/local/mysql/var
shell> chgrp -R mysql /usr/local/mysql
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> /usr/local/mysql/bin/mysqld_safe --user=mysql &
这样进入:
shell> cd /use/local/mysql/bin
shell> ./mysql -u root -p(我也不知道问什么要加个./)
enter password:回车就OK了
开机自动加载MySQL
/usr/local/mysql/share/mysql/mysql.server复制到/etc/init.d
shell>chkconfig –add mysql.server使MySQL在开机时自动运行
|
|