[英]MySQL 5.5.9 Wont Start
I installed mysql version 5.5.9 on my mac and I tried to start it using this command : 我在Mac上安装了MySQL 5.5.9版,并尝试使用以下命令启动它:
sudo /usr/local/mysql/support-files/mysql.server start
mysql didn't start with this command. mysql不是从这个命令开始的。 I checked the localhost.err file in data directory and it was like this : 我检查了数据目录中的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
I deleted the two ib_log files, I changed my.cnf file and I got nothing. 我删除了两个ib_log文件,更改了my.cnf文件,但一无所获。
I had this same issue on mac, I have other MySQL instances installed from MAMP and XAMP. 我在Mac上遇到了同样的问题,我从MAMP和XAMP安装了其他MySQL实例。
Do a locate in terminal: locate my.cnf
在终端中locate my.cnf
: locate my.cnf
Take note of any other my.cnf files not located in your AMPPS directory. 注意不在您的AMPPS目录中的任何其他my.cnf文件。
I found that when i removed /private/etc/my.cnf
, MySQL started with no issues. 我发现当我删除/private/etc/my.cnf
,MySQL开始没有问题。
sudo mv /private/etc/my.cnf /private/etc/my-old.cnf
1 ) in the terminal , launch command : mysql_upgrade ( to create the tables that are non existent ) 1)在终端中,启动命令:mysql_upgrade(创建不存在的表)
2 ) edit /etc/my.cnf , comment out the --skip-locking statement 2)编辑/etc/my.cnf,注释掉--skip-locking语句
that's all , happy SQLing 就这样,快乐的SQLing
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.