Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

MySQL in startup loop

I am just starting in the whole server/MySQL/Web zone and thought I would try experimenting by setting up Web services and a MySQL database following the Apple instructions. It has all gone horribly wrong and I now discover MySQL is in a start up loop. I am away on holiday in a days time and just want to shut MySQL down and leave the server running in peace until I can have a proper look and try again. The start up process seems to be consuming lots of CPU energy.

System log is:
Jun 1 09:31:34 jamserver com.apple.launchd[1] (org.mysql.mysqld[93390]): Exited with exit code: 1
Jun 1 09:31:34 jamserver com.apple.launchd[1] (org.mysql.mysqld): Throttling respawn: Will start in 10 seconds
Jun 1 09:31:45 jamserver com.apple.launchd[1] (org.mysql.mysqld[1808]): Exited with exit code: 1
....this repeats endlessly

MySQL Service Log is:
InnoDB: buffer...
100602 20:39:35 InnoDB: Started; log sequence number 0 43655
100602 20:39:35 [Note] Recovering after a crash using mysql-bin
100602 20:39:35 [Note] Starting crash recovery...
100602 20:39:35 [Note] Crash recovery finished.
100602 20:39:35 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
100602 20:39:45 [Warning] Setting lower case_tablenames=2 because file system for /Volumes/JaMServerMedia/Test Database/ is case insensitive
InnoDB: The InnoDB memory heap has been disabled.
InnoDB: Mutex and rw_lock use GCC atomic builtins.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
100602 20:39:45 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...

If someone has a very simple way of shutting this down it would be most appreciated.

Mike

iMac ICi7/iMac G5/MacBookPro/MacMiniServer, Mac OS X (10.6.3)

Posted on Jun 2, 2010 2:02 PM

Reply
15 replies

Jun 2, 2010 3:18 PM in response to MrHoffman

jamserver is the name of the server. When setting up the MySQL database I set the location as Volumes/JaMServerMedia/Test Database. JaMServerMedia is the second hd in the MacMini Server
Looking with Server Admin when I look at the MySQL green button there is no option for shutting down. At the bottom of the window is a "Start MySQL" button and in the Overview window it says "MySQL Service is: Starting up". So it looks like it tried to start but never got there.
Sorry to be so dense.

Mike

Jun 2, 2010 4:08 PM in response to Mike Turner

Ah, OK. I have an obvious blind spot for that host name stuff.

Try launching terminal and issuing the following command-level shutdown command:

mysqladmin -u mysqlrootusername -p shutdown

The mysqlrootusername is whatever user you've set up within MySQL for its management. The -p switch prompts for the password. If you haven't set a password, omit that.

Jul 16, 2010 2:26 PM in response to Mike Turner

I have the exact same issue. I tried starting MySQL via Server Admin and my system log shows the same infinite loop. I tried stopping MySQL however it's not running.

mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/mysql/mysql.sock' exists!

I'll repost here if I come up with a resolution.

Jul 29, 2010 3:44 PM in response to Mike Turner

My MySQL is now running. I reinstalled the server OS, however before installation I booted from the install dvd and re-formated both drives and named them with no spaces. I believe that the issue was with the spaces in the path to MySQL's data store. Extra note: MySQL must be "stopped" in Server Admin in order to set a root password for the database server.

Oct 17, 2010 2:32 PM in response to Avery Smith

Guess i found a solution for my own problem.

Started of like the rest of you, enabling the mysql module in server admin and found it to go into a loop. There may be a billion diffrences on what cause the mysql to go into a loop but here is my fix.

1. sudo launchctl unload -w /System/Library/LaunchDaemons/org.mysql.mysqld.plist
2. Unable the mysql module in Server Admin (services)
3. Delete all data directories (/var/mysql)
4. Reenable the mysql module in Server Admin (services)
5. Set the password
6. See too that the Database location is set to /var/mysql
7. Save
8. Start Mysql

Please feedback here if the fix works for you!

Nov 15, 2010 3:40 PM in response to Inge Eidem

Inge,

Thanks a lot for this post. I have been looking for this solution for a while now. After doing the steps you described the problem with MySQL was fixed. It was no longer in "Starting up loop". I put a copy of your solution on my blog.

Thanks!

MySQL in startup loop

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.