Today, when I upgraded MySQL to 5.1, I met. Write to share the following.
1,
[Root@localhost mysql]# scripts/mysql_install_db
Neither host ' localhost.localdomain ' nor ' localhost ' could is looked up with
/resolveip
Please configure the ' hostname ' command to return a correct
Hostname.
If you are want to solve this in a later stage, restart this script
With the--force option
This is mainly to modify the/etc/hosts file
echo "127.0.0.1 localhost.localdomain localhost" >> /etc/hosts
Then initialize the data, and if it's the same error, add the--force switch directly.
That's the situation 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 and 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 did 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 '
The manual for more instructions.
Can start the MySQL daemon with:
Cd. ; /usr/local/mysql//bin/mysqld_safe &
Can test the MySQL daemon with mysql-test-run.pl
CD mysql-test; Perl mysql-test-run.pl
Please have a problems with the/bin/mysqlbug script!
The latest information about the MySQL is available on the Web at
Http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
This will successfully initialize the data.