NEWBIE: MySQL Server won't start

natesimons
New Contributor III

Running OSX 10.9.4 & Server 3.1.2 on a Mac Mini. Went through the tutorial about where to download Java and MySQL from the JAMF pdf file. Followed everything and when I click on the preference pane to start the MySQL server, I verify my password, little beach ball spins for a minute and nothing happens. I replicated the process on a macbook air and the MySQL server started up fine following the same PDF, same versions of Mavericks and Server. What am I missing? Please use small words as I am REALLY new at this stuff.

1 ACCEPTED SOLUTION

natesimons
New Contributor III

I did have another version already installed. Found a we page that showed how to delete all instances of MySQL. I then did a homebrew install of MySQL and it worked perfectly. Thank you all for the helpful ideas!

View solution in original post

10 REPLIES 10

rderewianko
Valued Contributor II

Take a look at the log files in Console It should be spitting out some kind of error (console can be found by going to Applications -> Utilities -> Console)

natesimons
New Contributor III

7/28/14 10:02:44.475 AM launchservicesd[66]: Application App:"System Preferences" asn:0x0-32032 pid:6972 refs=7 @ 0x7ff2a0d75ec0 tried to be brought forward, but isn't in fPermittedFrontApps ( ( "LSApplication:0x0-0x34034 pid=7008 "SecurityAgent"")), so denying. : LASSession.cp #1481 SetFrontApplication() q=LSSession 100008/0x186a8 queue

7/28/14 10:02:44.476 AM WindowServer[92]: [cps/setfront] Failed setting the front application to System Preferences, psn 0x0-0x32032, securitySessionID=0x186a8, err=-13066

I think that these are the errors I am getting that deal with starting the MySQL server from the preference pane.

rderewianko
Valued Contributor II

in console search for mysql there should be specific details on why mysqld didn't start

natesimons
New Contributor III

ERROR! The server quit without updating PID file (/usr/local/mysql/data/dnsp.logan.k12.ia.us.pid)

I didn't see anything specific in the console when doing that search. But I tried to start MySQL from the terminal and the above error is what I received.

natesimons
New Contributor III

Here is the text from the .err file that gets created when attempting to start.

140728 11:34:45 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
2014-07-28 11:34:46 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-07-28 11:34:46 5681 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive
2014-07-28 11:34:46 5681 {note} Plugin 'FEDERATED' is disabled.
/usr/local/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
2014-07-28 11:34:46 5681 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2014-07-28 11:34:46 5681 {note} InnoDB: Using atomics to ref count buffer pool pages
2014-07-28 11:34:46 5681 {note} InnoDB: The InnoDB memory heap is disabled
2014-07-28 11:34:46 5681 {note} InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-07-28 11:34:46 5681 {note} InnoDB: Compressed tables use zlib 1.2.3
2014-07-28 11:34:46 5681 {note} InnoDB: Not using CPU crc32 instructions
2014-07-28 11:34:46 5681 {note} InnoDB: Initializing buffer pool, size = 128.0M
2014-07-28 11:34:46 5681 {note} InnoDB: Completed initialization of buffer pool
2014-07-28 11:34:46 5681 {note} InnoDB: Highest supported file format is Barracuda.
2014-07-28 11:34:46 5681 {note} InnoDB: Log scan progressed past the checkpoint lsn 1600907
2014-07-28 11:34:46 5681 {note} InnoDB: Database was not shutdown normally!
2014-07-28 11:34:46 5681 {note} InnoDB: Starting crash recovery.
2014-07-28 11:34:46 5681 {note} InnoDB: Reading tablespace information from the .ibd files...
2014-07-28 11:34:46 5681 {note} InnoDB: Restoring possible half-written data pages 2014-07-28 11:34:46 5681 {note} InnoDB: from the doublewrite buffer...
InnoDB: Doing recovery: scanned up to log sequence number 1600937
2014-07-28 11:34:46 5681 {note} InnoDB: 128 rollback segment(s) are active.
2014-07-28 11:34:46 5681 {note} InnoDB: Waiting for purge to start
2014-07-28 11:34:46 5681 {note} InnoDB: 5.6.19 started; log sequence number 1600937
2014-07-28 11:34:46 5681 {note} Server hostname (bind-address): '*'; port: 3306
2014-07-28 11:34:46 5681 {note} IPv6 is available.
2014-07-28 11:34:46 5681 {note} - '::' resolves to '::';
2014-07-28 11:34:46 5681 {note} Server socket created on IP: '::'.
2014-07-28 11:34:46 5681 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
140728 11:34:46 mysqld_safe mysqld from pid file /usr/local/mysql/data/dnsp.logan.k12.ia.us.pid ended

rderewianko
Valued Contributor II

Run mysql_upgrade and see what happens.
/usr/bin/mysql_upgrade

- RD

tonysimons
New Contributor

It looks like the primary database doesn't exist, Mysql won't start without it. [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist.
If mysql_upgrade doesn't do the trick do: mysql_install_db It will create a test database which can be dropped later. But it should get you up and running.

If that isn't the case, paste in your my.cnf and a directory listing of your data folder?
Which I believe to be /usr/local/mysql/data/.

tonysimons
New Contributor

Got him going. Had multiple versions of mysql installed. He found a doc to install mysql via brew which seems to be the better way to install it when there is no package from the oracle and that worked out better for him....well, at least hes up and running with the database.

natesimons
New Contributor III

I did have another version already installed. Found a we page that showed how to delete all instances of MySQL. I then did a homebrew install of MySQL and it worked perfectly. Thank you all for the helpful ideas!

teknikal35
New Contributor III

can i use this to remove the mysql instance 1. Check to see if any processes are actively running for mysql: ps auxww | grep mysql (you would expect one result for this, if more, kill the processes actively running)
2) Delete all known MySQL files. Run all the commands below from Terminal:
sudo rm -rf /usr/local/mysql
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My

sudo rm -rf /Library/Receipts/mysql
sudo rm -rf /Library/Receipts/MySQL

sudo rm -rf /var/db/receipts/com.mysql.
sudo rm -rf /var/mysql
sudo rm -f /etc/my.cnf
sudo rm -f /usr/bin/mysql

3) Remove MySQL from any startup processes or launchd items.

  • edit /etc/hostconfig and remove the line MYSQLCOM=-YES-
  • Search the following locations for anything with mysql in the name and delete it
  • /Library/LaunchDaemons
  • /Library/LaunchAgents
  • /System/Library/LaunchAgents
  • /System/Library/LaunchDaemons