Install MySQL in Linux system, initial session failed, error message is as follows:
Warning:the host ' Power1 ' could not being looked up with RESOLVEIP. This probably means that your libc libraries is not the Compatiblewith this binary MySQL version. The MySQL daemon, mysqld, should worknormally with the exception that host name resolving won't work. This means the should use IP addresses instead of Hostnameswhen specifying MySQL privileges!
1. From the error message, the database is unable to resolve the machine name, the troubleshooting process is as follows:
Use RESOLVEIP to see if the IP is healthy
[[email protected] ~]#/usr/local/mysql/bin/resolveip power1/usr/local/mysql/bin/resolveip:unable to find HostID for ' Power1 ': Host not Found
2. View the machine name
[Email protected] ~]# HostnamePower1
3. View/etc/hosts file
[Email protected] ~]# cat/etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
Query results can be seen in/etc/hosts no corresponding machine name Power1
Add IP (native IP) to the machine corresponding to the/etc/hosts, which is clearly as follows:
[Email protected] ~]# cat/etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.20.131 Power1
4. Use RESOLVEIP to confirm if OK
[Email protected] ~]#/usr/local/mysql/bin/resolveip Power1ip address of Power1 is 192.168.20.131
5. Re-initialize
Cause analysis of MySQL initialization failure under Linux installation