Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm really new to databases and SQL in general, previously having installed MySQL only to hand it over completely to some CMS or other. Now, I want to get serious about adding SQL and MySQL or PostgreSQL to my skills.

And so, perhaps bearing this in mind, MySQL no longer installs successfully. I'm using the DMG archive for 5.5.8, and everything seems to install just fine. The installers for both MySQL and the startup item give me big green checkmarks, and the preference pane works just fine, in and of itself.

But the MySQL daemon can't seem to come up. If I try to launch MySQL via the preference pane, this gets logged to the console:

2/6/11  3:01:11 AM  1269    System Preferences  about to perform command
2/6/11  3:01:11 AM  1269    [0x0-0x65065].com.apple.systempreferences   /usr/local/mysql/support-files/mysql.server: line 256: my_print_defaults: command not found
2/6/11  3:01:11 AM  1269    System Preferences  status= 0

$ mysqld spits out:

110206  3:04:29 [Warning] Can't create test file /usr/local/mysql-5.5.8-osx10.6-x86/data/Atlas.lower-test
110206  3:04:29 [Warning] Can't create test file /usr/local/mysql-5.5.8-osx10.6-x86/data/Atlas.lower-test
110206  3:04:29 [Note] Plugin 'FEDERATED' is disabled.
mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
110206  3:04:29 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
110206  3:04:29  InnoDB: Initializing buffer pool, size = 128.0M
110206  3:04:29  InnoDB: Completed initialization of buffer pool
110206  3:04:29  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.

Let me know if any other information is needed. And thanks for your help!

Edit: MySQL is installed in lrwxr-xr-x _mysql wheel /usr/local/mysql -> mysql-5.5.8-osx10.6-x86.

share|improve this question
add comment

2 Answers

Fixed it. Listening to /usr/local/mysql/support-files/mysql.server: line 256: my_print_defaults: command not found, I took a peek inside. Turns out this is the script that's called when the startup item or the preference pane want to start or stop MySQL. Unfortunately, it doesn't seem to work out of the box anymore.

The comments near the top of the script seem to know this, and give you a list of options to make the script work. I took the easiest and added the installation path to the basedir variable assignment.

share|improve this answer
add comment

It may be a permission issue, as stated in this thread, even if it's a little bit old.
It seems anyway to be confirmed by the message InnoDB: The error means mysqld does not have the access rights to the directory.
Try the solution provided in the above-linked thread (start with posts from Sep. 19th) see if you can progress.

share|improve this answer
    
I have had mixed success of a sort. Neither the startup nor the preference pane work, but if I start the server as _mysql from a root shell, the server does start, and the preference pane sees this and says so. So, if push comes to shove, I should be able to get things up and running, although I'd still like to get the preference pane and startup item to work. I've added details to the main post. What I did was chown -R _mysql everything and also chmod -R g+w. –  user823 Feb 6 '11 at 10:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.