I know that some of you here run phpBB forums so maybe you can help me. I'm running a phpBB forum on a Powermac (10.2.3) desktop using MySQL as the database, and its working out really well.<br><br>The only problem I have is that whenever the computer needs a restart (software updates or whatever) it turns off the database. I can manually turn it back on, but of course, I'm not always around.<br><br>So does anyone know how I could automatically start MySQL at system startup? Keep in mind that I suck at the terminal.<br><br>Thanks<br><br>
ok, I know nothing about this, but I found this<br><blockquote><font size=1>In reply to:</font><hr><p>184.108.40.206 Starting and Stopping MySQL Automatically<br><br><br> <br><br><br>Generally, you start the mysqld server in one of these ways:<br><br><br>By invoking mysqld directly. This works on any platform.<br>By running the MySQL server as a Windows service. This can be done on Windows NT, 2000, and XP. For instructions, see section 220.127.116.11 Starting MySQL as a Windows Service.<br>By invoking mysql.server. This script is used primarily at system startup and shutdown on systems that useSystem V-style run directories. It is described more fully later in this section.<br>By invoking mysqld_safe, which tries to determine the proper options for mysqld and then runs it with those options. This script is used on systems based on BSD Unix. It also is invoked by mysql.server. See section5.1.2 mysqld_safe, The Wrapper Around mysqld.<br><br><br>The mysql.server and mysqld_safe scripts can be used to start the server automatically at system startup time.mysql.server can also be used to stop the server.<br><br><br>The mysql.server script can be used to start or stop the server by invoking it with start or stop arguments:<br><br>shell> mysql.server start<br>shell> mysql.server stop<br><br><br><br>mysql.server can be found in the `share/mysql' directory under the MySQL installation directory or in the`support-files' directory of the MySQL source tree.<br><br><br>Note that if you use the Linux RPM package (MySQL-server-VERSION.rpm), the mysql.server script has already been installed as `/etc/init.d/mysql'. You don't have to install it manually. See section 2.2.2 Installing MySQL on Linux for more information on the Linux RPM packages.<br><br><br>On Mac OS X, you can install a separate MySQL Startup Item package to enable the automatic startup of MySQLon system bootup. See section 2.2.3 Installing MySQL on Mac OS X for details.<br><br><br>Before mysql.server starts the server, it changes the directory to the MySQL installation directory, then invokesmysqld_safe. You might need to edit mysql.server if you have a binary distribution that you've installed in a non-standard location. Modify it to cd into the proper directory before it runs mysqld_safe. If you want the server to run as some specific user, add an appropriate user line to the `/etc/my.cnf' file, as shown later in this section.<br><br><br>mysql.server stop brings down the server by sending a signal to it. You can also take down the server manually by executing mysqladmin shutdown.<br><br><br>You need to add these start and stop commands to the appropriate places in your `/etc/rc*' files when you want tostart up MySQL automatically on your server.<br><br><br>On most current Linux distributions, it is sufficient to copy the file mysql.server into the `/etc/init.d' directory (or`/etc/rc.d/init.d' on older Red Hat systems). Afterwards, run the following command to enable the startup of MySQLon system bootup:<br><br>shell> chkconfig --add mysql.server<br><br><br><br>On FreeBSD startup scripts generally should go in `/usr/local/etc/rc.d/'. The rc(8) manual page also states that scripts in this directory are only executed, if their basename matches the shell globbing pattern *.sh. Any other files or directories present within the directory are silently ignored. In other words, on FreeBSD you should install the file`mysql.server' as `/usr/local/etc/rc.d/mysql.server.sh' to enable automatic startup.<br><br><br>As an alternative to the above, some operating systems also use `/etc/rc.local' or `/etc/init.d/boot.local' to startadditional services on bootup. To start up MySQL using this method, you could append something like the following to it:<br><br>/bin/sh -c 'cd /usr/local/mysql; ./bin/mysqld_safe --user=mysql &'<br><br><br><br>You can also add options for mysql.server in a global `/etc/my.cnf' file. A typical `/etc/my.cnf' file might look like this:<br><br>[mysqld]<br>datadir=/usr/local/mysql/var<br>socket=/var/tmp/mysql.sock<br>port=3306<br>user=mysql<br><br>[mysql.server]<br>basedir=/usr/local/mysql<br><br><br><br>The mysql.server script understands the following options: datadir, basedir, and pid-file.<br><br><br>The following table shows which option groups each startup script reads from option files:<br><br><br>Script <br>Option groups <br><br>mysqld <br>[mysqld], [server] and [mysqld-major-version] <br><br>mysql.server <br>[mysql.server], [mysqld], and [server] <br><br>mysqld_safe <br>[mysqld], [server], and [mysqld_safe] <br><br><br>For backward compatibility, mysql.server also reads the [mysql_server] group and mysqld_safe also reads the[safe_mysqld] group. However, you should update your option files to use the [mysql.server] and [mysqld_safe] groups instead.<p><hr></blockquote><p><br>My Stuff
Xplain's use of MacNews, AppleCentral and AppleExpo are not affiliated with Apple, Inc. MacTech is a registered trademark of Xplain Corporation. AppleCentral, MacNews, Xplain, "The journal of Apple technology", Apple Expo, Explain It, MacDev, MacDev-1, THINK Reference, NetProfessional, MacTech Central, MacTech Domains, MacForge, and the MacTutorMan are trademarks or service marks of Xplain Corp. Sprocket is a registered trademark of eSprocket Corp. Other trademarks and copyrights appearing in this printing or software remain the property of their respective holders.
All contents are Copyright 1984-2010 by Xplain Corporation. All rights reserved. Theme designed by Icreon.