[[email protected] data]# /usr/local/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/
WARNING: The host ‘WeiLei‘ 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...
181120 4:37:03 [ERROR] COLLATION ‘latin1_swedish_ci‘ is not valid for CHARACTER SET ‘utf8‘
181120 4:37:03 [ERROR] Aborting
181120 4:37:03 [Note] /usr/local/mysql//bin/mysqld: Shutdown complete
Installation of system tables failed! Examine the logs in
/usr/local/mysql/data/ for more information.
解决方案:
造成这种错误原因是在配置参数时utf8-general_ci写错了,应该是utf8_general_ci,
如果不想重新安装数据库那就在my.cnf文件中[mysqld]下面增加一行:
character_set_server=utf8
WARNING: The host 'WeiLei' could not be looked up with resolveip.
原文地址:https://www.cnblogs.com/Mr-Wei/p/10010148.html