免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5998 | 回复: 1
打印 上一主题 下一主题

启动mysql错误 [复制链接]

论坛徽章:
3
天秤座
日期:2014-10-29 11:37:572015元宵节徽章
日期:2015-03-06 15:50:39NBA常规赛纪念章
日期:2015-05-04 22:32:03
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-09-02 13:29 |只看该作者 |倒序浏览
本帖最后由 tomer 于 2013-09-02 13:40 编辑

/usr/local/mysql/bin/mysqld_safe ./etc/my.cnf &
[1] 30449
[root@MYSQL1 mysql]# sed: -e expression #1, char 11: unknown option to `s'
130902 13:38:27 mysqld_safe Logging to '/usr/local/mysql/data//MYSQL1.err'.
130902 13:38:27 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data/
130902 13:38:29 mysqld_safe mysqld from pid file /usr/local/mysql/data//MYSQL1.pid ended

[1]+  Done                    /usr/local/mysql/bin/mysqld_safe ./etc/my.cnf

#cat /usr/local/mysql/data//MYSQL1.err

130902 13:38:27 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data/
2013-09-02 13:38:28 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2013-09-02 13:38:28 30670 [Note] Plugin 'FEDERATED' is disabled.
/usr/local/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
2013-09-02 13:38:28 30670 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2013-09-02 13:38:28 30670 [Note] InnoDB: The InnoDB memory heap is disabled
2013-09-02 13:38:28 30670 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2013-09-02 13:38:28 30670 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-09-02 13:38:28 30670 [Note] InnoDB: Using Linux native AIO
2013-09-02 13:38:28 30670 [Note] InnoDB: Using CPU crc32 instructions
2013-09-02 13:38:28 30670 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2013-09-02 13:38:28 30670 [Note] InnoDB: Completed initialization of buffer pool
2013-09-02 13:38:28 30670 [Note] InnoDB: Highest supported file format is Barracuda.
2013-09-02 13:38:28 30670 [Note] InnoDB: The log sequence numbers 0 and 0 in ibdata files do not match the log sequence number 1600677 in the ib_logfiles!
2013-09-02 13:38:28 30670 [Note] InnoDB: Database was not shutdown normally!
2013-09-02 13:38:28 30670 [Note] InnoDB: Starting crash recovery.
2013-09-02 13:38:28 30670 [Note] InnoDB: Reading tablespace information from the .ibd files...
2013-09-02 13:38:28 30670 [Note] InnoDB: Restoring possible half-written data pages
2013-09-02 13:38:28 30670 [Note] InnoDB: from the doublewrite buffer...
2013-09-02 13:38:28 30670 [Note] InnoDB: 128 rollback segment(s) are active.
2013-09-02 13:38:28 30670 [Note] InnoDB: Waiting for purge to start
2013-09-02 13:38:28 30670 [Note] InnoDB: 5.6.11 started; log sequence number 1600677
2013-09-02 13:38:28 30670 [Note] NDB: Changed global value of binlog_format from STATEMENT to MIXED
2013-09-02 13:38:28 30670 [Note] NDB: NodeID is 3, management server '192.168.7.81:1186'
2013-09-02 13:38:29 30670 [Note] NDB[0]: NodeID: 3, all storage nodes connected
2013-09-02 13:38:29 30670 [Warning] NDB: server id set to zero - changes logged to bin log with server id zero will be logged with another server id by slave mysqlds
2013-09-02 13:38:29 30670 [Note] Starting Cluster Binlog Thread
2013-09-02 13:38:29 30670 [Note] Server hostname (bind-address): '*'; port: 3306
2013-09-02 13:38:29 30670 [Note] IPv6 is available.
2013-09-02 13:38:29 30670 [Note]   - '::' resolves to '::';
2013-09-02 13:38:29 30670 [Note] Server socket created on IP: '::'.
2013-09-02 13:38:29 30670 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
130902 13:38:29 mysqld_safe mysqld from pid file /usr/local/mysql/data//MYSQL1.pid ended
~

论坛徽章:
0
2 [报告]
发表于 2013-09-02 14:58 |只看该作者
2013-09-02 13:38:29 30670 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist

从这里可以看到,是没有mysql.user权限表导致的。。希望你先看下mysql库里是否有表。可以通过以下方式来解决此问题:

1、重新初始化mysql库  mysql_install_db(拷贝同版本mysql库,过来复制)  重新mysql服务
2、如果仅仅是缺少user表的话,复制一个user表过来即可

在操作之前,一定要注意备份现有数据,防止丢失数据。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP