Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using Mac OS X 10.6.2 on my Macbook Pro.

I can get the apache server to start, but not the mysql server, on both the default apache and default MAMP ports. When I try to go to my start page, I get the message "Error: Could not connect to MySQL server!" . Here's what's in my mysql error log:

00513 02:00:07 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended
100513 02:00:16 mysqld_safe Starting mysqld daemon with databases from /Applications/MAMP/db/mysql
100513 2:00:16 [Warning] The syntax '--log_slow_queries' is deprecated and will be removed in a future release. Please use '--slow_query_log'/'--slow_query_log_file' instead.
100513 2:00:16 [Warning] You have forced lower_case_table_names to 0 through a command-line option, even though your file system '/Applications/MAMP/db/mysql/' is case insensitive. This means that you can corrupt a MyISAM table by accessing it with different cases. You should consider changing lower_case_table_names to 1 or 2
100513 2:00:16 [Warning] One can only use the --user switch if running as root
100513 2:00:16 [Note] Plugin 'FEDERATED' is disabled.
100513 2:00:16 [Note] Plugin 'ndbcluster' is disabled.
InnoDB: Error: log file /usr/local/mysql/data/ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 16777216 bytes!
100513 2:00:16 [ERROR] Plugin 'InnoDB' init function returned error.
100513 2:00:16 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
100513 2:00:16 [ERROR] /Applications/MAMP/Library/libexec/mysqld: unknown option '--skip-bdb'
100513 2:00:16 [ERROR] Aborting
100513 2:00:16 [Note] /Applications/MAMP/Library/libexec/mysqld: Shutdown complete
100513 02:00:16 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended

A couple of things:

1) There are a bunch of different .cnf files that come with MAMP (my-huge, my-medium, etc.)...how can I tell which one is actually being used?
2) I deleted the ib_logfile0 and ib_logfile1 as recommended by another post on serverfault, and then ended up with more errors:

100519 16:01:30  InnoDB: Log file /usr/local/mysql/data/ib_logfile0 did not exist: new to be created
InnoDB: Setting log file /usr/local/mysql/data/ib_logfile0 size to 16 MB
InnoDB: Database physically writes the file full: wait...
100519 16:01:30  InnoDB: Log file /usr/local/mysql/data/ib_logfile1 did not exist: new to be created
InnoDB: Setting log file /usr/local/mysql/data/ib_logfile1 size to 16 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
100519 16:01:31  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...
100519 16:01:31  InnoDB: Started; log sequence number 0 44556
100519 16:01:31 [ERROR] /Applications/MAMP/Library/libexec/mysqld: unknown option '--skip-bdb'
100519 16:01:31 [ERROR] Aborting

And then I got this the next time I tried to run it:

InnoDB: Unable to lock /usr/local/mysql/data/ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process 
InnoDB: using the same InnoDB data or log files.

Sorry that this is a lot of information, but I don't want to leave anything out. Thanks.

share|improve this question
    
mysqld is the script that starts up the server, right? '--skip -bdb' is not in my my.cnf file, so I think MAMP thinks there's another my.cnf file somewhere else, but it doesn't show up in my search. –  alexpelan May 19 '10 at 22:44

2 Answers 2

I was having a similar issue, and i noticed that after a restart of the computer, mysql doesn't start up, when I'd quit MAMP and then tried to start it again, only Apache starts... The 'fix' that worked for me is to quit MAMP, use the activity monitor to quit all instances of 'mysqld' and then restart MAMP.

share|improve this answer

This definately sounds like you have alot of MySQL processes running and you just need to quit all mysql processes and then start up MySQL. Open your terminal and issue:

kill -s 15 `http://softwaregravy.wordpress.com/2010/10/16/ls-colors-for-mac/`

Confirm with:

ps -ef | grep mysql | grep -v grep

If there are still processes that come up, you will need to force kill all the processes:

kill -s 9 `http://softwaregravy.wordpress.com/2010/10/16/ls-colors-for-mac/`

Confirm and then start MySQL via MAMP's Control panel as you normally would.

share|improve this answer

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.