网络编程
位置:首页>> 网络编程>> 数据库>> 安装MySQL错误归档处理

安装MySQL错误归档处理

 来源:www.phpq.net 发布时间:2008-12-22 14:50:00 

标签:

今天我升级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

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

2、编码文件链接丢失。

[root@localhost mysql]# scripts/mysql_install_db --force

Installing MySQL system tables...

071129 13:38:08 [ERROR] Can't find messagefile '/usr/local/mysql/share/english/errmsg.sys'

071129 13:38:08 [ERROR] Aborting

071129 13:38:08 [Note]

Installation of system tables failed!

Examine the logs in /usr/local/mysql/data/ for more information.

You can try to start the mysqld daemon with:

/usr/local/mysql//bin/mysqld --skip-grant &

and use the command line tool

/usr/local/mysql//bin/mysql to connect to the mysql

database and look at the grant tables:

shell> /usr/local/mysql//bin/mysql -u root mysql

mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log

gives you a log in /usr/local/mysql/data/ that may be helpful.

The latest information about MySQL is available on the web at

http://www.mysql.com

Please consult the MySQL manual section: 'Problems running mysql_install_db',

and the manual section that describes problems on your OS.

Another information source is the MySQL email archive.

Please check all of the above before mailing us!

And if you do mail us, you MUST use the ./bin/mysqlbug script!

解决:

今天发现MYSQL官方5.1.22 对这个BUG进行了修正。

mysql_install_db could fail to find its message file. (Bug#30678)

[root@localhost mysql]# ln -s /usr/local/mysql/share/mysql/english/ /usr/local/mysql/share/english

[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

正常启动

[root@localhost mysql]# /usr/local/mysql/bin/mysqld_safe &

[1] 2680

[root@localhost mysql]# 071129 13:45:16 mysqld_safe Logging to '/usr/local/mysql/data//localhost.localdomain.err'.

/usr/local/mysql/bin/mysqld_safe: line 366: [: -eq: unary operator expected

071129 13:45:16 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data/

ps aux | grep mysql

root 2680 0.0 0.1 4684 1144 pts/0 S 13:45 0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe

nobody 2748 1.6 1.7 108948 16796 pts/0 Sl 13:45 0:00 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/ --user=nobody --log-error=/usr/local/mysql/data//localhost.localdomain.err --pid-file=/usr/local/mysql/data//localhost.localdomain.pid --socket=/tmp/mysql.sock --port=3306

root 2762 0.0 0.0 4120 668 pts/0 S+ 13:45 0:00 grep mysql

2、用 mysqldumpshow时遇到的错误:

[root@localhost bin]# mysqldumpslow

Can't determine basedir from 'my_print_defaults mysqld' output: --max-allowed-packet=100M

export PATH=$PATH:/usr/local/mysql/bin

就可以解决。

0
投稿

猜你喜欢

  • 在面向对象的编程中,很多语言都支持函数重载,能根据函数传递的不同个数、类型的参数来做不同的操作,JS对它却不支持,需要我们额外做些小动作。在
  • 很久没有跟其他人做重构思想方面的交流了,可能大家都觉得不太好意思讨论,特别是“分离”的思想这么基础的话题,拿出来说怕会被“笑话”。做为页面重
  • 经常看到说正则的文章,但说的只是方法,却很少有说以下几个基本概念:1.贪婪:+,*,?,{m,n}等默认是贪婪匹配,即尽可能多匹配,也叫最大
  • 兼容主流浏览器,独立样式表,可以很方便的进行视觉效果自定义截图:模拟下拉菜单演示代码:<!DOCTYPE html PUBLIC &q
  • 简单的说,组织体系指的就是组织信息的方式。看了一堆拗口的定义后,我根据自己的理解画了下面这个图:从上图看出,同样的图形元素由于采用了不同的组
  • 大家知道,在js里encodeURIComponent 方法是一个比较常用的编码方法,但因工作需要,在asp里需用到此方法,查了好多资料,没
  • 如何用POP3接收电子邮件?POP3大行其道,我看见朋友已经用Jmail和POP3接收邮件了。该如何做?以Jmail4.1为例,我们演示一下
  • 前言:项目的成就感来源于大家~~必须先感谢一切该感谢的人!(旁白:写了很多次设计实录分享,这次是最百感交集的一次,话多这习惯还大家海涵~嘻嘻
  • 3. 品味“决定”艺术作品的好坏,设计的好坏则来自主观意见我们在鉴赏艺术作品时,用看法来表达当时的感觉,而你的品味则会左右你的看法。以一个有
  • * 对子查询和Join进行了优化,包括对MyISAD和InnoB存储引擎分散范围内的批量索引访问。* 增加了 BACKUP DATABASE
  • 在我们开始一个项目的设计的时候,脑子里肯定有无数的构想。是做视觉冲击强烈、夺人眼球的绚丽风格?还是复古的拼贴风?又或者目前最in的极简主义设
  • 在网页中放iframe,如果frameborder=0;就没有边框显示了;但动态创建时,在IE7中就不行了,从网上找到解决的办法,写出来记录
  • 这是asp利用dictionary创建二维数组的例子,这样做的优点是:1、数组下标可以是字符串2、长度不是固定的<'% ’==
  • 这些导航菜单来自于Dribbble网站,出自于世界各地的优秀设计师之手,涵盖了各种不同的风格,个个都非常精美。这里我将这些导航菜单展示出来,
  • 这几天忙个合作,开发iPhone版校友录。用了很久的iPhone,为它量身定制一套页面还是头一次,好在限制不是很多,会写html基本呈现就不
  • Access数据库,同时操作大量记录(9500条以上)时报错。错误提示:Microsoft JET Database Engine 错误 &
  • 1.双击setup.exe.(出现安装向导界面) 2.在安装向导界面:选"基本安装",并选好主目录位置;创建启动数据库(
  • 在这个星期Doug Bowman离开谷歌的Twitter引发了很多激烈的讨论.在残酷的诚实邮件中,Doug Bowman援引谷歌”限制性的数
  • 和设计师打过交道的人一定也见到过少数极品,不是扎着小辫子留着小胡子,就是剃了光头抽根烟,通常说起来一套一套的人作品都很一般般,而作品一般般的
  • 比如 <div><img .../></div>想通过对这个div设置透明度来达到调整图片的透明度如果不
手机版 网络编程 asp之家 www.aspxhome.com