Table 'mysql.plugin' doesn't exist

netxuning 2009-08-10 11:30:34
源代码安装5.1

./configure --prefix=/usr/local/mysql --with-extra-charsets=all --with-partition

安装完了后:
运行 /usr/local/mysql/bin/mysql_install_db --defaults-file=/usr/local/mysql/my.cnf --user=mysql

my.cnf 里datadir参数指定的路径内生成了两个数据库 mysql test,但是并没有任何数据表。

这时启动mysql
/usr/local/mysql/bin/mysqld_safe --defaults-file=/usr/local/mysql/my.cnf

没成功,查看日志存在如下错误:
/usr/local/mysql/libexec/mysqld: Table 'mysql.plugin' doesn't exist
090810 11:02:56 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
090810 11:02:56 [ERROR] /usr/local/mysql/libexec/mysqld: unknown option '--skip-innodb'
090810 11:02:56 [ERROR] Aborting


不知如何是好!
...全文
14775 21 打赏 收藏 转发到动态 举报
写回复
用AI写文章
21 条回复
切换为时间正序
请发表友善的回复…
发表回复
netxuning 2009-08-10
  • 打赏
  • 举报
回复
[Quote=引用 13 楼 vinsonshen 的回复:]
试下这个后再执行/usr/local/mysql/bin/mysql_install_db命令:

chown -R mysql.mysql /usr/local/mysql/data/
[/Quote]

试了,不过里边还是没东西!没生成相应的表!

chown -R mysql.mysql /usr/local/mysql/data/
ls /usr/local/mysql/data/ -l
总计 8
drwxrwxrwx 2 mysql mysql 4096 08-10 11:48 mysql
drwxrwxrwx 2 mysql mysql 4096 08-10 11:48 test

ls /usr/local/mysql/data/* -l
/usr/local/mysql/data/mysql:
总计 0

/usr/local/mysql/data/test:
总计 0
vinsonshen 2009-08-10
  • 打赏
  • 举报
回复
试下这个后再执行/usr/local/mysql/bin/mysql_install_db命令:

chown -R mysql.mysql /usr/local/mysql/data/
netxuning 2009-08-10
  • 打赏
  • 举报
回复
同样的版本,为什么在另一台服务器上安装很顺畅,没出这个问题!
netxuning 2009-08-10
  • 打赏
  • 举报
回复
[Quote=引用 9 楼 acmain_chm 的回复:]
把权限都加上 chmod 777
[/Quote]

chmod 0777 /usr/local/mysql/data/ -R
/usr/local/mysql/bin/mysql_install_db --defaults-file=/usr/local/mysql/my.cnf --user=mysql

可是 /usr/local/mysql/data/mysql/ 里还是没有表!
netxuning 2009-08-10
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 vinsonshen 的回复:]
你把data目录下的所有东西删除
把参数--defaults-file=/usr/local/mysql/my.cnf去掉,即改成下面的去试下看看:

/usr/local/mysql/bin/mysql_install_db --user=mysql

[/Quote]

不指定的话
这次连 /usr/local/mysql/data/这一层目录都没生成, 但我也不知道它生成到哪了!
ACMAIN_CHM 2009-08-10
  • 打赏
  • 举报
回复
把权限都加上 chmod 777
netxuning 2009-08-10
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 acmain_chm 的回复:]
/usr/local/mysql/data/mysql

看一下权限。
[/Quote]

[root@localhost ~]# ls -ld /usr/local/mysql/data/mysql
drwx------ 2 mysql root 4096 06-30 11:29 /usr/local/mysql/data/mysql
vinsonshen 2009-08-10
  • 打赏
  • 举报
回复
你把data目录下的所有东西删除
把参数--defaults-file=/usr/local/mysql/my.cnf去掉,即改成下面的去试下看看:

/usr/local/mysql/bin/mysql_install_db --user=mysql
ACMAIN_CHM 2009-08-10
  • 打赏
  • 举报
回复
/usr/local/mysql/data/mysql

看一下权限。
netxuning 2009-08-10
  • 打赏
  • 举报
回复
设置好这个my.cnf后我便运行 /usr/local/mysql/bin/mysql_install_db --defaults-file=/usr/local/mysql/my.cnf --user=mysql

运行后,/usr/local/mysql/data/ 出现了 mysql test两个目录,但里边都没有表!
netxuning 2009-08-10
  • 打赏
  • 举报
回复
my.cnf中几个基本选项:

basedir=/usr/local/mysql
datadir=/usr/local/mysql/data/
user=mysql
language=/usr/local/mysql/share/mysql/english
tmpdir=/tmp
log-error=/var/log/mysqld.log
port = 3307
socket = /tmp/mysql.sock
netxuning 2009-08-10
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 acmain_chm 的回复:]
ll /usr/local/mysql/data/mysql

看一下这些表是否存在?
[/Quote]

不存在!
ACMAIN_CHM 2009-08-10
  • 打赏
  • 举报
回复
ll /usr/local/mysql/data/mysql

看一下这些表是否存在?
netxuning 2009-08-10
  • 打赏
  • 举报
回复
我设置的安装路径 datadir=/usr/local/mysql/data/

归属 mysql:root 0700 用root运行的 mysql_install_db
觉得权限应该没有问题啊!
whalefish2001 2009-08-10
  • 打赏
  • 举报
回复
只不过 information_schema 库并不形成一个单独的文件夹。
whalefish2001 2009-08-10
  • 打赏
  • 举报
回复
my.cnf 里datadir参数指定的路径内生成了两个数据库 mysql test,但是并没有任何数据表?
果真如此?mysql库里面不可能没有表和数据的。另外,还要有 information_schema 数据库吧。
你还是再安装一次吧。
netxuning 2009-08-10
  • 打赏
  • 举报
回复
问题解决了,我系统中已经存在一个mysqld正在运行,并且占用了端口3306!

我本想将新编译的例程端口设为3307,仅仅设置了[client]段中的port参数,忘了设置[mysqld]段的!

应该是这个问题,我的系统里现在运行着两个mysql!
netxuning 2009-08-10
  • 打赏
  • 举报
回复
运行 /usr/local/mysql/bin/mysql_install_db --defaults-file=/usr/local/mysql/my.cnf --user=mysql
后的结果:



/usr/local/mysql/libexec/mysqld: ignoring option '--character-set-client-handshake' due to invalid value 'gb2312'

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:

shell> /usr/local/mysql/libexec/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 are the
MySQL email archives available at http://lists.mysql.com/.

Please check all of the above before mailing us! And remember, if
you do mail us, you MUST use the /usr/local/mysql/scripts/mysqlbug script!
懒得去死 2009-08-10
  • 打赏
  • 举报
回复
my.cnf 里datadir参数指定的路径内生成了两个数据库 mysql test,但是并没有任何数据表。

这就是问题所在。
netxuning 2009-08-10
  • 打赏
  • 举报
回复
[Quote=引用 15 楼 acmain_chm 的回复:]
父目录一级有没有给权限?

/usr/local/mysql/data/
/usr/local/mysql
/usr/local
[/Quote]

全改成mysql:mysql 0777了
加载更多回复(1)

56,677

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧