Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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
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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .