MySQL无法启动
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了MySQL无法启动,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含8093字,纯文字阅读大概需要12分钟。
内容图文
![MySQL无法启动](/upload/InfoBanner/zyjiaocheng/884/229ee3d79cb54bdb94b81f2b8c4c3417.jpg)
当我尝试启动MySQL时,我得到:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
当我使用sudo时,我得到:
Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/Victorias-MacBook-Pro.local.pid).
我正在使用Mac OS X 10.7.我通过自制软件安装了MySQL,并安装了MySQL 5.5.20.
这是我得到的.err文件:
120513 22:30:03 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
120513 22:30:03 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
/usr/local/Cellar/mysql/5.5.20/bin/mysqld: Table 'mysql.plugin' doesn't exist
120513 22:30:03 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
120513 22:30:03 InnoDB: The InnoDB memory heap is disabled
120513 22:30:03 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120513 22:30:03 InnoDB: Compressed tables use zlib 1.2.5
120513 22:30:03 InnoDB: Initializing buffer pool, size = 128.0M
120513 22:30:03 InnoDB: Completed initialization of buffer pool
120513 22:30:03 InnoDB: highest supported file format is Barracuda.
120513 22:30:03 InnoDB: Waiting for the background threads to start
120513 22:30:04 InnoDB: 1.1.8 started; log sequence number 1595675
120513 22:30:04 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
120513 22:30:04 mysqld_safe mysqld from pid file /usr/local/var/mysql/Victorias-MacBook-Pro.local.pid ended
120513 22:30:13 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
120513 22:30:13 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
/usr/local/Cellar/mysql/5.5.20/bin/mysqld: Table 'mysql.plugin' doesn't exist
120513 22:30:13 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
120513 22:30:13 InnoDB: The InnoDB memory heap is disabled
120513 22:30:13 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120513 22:30:13 InnoDB: Compressed tables use zlib 1.2.5
120513 22:30:13 InnoDB: Initializing buffer pool, size = 128.0M
120513 22:30:13 InnoDB: Completed initialization of buffer pool
120513 22:30:13 InnoDB: highest supported file format is Barracuda.
120513 22:30:13 InnoDB: Waiting for the background threads to start
120513 22:30:14 InnoDB: 1.1.8 started; log sequence number 1595675
120513 22:30:14 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
120513 22:30:14 mysqld_safe mysqld from pid file /usr/local/var/mysql/Victorias-MacBook-Pro.local.pid ended
120513 22:30:24 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
120513 22:30:24 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
/usr/local/Cellar/mysql/5.5.20/bin/mysqld: Table 'mysql.plugin' doesn't exist
120513 22:30:24 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
120513 22:30:24 InnoDB: The InnoDB memory heap is disabled
120513 22:30:24 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120513 22:30:24 InnoDB: Compressed tables use zlib 1.2.5
120513 22:30:24 InnoDB: Initializing buffer pool, size = 128.0M
120513 22:30:24 InnoDB: Completed initialization of buffer pool
120513 22:30:24 InnoDB: highest supported file format is Barracuda.
120513 22:30:24 InnoDB: Waiting for the background threads to start
120513 22:30:25 InnoDB: 1.1.8 started; log sequence number 1595675
120513 22:30:25 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
120513 22:30:25 mysqld_safe mysqld from pid file /usr/local/var/mysql/Victorias-MacBook-Pro.local.pid ended
120513 22:30:34 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
120513 22:30:34 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
/usr/local/Cellar/mysql/5.5.20/bin/mysqld: Table 'mysql.plugin' doesn't exist
120513 22:30:34 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
120513 22:30:34 InnoDB: The InnoDB memory heap is disabled
120513 22:30:34 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120513 22:30:34 InnoDB: Compressed tables use zlib 1.2.5
120513 22:30:34 InnoDB: Initializing buffer pool, size = 128.0M
120513 22:30:34 InnoDB: Completed initialization of buffer pool
120513 22:30:34 InnoDB: highest supported file format is Barracuda.
120513 22:30:34 InnoDB: Waiting for the background threads to start
120513 22:30:35 InnoDB: 1.1.8 started; log sequence number 1595675
120513 22:30:35 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
120513 22:30:35 mysqld_safe mysqld from pid file /usr/local/var/mysql/Victorias-MacBook-Pro.local.pid ended
120513 22:30:44 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
120513 22:30:44 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
/usr/local/Cellar/mysql/5.5.20/bin/mysqld: Table 'mysql.plugin' doesn't exist
120513 22:30:44 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
120513 22:30:44 InnoDB: The InnoDB memory heap is disabled
120513 22:30:44 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120513 22:30:44 InnoDB: Compressed tables use zlib 1.2.5
120513 22:30:44 InnoDB: Initializing buffer pool, size = 128.0M
120513 22:30:44 InnoDB: Completed initialization of buffer pool
120513 22:30:44 InnoDB: highest supported file format is Barracuda.
120513 22:30:44 InnoDB: Waiting for the background threads to start
120513 22:30:45 InnoDB: 1.1.8 started; log sequence number 1595675
120513 22:30:45 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
120513 22:30:45 mysqld_safe mysqld from pid file /usr/local/var/mysql/Victorias-MacBook-Pro.local.pid ended
120513 22:30:54 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
120513 22:30:54 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
/usr/local/Cellar/mysql/5.5.20/bin/mysqld: Table 'mysql.plugin' doesn't exist
120513 22:30:54 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
120513 22:30:54 InnoDB: The InnoDB memory heap is disabled
120513 22:30:54 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120513 22:30:54 InnoDB: Compressed tables use zlib 1.2.5
120513 22:30:54 InnoDB: Initializing buffer pool, size = 128.0M
120513 22:30:54 InnoDB: Completed initialization of buffer pool
120513 22:30:54 InnoDB: highest supported file format is Barracuda.
120513 22:30:54 InnoDB: Waiting for the background threads to start
120513 22:30:55 InnoDB: 1.1.8 started; log sequence number 1595675
120513 22:30:55 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
120513 22:30:55 mysqld_safe mysqld from pid file /usr/local/var/mysql/Victorias-MacBook-Pro.local.pid ended
120513 22:31:04 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
120513 22:31:04 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
/usr/local/Cellar/mysql/5.5.20/bin/mysqld: Table 'mysql.plugin' doesn't exist
120513 22:31:04 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
120513 22:31:04 InnoDB: The InnoDB memory heap is disabled
120513 22:31:04 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120513 22:31:04 InnoDB: Compressed tables use zlib 1.2.5
120513 22:31:04 InnoDB: Initializing buffer pool, size = 128.0M
120513 22:31:04 InnoDB: Completed initialization of buffer pool
120513 22:31:04 InnoDB: highest supported file format is Barracuda.
120513 22:31:04 InnoDB: Waiting for the background threads to start
解决方法:
删除此pid文件,确保所有实例均已停止(杀死所有未关闭的进程),检查是否没有监听MySQL端口3306(netstat应该有帮助),然后尝试再次启动MySQL.
内容总结
以上是互联网集市为您收集整理的MySQL无法启动全部内容,希望文章能够帮你解决MySQL无法启动所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。