hosting review, Hosting, web hosting, hosting company, shared hosting

Shell script to start, stop, and restart MySQL

Mac OS X automatically executes all scripts under the


Directory when the system boots up. If that directory does not yet exist, you will need to create it.
For MySQL, you should create the directory


and place the startup shell script MySQL and the configuration file StartupParameters.plist in that directory.
Once those files are set up, you need to edit the host configuration file


and add the line:

The shell script to start, stop, and restart MySQL looks like this:

. /etc/rc.common
StartService( )
if [ "${MYSQLSERVER:=-NO-}" = "-YES-" ]; then
ConsoleMessage "Starting MySQL"
cd /usr/local/mysql
bin/mysqld_safe --user=mysql &
StopService( )
ConsoleMessage "Stopping MySQL"
/usr/local/mysql/bin/mysqladmin shutdown
RestartService( )
if [ "${MYSQLSERVER:=-NO-}" = "-YES-" ]; then
ConsoleMessage "Restarting MySQL"


The configuration file looks like this:
"<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/
<plist version="0.9">
<string>MySQL Database Server</string>

Once installed, you should run the mysql_install_db tool to set up your databases.

Under FreeBSD, for example,
place this script in

Once installed, you should run the mysql_install_db tool to set up your databases.
Well after starting the server, and before doing anything else, set a password for the root user:

mysqladmin -u root password a_good_password



Server Location


Visit Now
Cloud SSD Hosting
$1.43 /mo. WILMINGTON, DE, US Price @ $1.43 /mo. Visit Now
247-host $2.99 /mo. LASALLE, CA Price @ $2.99 /mo. Visit Now $2.75/mo. Burlington, MA, US Price : $2.75/mo. Visit Now
Lifetime Free Domain
$3.95/mo. Panama, PA Start @ $3.95/mo. Visit Now
webhostingpad $1.99/mo. Arlington Heights, IL, US Start @ $1.99/mo. Visit Now
webhostingbuzz $4.95/mo AUBURN, MA, US Start @ $4.95/mo Visit Now
Cheapest Webhosting
$3.25/mo. Burlington, MA, US Start @ $3.25/mo. Visit Now
ixwebhosting $3.95/mo Columbus, OH, US Start @ $3.95/mo Visit Now
sitevalley $4.95/mo NASHUA, NH, US Start @ $4.95/mo Visit Now
Managed Wordpress Hosting
$89.00/mo. Lansing, MI, US Price : $19.00/mo. Visit Now


Recent Posts from This Journal

  • Top The United Kingdom Hosting Providers

    SEO Hosting UK We have compiled most popular web hosting in the UK to help you select right SEO hosting provider. For this, we considered factors…

  • Best Cloud Hosting Providers

    BEST CLOUD HOSTING Cloud computing is the use of computing resources (hardware and software that are delivered as a service over a network(typically…

  • Resellerclub Special Discount

    Up To 50% off on all hosting plans April 2015 is full of exciting hosting advantages, as this month has Easter and Good Friday. Many hosting…