安装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

这样就成功初始化数据了。

 

责任编辑:迎迎 来源: 电脑初学网
相关推荐

2016-09-07 20:28:17

MySQL存储数据库

2011-03-22 10:10:21

CentOSNagios安装

2010-05-27 13:48:21

MySQL安装

2010-04-02 15:25:40

云归档

2024-03-27 08:18:02

Spring映射HTML

2021-01-28 13:16:27

Python编程语言

2021-01-14 21:37:01

JavaScript开发代码

2021-04-14 07:08:14

Nodejs错误处理

2023-10-28 16:30:19

Golang开发

2023-11-30 07:15:36

GolangRecover

2009-08-05 16:04:50

2010-07-27 15:39:32

telnet smtp

2010-06-01 16:14:04

2021-04-29 09:02:44

语言Go 处理

2010-10-20 17:37:23

SQL Server连

2014-11-17 10:05:12

Go语言

2009-12-28 09:58:52

ADO操作

2022-11-16 08:41:43

2017-04-17 10:05:51

Hadoop错误方式

2022-07-27 13:06:50

MySQL数据库命令
点赞
收藏

51CTO技术栈公众号