I went through Kevin Yank's 'Build Your Own Database Driven Website Using PHP & MySQL' a while ago, and have since been getting into MySQL. Only recently I installed the latest Mac OS (lion), and for some reason I can't start my SQL server.
I have installed the latest version of MySQL (mysql-5.5.15-osx10.6-x86 32-bit), but when I try to start the server, using the method from the book:
I get the following message:
110801 17:34:57 mysqld_safe Logging to '/usr/local/mysql/data/Dwayne.local.err'.
110801 17:34:57 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
110801 17:34:59 mysqld_safe mysqld from pid file /usr/local/mysql/data/Dwayne.local.pid ended
In the console I get this:
01/08/2011 17:34:59.000 kernel: nstat_lookup_entry failed: 2
I'm not really sure what's happening. I have tried repairing permissions using disk utility, but no dice.
Does anyone hav any idea what's going on here.
Thanks in advance,
I just got a Mac with Lion on it. MAAP will not work at all. I followed the installation instructions as posted above and restarted my machine - as mentioned above. I have all the same error messages. Are there any more posts/forums to help me resolve this. I'd like to share that I have PostgreSQL working fine. It's just MySQL that has me tripped up.
Thanks in advance,
I am not sure what the issue is here, but if you are just learning PHP and/or MySQL, you should look into MAMP (MAMP: Mac, Apache, MySQL, PHP). It will alleviate the server setup dilemma and let you focus on coding and learning.
Thanks for your reply ethanp,
I was turned off MAMP a while ago, when it crashed everytime I started it up, and I lost all my data. Plus I'm more comfortable on the command-line.
I'm gonnna persist with this for another day or so before resorting to MAMP or something similar.
This could be a a database file permission issue (likely the execution flag is not set on the mysql.bin).
Mac Os is based on the FreeBSD Linux distrobution, so you could likely cross reference some of the FreeBSD user who experience this issue an the fix might work for your Mac.
Sorry I can't be more specific but I don't run a MAC; our company services them. We don't run accross many of the MAC's that we service having MySQL running. It is a potential path to follow.
Oh my word!
So normally I just put my mac to sleep, and very rarely actually shut it down. I did that last night, and now everything works a treat.
I think there's a lesson to be learned here: If in doubt, turn it off, then turn it back on again!
Thanks for your reply. Yes the error log would suggest the a db file permission issue. I'll check into it.
If you do not want to use MAMP, I would recommend trying Macports. It will make it easier to manage these types of things in the future and helps to decouples things like Apache from your Mac OS X installation. Glad that the problem resolved itself though!
Cheers, Ethan, appreciate your advice.