Installing MySQL error archiving _ MySQL

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.