iis服务器助手广告
返回顶部
首页 > 资讯 > 数据库 >Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
  • 337
分享到

Can't open and lock privilege tables: Table 'mysql.user' doesn't exist

2024-04-02 19:04:59 337人浏览 安东尼
摘要

[root@szq scripts]# service Mysqld start Starting mysql..The server quit without updating PID file

[root@szq scripts]# service Mysqld start
Starting mysql..The server quit without updating PID file (/var/lib/mysql/szq.pid).[FaiLED]

# more  /prosync/mysql/mysql/data/szq.err 
查看报错:
160413 04:46:40 mysqld_safe Starting mysqld daemon with databases from /prosync/mysql/mysql/data
2016-04-13 04:46:40 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-04-13 04:46:40 0 [Note] /prosync/mysql/mysql/bin/mysqld (mysqld 5.6.30) starting as process 29379 ...
2016-04-13 04:46:40 29379 [Note] Plugin 'FEDERATED' is disabled.
/prosync/mysql/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
2016-04-13 04:46:40 29379 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2016-04-13 04:46:40 29379 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-04-13 04:46:40 29379 [Note] InnoDB: The InnoDB memory heap is disabled
......
2016-04-13 04:46:41 29379 [Note]   - '::' resolves to '::';
2016-04-13 04:46:41 29379 [Note] Server Socket created on IP: '::'.
2016-04-13 04:46:41 29379 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
160413 04:46:41 mysqld_safe mysqld from pid file /prosync/mysql/mysql/data/szq.pid ended
160413 04:49:43 mysqld_safe Starting mysqld daemon with databases from /prosync/mysql/mysql/data
......
/prosync/mysql/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
2016-04-13 04:49:43 29528 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2016-04-13 04:49:43 29528 [Note] InnoDB: Using atomics to ref count buffer pool pages
......
2016-04-13 04:49:43 29528 [Note] Server socket created on IP: '::'.
2016-04-13 04:49:43 29528 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
160413 04:49:43 mysqld_safe mysqld from pid file /prosync/mysql/mysql/data/szq.pid ended

解决办法:
#查看当前的my.cnf配置文件
[root@szq scripts]# more /etc/my.cnf |grep -v ^#

[mysqld]
basedir =/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
old_passWords=1

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

#由于编译安装时指定的路径为/prosync/mysql/mysql/,mysql_install_db时指定的datadir为/prosync/mysql/mysql/data,而my.cnf为缺省的路径
#因此修改datadir至正确路径后,问题解决
[root@szq scripts]# vi /etc/my.cnf
[root@szq support-files]# more /etc/my.cnf |grep datadir
basedir = /prosync/mysql/mysql
datadir = /prosync/mysql/data

[root@szq kdb11]# service mysql start 
Warning: World-writable config file '/prosync/mysql/mysql/my.cnf' is ignored
Starting MySQL. SUCCESS! 
您可能感兴趣的文档:

--结束END--

本文标题: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist

本文链接: https://www.lsjlt.com/news/46500.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作