1、数据初始化-主机名解析错误
系统-Red Hat Enterprise Linux Server release 6.6
软件-源码安装mysql-5.6.27.tar.gz
环境-Linux rhel6.myexample.com 2.6.32-504.el6.x86_64 #1 SMP Tue Sep 16 01:56:35 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
报错:WARNING
[root@rhel6 mysql]# scripts/mysql_install_db --user=mysql
WARNING: The host 'rhel6.myexample.com' could not be looked up with ./bin/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 !
原因:主机名解析错误。
解决:hosts文件中添加如下内容,ok!
[root@rhel6 mysql]# vi /etc/hosts
192.168.56.20 rhel6.myexample.com
总结:
因为lib库不是很兼容当前MySQL版本。在主机名解析不起作用的情况下,会引起MySQL守护进程、mysqld工作异常,因此在MySQL中授权时需要使用IP地址,而不能使用主机名。
(不解决该问题,依然可以正确执行scripts/mysql_install_db数据库初始化脚本。)
2、数据初始化-时间戳问题
系统-Red Hat Enterprise Linux Server release 6.6
软件-源码安装mysql-5.6.27.tar.gz
环境-Linux rhel6.myexample.com 2.6.32-504.el6.x86_64 #1 SMP Tue Sep 16 01:56:35 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
报错:Warning
[root@rhel6 mysql]# scripts/mysql_install_db --user=mysql
Installing MySQL system tables...2015-11-04 07:46:37 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).