| Bug #54718 | MySql 5.1.48 won't start on OSX 10.6 | ||
|---|---|---|---|
| Submitted: | 22 Jun 2010 21:58 | Modified: | 28 Jun 2010 21:26 |
| Reporter: | Bernard Leung | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Errors | Severity: | S1 (Critical) |
| Version: | 5.1.48 | OS: | MacOS |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | MySQL won't start on OSX | ||
[22 Jun 2010 21:58]
Bernard Leung
[23 Jun 2010 4:45]
Valeriy Kravchuk
Please, send the results of: sudo ls -l /usr/local/mysql/data/ What exact version of Mac OS X, 10.x.y, do you use?
[23 Jun 2010 5:47]
Giuseppe Maxia
Tested installation using mysql-5.1.48-osx10.6-x86.dmg on Mac OSX 10.6.4. It works as expected. My guess is that there might have been a running server that has conflicted with the installation.
[23 Jun 2010 6:59]
Bernard Leung
I All, Yes it is a bit strange, I wouldn't have expected this to occur. I tried running the commands requested and get the following: - ls -l /usr/local/mysql/data/ ls: : Permission denied I then tried to run it as sudo and get the following. mrbernz:mysql bernardleung$ sudo ls -l /usr/local/mysql/data/ total 40976 -rw-rw---- 1 _mysql wheel 5242880 23 Jun 07:51 ib_logfile0 -rw-rw---- 1 _mysql wheel 5242880 22 Jun 23:07 ib_logfile1 -rw-rw---- 1 _mysql wheel 10485760 22 Jun 23:08 ibdata1 -rw-rw---- 1 _mysql wheel 4098 23 Jun 07:51 mrbernz.config.err drwxr-x--- 2 _mysql wheel 68 4 Jun 19:22 mysql -rw-rw---- 1 _mysql wheel 0 22 Jun 23:02 mysql-bin.index drwxr-x--- 2 _mysql wheel 68 4 Jun 19:22 test I've attached these contents in a zip file. Note I tried a restart again this morning. oh I'm running OSX 10.6.4
[23 Jun 2010 7:00]
Bernard Leung
contents of /usr/local/mysql/data
Attachment: mysql.data.tar.gz (application/x-gzip, text), 38.74 KiB.
[24 Jun 2010 8:46]
Steve Swinsburg
I'm having the exact same issue on one machine but it works on another machine, both 64 bit, both 10.6.4. The one it does NOT work on is a Macbook Pro, Intel Core 2 Duo, purchased late 2007. Nothing I do, even running the commandline startup commands will get it to work.
[28 Jun 2010 14:21]
Bernard Leung
Thanks Steve, yes that is in line with what my MacBook Pro is - 2007 model. Wonder what the issue could possibly be? I may need to try a total ground up rebuild?
[28 Jun 2010 21:26]
Bernard Leung
I can't beleive this, but I think I've found the problem - or at least the solution! Check out this webpage written in late 2007 specifically for mysql on MBP... http://jwopitz.wordpress.com/2007/12/09/getting-mysql-mac-os-x-105-leopard-togetherfinally... Going back over the instructions and removing one thing at a time, I can rule out a number of the steps. It's NOT the chown for /var/mysql as I changed it back to root owner and it continued to work. I don't think it's the additional paths, as I reverted back to the old profile and it continued to work (note: on my Snow Leaopard version of OSX it's now .bash_profile, not .bash_login). What it MIGHT be is that I noticed the original .bash_profile was NOT executable, as such the addition of the /usr/loca/mysql path that was present (and that I assume the mysql install adds) may NOT have made it into the PATH variable previously. THis could explain some of the failures? Anyway, after months of trial, error and searching (admittedly with a few months of "I wont' bother it's too frustrating" in between, this seems to be working! Woohoo!
[28 Jun 2010 23:00]
Steve Swinsburg
Re the rebuild, this is on a freshly installed Snow Leopard that I recently wiped completely, so that wont help. I'm not sure it's the profiles either. In my ~/.profile I have: export MYSQL_HOME=/usr/local/mysql export PATH=$PATH:$MYSQL_HOME/bin and can run mysql from the commandline as is. When I look at the error log: /usr/local/mysql/data/steve-mac.local.err I get permission denied errors (don't have exact error, on a different machine) even though everything looks fine as the _mysql user etc.
[18 Jul 2010 12:53]
Steve Swinsburg
Hang on, this issue should not be closed. As I mentioned, on a fresh build of Snow Leopard and MySQL 5.1.48 installed, it fails to start on a Macbook Pro from the 2007 era.
[18 Jul 2010 13:09]
Steve Swinsburg
Here is the log: 100718 22:59:32 [ERROR] /usr/local/mysql/bin/mysqld: Can't create/write to file '/usr/local/mysql/data/macbook.local.pid' (Errcode: 13) 100718 22:59:32 [ERROR] Can't start server: can't create PID file: Permission denied 100718 22:59:32 mysqld_safe mysqld from pid file /usr/local/mysql/data/macbook.local.pid ended Permissions: [macbook:/usr/local/mysql]$ ls -la total 208 drwxr-xr-x 17 root wheel 578 6 Jun 03:30 . drwx------@ 8 steve staff 272 18 Jul 22:56 .. -rw-r--r-- 1 root wheel 17987 6 Jun 03:30 COPYING -rw-r--r-- 1 root wheel 5139 6 Jun 03:30 EXCEPTIONS-CLIENT -rw-r--r-- 1 root wheel 9693 6 Jun 03:30 INSTALL-BINARY -rw-r--r-- 1 root wheel 62989 6 Jun 03:30 README drwxr-xr-x 46 root wheel 1564 6 Jun 03:30 bin drwxr-x--- 8 _mysql wheel 272 18 Jul 22:59 data drwxr-xr-x 4 root wheel 136 6 Jun 03:29 docs drwxr-xr-x 34 root wheel 1156 6 Jun 03:29 include drwxr-xr-x 22 root wheel 748 18 Jul 22:56 lib drwxr-xr-x 4 root wheel 136 6 Jun 03:29 man drwxr-xr-x 15 root wheel 510 6 Jun 03:30 mysql-test drwxr-xr-x 3 root wheel 102 6 Jun 03:30 scripts drwxr-xr-x 35 root wheel 1190 6 Jun 03:30 share drwxr-xr-x 29 root wheel 986 6 Jun 03:30 sql-bench drwxr-xr-x 16 root wheel 544 6 Jun 03:30 support-files [macbook:/usr/local/mysql]$ sudo ls -la data/ total 40968 drwxr-x--- 8 _mysql wheel 272 18 Jul 22:59 . drwxr-xr-x 17 root wheel 578 6 Jun 03:30 .. -rw-rw---- 1 _mysql wheel 5242880 18 Jul 22:59 ib_logfile0 -rw-rw---- 1 _mysql wheel 5242880 18 Jul 22:59 ib_logfile1 -rw-rw---- 1 _mysql wheel 10485760 18 Jul 22:59 ibdata1 -rw-rw---- 1 _mysql wheel 1599 18 Jul 22:59 macbook.local.err drwxr-x--- 71 _mysql wheel 2414 18 Jul 22:56 mysql drwxr-x--- 2 _mysql wheel 68 6 Jun 03:30 test And /tmp: srwxrwxrwx 1 _mysql wheel 0 18 Jul 23:06 mysql.sock Running this command: sudo /Library/StartupItems/MySQLCOM/MySQLCOM restart Gives the same log output. Looks like it starts up but it can't connect. Fresh install of 5.1.48 on 10.6.4, everything removed prior.
[16 Mar 2011 1:27]
Matt Miniea
Not sure people are still watching this, but reading through these notes, I kind of stumbled on the answer...at least for my machine. Looks like my /Library/MySQL directory had reverted to 'admin' ownership, as well as its contents. I sudo chown'd that director and its contents to _mysql and all of a sudden the log stopped giving me errors and showed: 110315 21:22:47 [Warning] Setting lower_case_table_names=2 because file system for /Library/MySQL/ is case insensitive InnoDB: The InnoDB memory heap has been disabled. InnoDB: Mutex and rw_lock use GCC atomic builtins. 110315 21:22:47 InnoDB: Started; log sequence number 0 5444696 110315 21:22:47 [Note] /usr/libexec/mysqld: ready for connections. Version: '5.0.91-log' socket: '/var/mysql/mysql.sock' port: 3306 Source distribution I still worry about the Warning...but hey, it's up, running, and not filling my drive with an ever growing log... Thanks you guys! :D
