2011-02-27 2 views
2

나는 나의 Mac에서 MySQL 버전 5.5.9을 설치하고 나는이 명령을 사용하여 시작하려고 :MySQL은 5.5.9 늘 시작

sudo /usr/local/mysql/support-files/mysql.server start 

MySQL은이 명령으로 시작되지 않았습니다. 나는 데이터 디렉토리에 localhost.err 파일을 확인하고이 같았다 :

110227 22:51:14 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data 
110227 22:51:14 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive 
110227 22:51:14 [Note] Plugin 'FEDERATED' is disabled. 
/usr/local/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist 
110227 22:51:14 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. 
110227 22:51:14 InnoDB: The InnoDB memory heap is disabled 
110227 22:51:14 InnoDB: Mutexes and rw_locks use GCC atomic builtins 
110227 22:51:14 InnoDB: Compressed tables use zlib 1.2.3 
110227 22:51:14 InnoDB: Initializing buffer pool, size = 128.0M 
110227 22:51:14 InnoDB: Completed initialization of buffer pool 
110227 22:51:14 InnoDB: Log file ./ib_logfile0 did not exist: new to be created 
InnoDB: Setting log file ./ib_logfile0 size to 5 MB 
InnoDB: Database physically writes the file full: wait... 
110227 22:51:14 InnoDB: Log file ./ib_logfile1 did not exist: new to be created 
InnoDB: Setting log file ./ib_logfile1 size to 5 MB 
InnoDB: Database physically writes the file full: wait... 
110227 22:51:15 InnoDB: highest supported file format is Barracuda. 
InnoDB: The log sequence number in ibdata files does not match 
InnoDB: the log sequence number in the ib_logfiles! 
110227 22:51:15 InnoDB: Database was not shut down normally! 
InnoDB: Starting crash recovery. 
InnoDB: Reading tablespace information from the .ibd files... 
InnoDB: Restoring possible half-written data pages from the doublewrite 
InnoDB: buffer... 
110227 22:51:15 InnoDB: Waiting for the background threads to start 
110227 22:51:16 InnoDB: 1.1.5 started; log sequence number 1595916 
110227 22:51:16 [ERROR] /usr/local/mysql/bin/mysqld: unknown option '--skip-locking' 
110227 22:51:16 [ERROR] Aborting 

110227 22:51:16 InnoDB: Starting shutdown... 
110227 22:51:16 InnoDB: Shutdown completed; log sequence number 1595916 
110227 22:51:16 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete 

110227 22:51:16 mysqld_safe mysqld from pid file /usr/local/mysql/data/localhost.pid ended 

내가 두 ib_log 파일을 삭제, 난의 my.cnf 파일을 변경하고 난 아무것도 없어.

+0

는'를 사용하여 시도 되세요 + + g'을 Finder에서 가져 와서 전화 한 파일이 실제로 있는지 확인하십시오. – Dawson

+0

Finder에서 Unix 실행 파일을 찾을 수 있으면 터미널을 연 다음 Finder에서 실행 파일을 두 번 클릭하면됩니다. 이렇게하면 실제로 어떤 파일이 실제로 작동하는지와 올바른 경로가 표시됩니다. – Dawson

+0

해결 방법을 찾으셨습니까? 나는 똑같은 문제를 안고있다. – highBandWidth

답변

1

1) 터미널에서 명령 실행 : 존재하지 않는있는 테이블)

2) 편집 /etc/my.cnf에를 만들으로 mysql_fix_privilege_tables를합니다 (--skip 잠금 문을 주석으로

그게 전부입니다, 행복한 SQLing

+1

고맙습니다. bin 디렉토리에서 ./mysql_upgrade 명령을 입력했는데 다음과 같이 표시됩니다. 오류가 발생했습니다. : 2002 : 연결하려고 할 때 '/tmp/mysql.sock'(2) 소켓을 통해 로컬 MySQL 서버에 연결할 수 없습니다. 치명적인 오류 : 업그레이드에 실패했습니다. – AliBZ

2

--skip-locking은 MySQL 5.5에서 제거되었습니다. here을 참조하십시오.

my.cnf 파일을 편집하고 "건너 뛰기 잠금"을 "건너 뛰기 - 외부 잠금"으로 변경하십시오.

+0

고맙습니다. – AliBZ

+0

설치 프로그램이 읽을 my.cnf 파일이 들어있는 다른 디렉토리가있을 수 있습니다. 이 링크를 확인하십시오. (Mac에서는 아니지만 같은 문제입니다) [link] (https://bbs.archlinux.org/viewtopic.php?pid=894337) – red

2

Mac에서이 동일한 문제가 발생했습니다. MAMP 및 XAMP에서 설치된 다른 MySQL 인스턴스가 있습니다.

터미널에서 찾으십시오 마십시오 아닌 AMPPS 디렉토리에있는 다른의 my.cnf 파일의 locate my.cnf

를 적어 둡니다.

내가 /private/etc/my.cnf을 제거했을 때, MySQL은 문제없이 시작되었다. 터미널은 당신이 그 솔루션 등 애플이 아파치/PHP를 출하 이상 설치하지 않는 한, 부정확 온라인 찾을 것을 명령이 발생할 수 있습니다 MAMP 또는 엔트로피의 설치 횟수를 사용

sudo mv /private/etc/my.cnf /private/etc/my-old.cnf