在最初安装MySQL之后,它将在第一次启动守护进程时返回如下所示的消息。我正在努力更好地理解这一信息,并提出以下问题:
yum install mysql mysql-server。MySQL服务器版本为5.1.69源发行版。To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system?我以为我想做chkconfig --levels 235 mysqld on来使MySQL在启动时启动。You can start the MySQL daemon with: cd /usr ; /usr/bin/mysqld_safe &。我想我想使用service mysqld start或/etc/init.d/mysqld start。mysqld和mysqld_safe有什么不同?cd /usr ;的目的是什么?另外,&的目的是什么?mysql-test-run.pl守护进程,但我似乎没有/usr/mysql-test。有什么想法吗?谢谢
[root@localhost Michael]# service mysqld start
Initializing MySQL database: WARNING: The host 'localhost.mysite.com' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
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:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h localhost.mysite.com password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/bin/mysqlbug script!
[ OK ]
Starting mysqld: [ OK ]
[root@localhost Michael]#发布于 2013-06-28 13:17:34
/usr/bin/mysqld_safe &脚本是运行mysql服务器的脚本。如果您查看mysql脚本,您将看到脚本负责向mysql_safe脚本传递正确的参数,以管理mysql数据库服务。当然,这些参数可以从my.cnf配置文件或使用命令行读取。此外,如果您遵循mysql安装建议,此时您应该能够像您在使用:/etc/init.d/mysqld {start|stop|restart}之前提到的那样启动服务。mysql-XXXXX.tar.gz文件编译mysql,那么您将能够在mysql安装路径目录mysql-test上找到脚本。如果使用yum安装,则尝试使用mysqltest命令(通常在/usr/bin/mysqltest上)https://serverfault.com/questions/519300
复制相似问题