起初执行 /usr/bin/mysql_install_db --user=mysql --datadir=/var/lib/mysql/提示错误:
FATAL ERROR: Could not find mysqldThe following directories were searched: /usr/local/mysql//libexec
/usr/local/mysql//sbin
/usr/local/mysql//binIf you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.可是系统中已经没有/usr/local/mysql/ 目录了;
然后按照后边提示二进制安装的方法,指定了--basedir=/或--basedir=/usr 依然是这样的错误。这个问题该如何解决?
FATAL ERROR: Could not find mysqldThe following directories were searched: /usr/local/mysql//libexec
/usr/local/mysql//sbin
/usr/local/mysql//binIf you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.可是系统中已经没有/usr/local/mysql/ 目录了;
然后按照后边提示二进制安装的方法,指定了--basedir=/或--basedir=/usr 依然是这样的错误。这个问题该如何解决?
mysql_install_db 脚本的目的是生成新的MySQL授权表是升级mysql或者装二进制包的时候才需要
是这样的,以前用的是5.1.37的源码包的版本,现在希望用yum 安装5.1.67,但还用以前的数据表及各种配置,所以mysql_install_db 一下。其实我本来也不清楚要执行mysql_install_db 操作,但是新启动安装的版本时出错:
130221 15:09:21 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
130221 15:09:21 InnoDB: Initializing buffer pool, size = 8.0M
130221 15:09:21 InnoDB: Completed initialization of buffer pool
130221 15:09:21 InnoDB: Started; log sequence number 0 44233
130221 15:09:21 [ERROR] Aborting
导致启动失败,一开始按着错误提示执行/usr/bin/mysql_upgrade,执行的过程中提示了很多ok。但之后在启动依然出现“ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.”这个错误。
然后在网上查,有说需要执行mysql_install_db才行的,故而有此问。如果能够直接解决Can't open the mysql.plugin table的错误就更好了,先谢谢了
5.1.37在主从同步的binlog_format设置为statement时,会发生严重的错误,但由于主从表结构有些差异,又不能将binlog_format改为mixed或row。经过测试,5.1.67无此问题,升级更高的版本又怕驾驭不了,所以就想升级5.1.67。同时,以后要进行运营维护的新手又不怎么懂源码安装,所以倾向于yum直接安装。这正是麻烦之处!
+-------+-----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-----------+------+-----+---------+-------+
| name | char(64) | NO | PRI | | |
| dl | char(128) | NO | | | |
+-------+-----------+------+-----+---------+-------+
2 rows in set (0.00 sec)
为什么还提示Can't open the mysql.plugin table的错误?
-rw-rw----. 1 mysql mysql 8.4K 2月 8 2012 mysql/plugin.frm
-rw-rw----. 1 mysql mysql 0 2月 8 2012 mysql/plugin.MYD
-rw-rw----. 1 mysql mysql 1.0K 2月 8 2012 mysql/plugin.MYI
最后只能下载了个5.1.68源码包,源码安装的,yum实在按不上