|
| |||
| Hi, I want my MySQL running, when my operating system Mac OS X boots up. Is that a tedious job, can anybody provide me the simple steps to do this. regards, kayla
__________________ Kayla - Hosting |
| |||
| Mac OS X automatically executes all scripts under the /Library/StartupItems 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 /Library/StartupItems/MySQL 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 /etc/hostconfig and add the line: MYSQLSERVER=-YES- 1.2.3.1.1 MySQL The shell script to start, stop, and restart MySQL looks like this: #!/bin/sh . /etc/rc.common StartService( ) { if [ "${MYSQLSERVER:=-NO-}" = "-YES-" ]; then ConsoleMessage "Starting MySQL" cd /usr/local/mysql bin/mysqld_safe --user=mysql & fi } StopService( ) { ConsoleMessage "Stopping MySQL" /usr/local/mysql/bin/mysqladmin shutdown } RestartService( ) { if [ "${MYSQLSERVER:=-NO-}" = "-YES-" ]; then ConsoleMessage "Restarting MySQL" StopService StartService else StopService fi } StartupParameters.plist The configuration file looks like this: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist SYSTEM "file://localhost/System/Library/ DTDs/PropertyList.dtd"> <plist version="0.9"> <dict> <key>Description</key> <string>MySQL Database Server</string> <key>Provides</key> <array> <string>MySQL</string> </array> <key>Requires</key> <array> <string>Network</string> </array> <key>OrderPreference</key> <string>Late</string> </dict ></plist> Once installed, you should run the mysql_install_db tool to set up your databases.
__________________ xunk in hosting Last edited by xunk : 12-22-2008 at 11:42 AM. |
| |||
| In your online server which is having Linux OS, copy the script mysql.server from the source's support-files directory to your version of Linux startup directory and making sure it is executable by root. Under FreeBSD, for example, place this script in /usr/local/etc/rc.d. Once installed, you should run the mysql_install_db tool to set up your databases. Windows 2000/XP To startup an application at system startup on the Windows platform, you need to install it as a Windows service. You can do this by hand using the command: C:\> c:\mysql\bin\mysqld-nt --install A more convenient way to do accomplish this task is through the winmysqladmin.exe utility that comes with the Windows installation of MySQL.
__________________ xunk in hosting |
![]() |
| Thread Tools | |
| Display Modes | |
| |