
mysql启动错误
13121216:08:06mysqld_safeStartingmysqlddaemonwithdatabasesfrom/var/lib/mysql13121216:...
131212 16:08:06 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
131212 16:08:06 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist
131212 16:08:06 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
131212 16:08:06 InnoDB: The InnoDB memory heap is disabled
131212 16:08:06 InnoDB: Mutexes and rw_locks use GCC atomic builtins
131212 16:08:06 InnoDB: Compressed tables use zlib 1.2.3
131212 16:08:06 InnoDB: Using Linux native AIO
131212 16:08:06 InnoDB: Initializing buffer pool, size = 128.0M
131212 16:08:06 InnoDB: Completed initialization of buffer pool
131212 16:08:06 InnoDB: highest supported file format is Barracuda.
131212 16:08:06 InnoDB: Waiting for the background threads to start
131212 16:08:07 InnoDB: 5.5.35 started; log sequence number 1595675
131212 16:08:07 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
131212 16:08:07 [Note] - '0.0.0.0' resolves to '0.0.0.0';
131212 16:08:07 [Note] Server socket created on IP: '0.0.0.0'.
131212 16:08:07 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
131212 16:08:07 mysqld_safe mysqld from pid file /var/lib/mysql/AY131113092135791b62Z.pid ended
~
~ 展开
131212 16:08:06 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist
131212 16:08:06 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
131212 16:08:06 InnoDB: The InnoDB memory heap is disabled
131212 16:08:06 InnoDB: Mutexes and rw_locks use GCC atomic builtins
131212 16:08:06 InnoDB: Compressed tables use zlib 1.2.3
131212 16:08:06 InnoDB: Using Linux native AIO
131212 16:08:06 InnoDB: Initializing buffer pool, size = 128.0M
131212 16:08:06 InnoDB: Completed initialization of buffer pool
131212 16:08:06 InnoDB: highest supported file format is Barracuda.
131212 16:08:06 InnoDB: Waiting for the background threads to start
131212 16:08:07 InnoDB: 5.5.35 started; log sequence number 1595675
131212 16:08:07 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
131212 16:08:07 [Note] - '0.0.0.0' resolves to '0.0.0.0';
131212 16:08:07 [Note] Server socket created on IP: '0.0.0.0'.
131212 16:08:07 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
131212 16:08:07 mysqld_safe mysqld from pid file /var/lib/mysql/AY131113092135791b62Z.pid ended
~
~ 展开
展开全部
开源社区的解决办法,有效。https://www.oschina.net/question/1244397_2138435 。
我的错误是data文件下,文件类型为“ERR文件”里'FEDERATED' is disabled. Table 'mysql.plugin' doesn't exist。(无法启动mysql服务) 然后按照上面 生成随机密码,初始化数据库。网上找了很多解决方法,csdn,百度知道,stackoverflow等等 ,都没有很好的效果。但是上面这个解决了我无法启动mysql服务的问题。很感谢Tuesday大师的回答!
我的错误是data文件下,文件类型为“ERR文件”里'FEDERATED' is disabled. Table 'mysql.plugin' doesn't exist。(无法启动mysql服务) 然后按照上面 生成随机密码,初始化数据库。网上找了很多解决方法,csdn,百度知道,stackoverflow等等 ,都没有很好的效果。但是上面这个解决了我无法启动mysql服务的问题。很感谢Tuesday大师的回答!
展开全部
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\Administrator>cd /d "C:\Program Files\MySQL\MySQL Server 5.7\bin"
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqld -install
Service successfully installed.
C:\Program Files\MySQL\MySQL Server 5.7\bin>net start mysql
MySQL 服务正在启动 ..
MySQL 服务无法启动。
服务没有报告任何错误。
请键入 NET HELPMSG 3534 以获得更多的帮助。
/*查看windows日志是因为
Fatal error:
Can't open and lock privilege tables: Table 'mysql.user' doesn't exist */
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysql -u root -p
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqld --initialize --user=mysql --console
2017-12-25T14:47:42.131665Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timesta
mp server option (see documentation for more details).
2017-12-25T14:47:42.147265Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2017-12-25T14:47:42.163865Z 0 [ERROR] Aborting
//将data文件夹里的文件全部清空后,再执行命令
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqld --initialize --user=mysql --console
2017-12-25T14:48:30.765017Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timesta
mp server option (see documentation for more details).
2017-12-25T14:48:41.833846Z 0 [Warning] InnoDB: New log files created, LSN=45790
2017-12-25T14:48:43.839051Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2017-12-25T14:48:44.512253Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has
been started. Generating a new UUID: b4b8e0ab-e982-11e7-b303-00ff2ee04b9c.
2017-12-25T14:48:44.605854Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2017-12-25T14:48:55.834683Z 1 [Note] A temporary password is generated for root@localhost: Xg2huGprf*C&
//这个Xg2huGprf*C&密码等会儿要用。
C:\Program Files\MySQL\MySQL Server 5.7\bin>
C:\Program Files\MySQL\MySQL Server 5.7\bin>net start mysql
MySQL 服务正在启动 ...
MySQL 服务已经启动成功。
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysql -u root -p
Enter password: ************
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.18
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> set password=password('root')
->
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\Administrator>cd /d "C:\Program Files\MySQL\MySQL Server 5.7\bin"
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqld -install
Service successfully installed.
C:\Program Files\MySQL\MySQL Server 5.7\bin>net start mysql
MySQL 服务正在启动 ..
MySQL 服务无法启动。
服务没有报告任何错误。
请键入 NET HELPMSG 3534 以获得更多的帮助。
/*查看windows日志是因为
Fatal error:
Can't open and lock privilege tables: Table 'mysql.user' doesn't exist */
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysql -u root -p
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqld --initialize --user=mysql --console
2017-12-25T14:47:42.131665Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timesta
mp server option (see documentation for more details).
2017-12-25T14:47:42.147265Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2017-12-25T14:47:42.163865Z 0 [ERROR] Aborting
//将data文件夹里的文件全部清空后,再执行命令
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqld --initialize --user=mysql --console
2017-12-25T14:48:30.765017Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timesta
mp server option (see documentation for more details).
2017-12-25T14:48:41.833846Z 0 [Warning] InnoDB: New log files created, LSN=45790
2017-12-25T14:48:43.839051Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2017-12-25T14:48:44.512253Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has
been started. Generating a new UUID: b4b8e0ab-e982-11e7-b303-00ff2ee04b9c.
2017-12-25T14:48:44.605854Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2017-12-25T14:48:55.834683Z 1 [Note] A temporary password is generated for root@localhost: Xg2huGprf*C&
//这个Xg2huGprf*C&密码等会儿要用。
C:\Program Files\MySQL\MySQL Server 5.7\bin>
C:\Program Files\MySQL\MySQL Server 5.7\bin>net start mysql
MySQL 服务正在启动 ...
MySQL 服务已经启动成功。
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysql -u root -p
Enter password: ************
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.18
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> set password=password('root')
->
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
mysql_install_db --user=mysql 初始化数据库即可 百度下:怎么初始化数据库
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
datadir目录的权限设置的不对。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |