代碼:
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> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
./bin/mysqladmin -u root
password "yourpasswd"
代碼:
# mysql -u root -prootroot
Welcome to the MySQL monitor.
Commands end with ; or \g.
Your MySQL connection id is 10
to server version: 4.0.23-standard
Type 'help;' or '\h' for help. Type
'\c' to clear the buffer.