Troubleshooting of installing MySQL error archiving today when I upgraded MYSQL to MySQL 5.1. Write and share the following.
1,
[Root @ localhost mysql] # scripts/mysql_install_db
Neither host 'localhost. localdomain 'nor 'localhost' could be looked up
/Resolveip
Please configure the 'hostname' command to return a correct
Hostname.
If you want to solve this at a later stage, restart this script
With the -- force option
This is mainly used to modify the/etc/hosts file.
Echo "127.0.0.1 localhost. localdomain localhost">/etc/hosts
Then initialize the data. if the error persists, add the -- force switch.
This is what I met today.
[Root @ localhost mysql] # scripts/mysql_install_db -- force
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/local/mysql // bin/mysqladmin-u root password 'new-password'
/Usr/local/mysql // bin/mysqladmin-u root-h localhost. localdomain password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon:
Cd.;/usr/local/mysql // bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl