Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Every time I start my system. I have to run a command

 sudo /usr/local/mysql-5.5.9-osx10.6-x86_64/support-files/mysql.server start

to start mysql. How can I start it automatically on login (System start)?

share|improve this question
2  
fyi, login and system start are not the same thing –  grawity Mar 26 '11 at 22:58
    
Please accept my answer if it worked for you or comment on it so I or others have the opportunity to solve your problem. This question was just bumped to the front page, since the system considers it unanswered. –  Daniel Beck May 30 '11 at 18:09
add comment

2 Answers

up vote 0 down vote accepted

How did you install MySQL?

There are official installer packages for OS X, that have an installer for a startup item and a preference pane for System Preferences to easily toggle auto-start of MySQL.

share|improve this answer
    
Didnt worked for me.. –  Mohit Jain May 30 '11 at 19:28
    
@Mohit That's why I asked how you installed it. There are multiple ways to do this, and this answer works for one of them. –  Daniel Beck May 30 '11 at 19:31
add comment

Don't know how you installed MySQL, but if you have a MySQL symlink in /etc/init.d then you can run update-rc.d as follows which will add mysql to your list of apps which are run at system start-up.

sudo update-rc.d mysql defaults

For info on update-rc.d use:

man update-rc.d
share|improve this answer
    
-1, the user is on OS X, there's no such thing as update-rc.d. –  slhck Apr 28 '12 at 12:24
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.