程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> MYSQL數據庫 >> MYSQL入門知識 >> 安裝MySQL錯誤歸檔處理

安裝MySQL錯誤歸檔處理

編輯:MYSQL入門知識
 

今天我升級MYSQL到5.1的時候遇到的。寫出來共享以下,供大家參考。

1、

[root@localhost mysql]# scripts/mysql_install_db

Neither host 'localhost.localdomain' nor 'localhost' could be looked up with

/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

這個主要是修改/etc/hosts文件

echo "127.0.0.1 localhost.localdomain localhost" >> /etc/hosts

然後再初始化數據,如果還是同樣的錯誤,那就直接加--force開關。

我今天碰到的就是這個情況。

[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 with:

cd . ; /usr/local/mysql//bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

cd mysql-test ; perl mysql-test-run.pl

Please report any problems with the ./bin/mysqlbug script!

The latest information about MySQL is available on the web at

http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

這樣就成功初始化數據了。

 
  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved