MySQL 5.5.9无法启动

时间:2011-02-27 19:26:43

标签: mysql macos

我在我的mac上安装了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文件,但什么都没有。

3 个答案:

答案 0 :(得分:2)

在MySQL 5.5中删除了

--skip-locking。请参阅here

编辑my.cnf文件并将“skip-locking”更改为“skip-external-locking”。

答案 1 :(得分:2)

我在mac上遇到同样的问题,我从MAMP和XAMP安装了其他MySQL实例。

在终端中进行定位:locate my.cnf

记下不在AMPPS目录中的任何其他my.cnf文件。

我发现当我删除/private/etc/my.cnf时,MySQL开始时没有任何问题。

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

答案 2 :(得分:1)

1)在终端中,启动命令:mysql_upgrade(创建不存在的表)

2)编辑/etc/my.cnf,注释掉--skip-locking语句

这就是全部,快乐的SQLing