Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I installed mysql version 5.5.9 on my mac and I tried to start it using this command :

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

mysql didn't start with this command. I checked the localhost.err file in data directory and it was like this :

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.

share|improve this question
add comment

2 Answers

It isn't refusing to start because of the missing ib_log files: in fact that trace shows it created blank versions in response to not finding them [presumably this is similar to attaching a detached DB in MSSQL without it s log file(s)].

The reason it is reporting for failing to start appears to be unknown option '--skip-locking' which implies that this option is specified on the command line or in the config file but is not being understood.

Why there would be a wrong option in a fresh install I'm not sure, and I'm no expert at all on MySQL so can't be much more help. To help other people (who may have much greater MySQL knowledge) help you it would be a good idea to document the steps you took install and configure MySQL (including where you obtained any install files or source code) - that will help identify if you are hitting a known problem with MacOS that is a seen in certain releases or setups.

Edit:

A quick search for info about the option indicates that it is now deprecated as it has been renamed to --skip-external-locking (see this SO question+answer) and is apparently the default behaviour anyway. The changelog linked to suggests is changed somewhere in the 4.x line though, so why v5.1.x accepted it and v5.5.9 doesn't is not obvious (unless it was a bug that v5.1.x didn't give the error/warning).

share|improve this answer
    
Thanx, I had mysql 5.1 so I think --skip-locking was in it's my.cnf. –  AliBZ Feb 27 '11 at 20:33
add comment

Based on the message about needing to run mysql_upgrade, I'm guessing that the post install scripts haven't been run, so it can't find the initial database structure it needs to operate.

See the postintall instructions for unix systems. I'm guessing mysql_install_db didn't run, or had errors.

As you've mentioned that you've changed my.cnf, it's also possible that it was configured, but then you changed the configuration so it can't find the data directory that was set up.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.