2012-05-14 8 views
3

내가 얻을 시작되지 않습니다 : 내가 sudo를 사용할 때MySQL은 내가 MySQL을 시작하려고하면

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 

내가 얻을 : 나는 맥 OS X 10.7 함께 일하고

Starting MySQL 
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/Victorias-MacBook-Pro.local.pid). 

. homebrew를 통해 MySQL을 설치했고 MySQL 5.5.20을 설치했습니다.

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 
+1

mysql을 시작하려는 환경과 관련된 자세한 정보를 추가 할 수 있습니까? –

답변

4

아무것도 MySQL의 포트 3306을 수신하지 않습니다 확인, (추락되지 않은 프로세스를 종료) 모든 인스턴스가 중지되어 있는지 확인이 PID 파일을 제거

내가 점점 오전 .ERR 파일입니다 (netstat이 도움이 될 것입니다) MySQL을 다시 시작하십시오.

+1

같은 오류가 발생하지만, 어떤 pid 파일도 보이지 않습니다 .. – kibaekr

+0

실행중인 mysqld 프로세스를 손쉽게 죽일 수있는 방법은 활동 모니터로 가서 검색하고 Quit를 누르는 것입니다. 나를 위해 일했다. – wikichen