# scripts/mysql_install_db --user=mysql Installing MySQL system tables... OK Filling help tables... OK
To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: ./bin/mysqladmin -u root password 'new-password' ./bin/mysqladmin -u root -h fs-cluster1 password 'new-password' See the manual for more instructions. You can start the MySQL daemon with: cd . ; ./bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl cd mysql-test ; perl mysql-test-run.pl
Please report any problems with the ./bin/mysqlbug script!
The latest information about MySQL is available on the web at
# bin/mysqld_safe --user=mysql & [1] 13502 # Starting mysqld daemon with databases from /usr/local/mysql-5.0.45-solaris8-sparc-64bit/data
注释:MySQL授权表中的账户开始没有密码。启动服务器后,应当设置密码。
八、其它设置
把/usr/local/mysql/bin放入环境变量PATH里。
直接登陆:
# mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.0.45 MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
修改密码:
# mysqladmin -u root password 'root'
修改密码后登陆方式:
# mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) # mysql -uroot -proot Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5 Server version: 5.0.45 MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
# mysqladmin -uroot -proot version mysqladmin Ver 8.41 Distrib 5.0.45, for sun-solaris2.8 on sparc Copyright (C) 2000-2006 MySQL AB This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license
Server version 5.0.45 Protocol version 10 Connection Localhost via UNIX socket UNIX socket /tmp/mysql.sock Uptime: 13 min 49 sec
Threads: 1 Questions: 9 Slow queries: 0 Opens: 12 Flush tables: 1 Open tables: 6 Queries per second avg: 0.011
关闭服务器:
# mysqladmin -uroot -proot shutdown
重启服务器:
# mysqld_safe --user=mysql & [1] 13583 # Starting mysqld daemon with databases from /usr/local/mysql/data