How to setup mysql to work when OS startup

robinwei

Registered
when I restart the OS, Mysql always stop to work,I must Launch terminal and CD to the mysql install directory and Launch "sudo ./bin/safe_mysqld --user=mysql &",the mysql is to begin work.therefore, i want Mysql to work when OS startup, how to setup it?
 
There is a pre-written Startup script on the Internet.

However you can build your own by putting your startup actions, from the terminal window into:

/Library/StartupItems/MySQL/MySQL

The last MySQl is just a file with something like "sudo ./bin/safe_mysqld --user=mysql &" in it.

Make sure the file is executable (chmod 755 MySQL)
 
failure~! I have installed mysql-startupitem.pkg,but when I restart the OS,the Mysql doesn't work as before. i must input sudo-command in terminal to activate it.

By the way,I find the /Library/startupitems/MySQL/ and some files have created.

What caused it failure?
 
Back
Top