首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装MySQL -理解从MySQL返回的初始消息

安装MySQL -理解从MySQL返回的初始消息
EN

Server Fault用户
提问于 2013-06-28 11:43:01
回答 1查看 1.6K关注 0票数 0

在最初安装MySQL之后,它将在第一次启动守护进程时返回如下所示的消息。我正在努力更好地理解这一信息,并提出以下问题:

  1. 是什么原因导致有关主机的警告无法用解析查找?这是一个全新的安装CentOS6.4,然后是yum install mysql mysql-server。MySQL服务器版本为5.1.69源发行版。
  2. 为什么上面写着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在启动时启动。
  3. 为什么上面写着You can start the MySQL daemon with: cd /usr ; /usr/bin/mysqld_safe &。我想我想使用service mysqld start/etc/init.d/mysqld startmysqldmysqld_safe有什么不同?cd /usr ;的目的是什么?另外,&的目的是什么?
  4. 我试图使用MySQL测试mysql-test-run.pl守护进程,但我似乎没有/usr/mysql-test。有什么想法吗?

谢谢

代码语言:javascript
复制
[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]#
EN

回答 1

Server Fault用户

回答已采纳

发布于 2013-06-28 13:17:34

  1. 通常,这些警告与编译的二进制文件、兼容性和已安装的C库有关。CentOS 6.X附带了一个新的C库版本,它可能会对MySQL5.1.69这样的特定软件版本造成一些警告。
  2. mysql.server为您生成一个名为mysql.server的init脚本,基本上您必须使用正确的二进制代码,而不是安装源代码):sudo支持-file/mysql.server /etc/init.d/mysql chmod 755 /etc/init.d/mysql chkconfig -添加mysql chkconfig -level 235级别
  3. /usr/bin/mysqld_safe &脚本是运行mysql服务器的脚本。如果您查看mysql脚本,您将看到脚本负责向mysql_safe脚本传递正确的参数,以管理mysql数据库服务。当然,这些参数可以从my.cnf配置文件或使用命令行读取。此外,如果您遵循mysql安装建议,此时您应该能够像您在使用:/etc/init.d/mysqld {start|stop|restart}之前提到的那样启动服务。
  4. 对于这个问题,您只需检查mysql安装路径。如果您从mysql-XXXXX.tar.gz文件编译mysql,那么您将能够在mysql安装路径目录mysql-test上找到脚本。如果使用yum安装,则尝试使用mysqltest命令(通常在/usr/bin/mysqltest上)
票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/519300

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档