安装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
就可以解决。


猜你喜欢
- 学了几天终于大概明白pytorch怎么用了这个是直接搬运的官方文档的代码之后会自己试着实现其他nlp的任务# Author: Robert
- 核心导出作业的 代码 和 作业备份是相似的 代码如下:alter PROC DumpJob (@job VARCHAR(100)
- 简单的说,在vue中我们使用模板HTML语法组建页面的,使用render函数我们可以用js语言来构建DOM因为vue是虚拟DOM,所以在拿到
- 八九年前,我在公司做设计,当时就已经做到技术总监,Photoshop是自学的,当时觉得全世界比我Photoshop强的人也不在多数。七年前,
- 简介:Python下有许多款不同的 Web 框架。Django是重量级选手中最有代表性的一位。许多成功的网站和APP都基于Django。Dj
- 一、ADO.Net数据库连接字符串1、OdbcConnection(System.Data.Odbc)(1)SQL Sever标准安全:&q
- 关于Event:mysql5.1版本开始引进event概念。event既“时间触发器”,与triggers的事件触发不同,event类似与l
- Python中的is和==比较两个对象的两种方法在Python中有两种方式比较两个对象是否相等,分别是is和==,两者之间是不同的==比较的
- 使用pip安装Django时报错,先是:C:\Users\admin>pip install django Collecting dj
- SQL2005增加了4个关于队计算的函数:分别是ROW_NUMBER,RANK,DENSE_RANK,NTILE. 注意:这些函数
- modelform是model衍生出来的form .modelform的用法非常死.首先在models.py里创建模型表.所有的form组件
- 前言和Word、Excel承载数据的能力相比,PPT的应用重点在于表演。比如一场发布会、一场演说、一次产品展示、一次客户沟通&hel
- 介绍使用subprocess模块的目的是用于替换os.system等一些旧的模块和方法。运行python的时候,我们都是在创建并运行一个进程
- MySQL连接查询相信大家都有所了解,连接查询是在数据库查询操作的时候经常用到的,下面就为您介绍MySQL连接查询mysql连接
- 一、模块概述模块指的是包含python代码的文件,也就是一个.py文件就是一个模块。文件夹(directory)---->包(pack
- 检测自己当前系统环境中python是否已经安装该module,若未安装请自行安装检测自己的pycharm使用的环境变量是否与当前环境一致若不
- 本文实例为大家分享了Python实现简单层次聚类算法,以及可视化,供大家参考,具体内容如下基本的算法思路就是:把当前组间距离最小的两组合并成
- 应用一:有时候我们想把一个 list 或者 dict 传递给 javascript,处理后显示到网页上,比如要用 js 进行可视化的数据。请
- C# 连接oracle数据库常用的三种方法有三种:一、Oracle.ManagedDataAccess.dll:Oracle官方提供的ora
- 问题描述  最近需要给程序新增功能,用于将旧格式的数据转换为新格式,同时删除旧格式的数据(新旧格式的数据