关于mysql的问题!
我第一次使用mysql!我安装mysql后!
用了下面两个命令:
# scripts/mysql_install_db
Installing all prepared tables
040615 14:38:14/usr/local/libexec/mysqld: Shutdown Complete
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:
/usr/local/bin/mysqladmin -u root password 'new-password'
/usr/local/bin/mysqladmin -u root -h dove password 'new-password'
See the manual for more instructions.
NOTE:If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/local/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!
You can start the MySQL daemon with:
cd /usr/local ; /usr/local/bin/mysqld_safe &
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests
Please report any problems with the /usr/local/bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com
# /usr/local/bin/mysqladmin -u root password 'new-password'
/usr/local/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
这是怎么回事! 需要先启动 mysql 服务,一般为 /usr/local/libexec/mysqld & 不行啊!
错误如下:
#/usr/local/libexec/mysqld &
922
Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
040615 15:30:28Aborting
040615 15:30:28/usr/local/libexec/mysqld: Shutdown Complete
+Exit 1 /usr/local/libexec/mysqld
Please read "Security" section of the manual to find out how to run mysqld as root!
看来 MySQL 为了安全,不允许以 root 身份运行 mysqld 。
看看 INSTALL 文件吧,里面有详细的安装方法~~~~
页:
[1]