• AppleCentral Network:
  • Tech Support
  • |
  • Open Source
  • |
  • Apple News
  • |
  • Register Domains
  • |
  • SSL Certificates
  • |
  • iPod Deals
  • |
  • Mac Deals
  • |
  • Mac Book Shelf
  • AppleCentral Home
  • MacTech Magazine
    • About MacTech in Print
    • Issue Table of Contents
    • Subscribe
    • Risk Free Sample
    • Back Issues
    • MacTech DVD
    • MacTech Archives
    • MacTech Print Archives
    • MacMod
    • MacTutor
    • FrameWorks
    • develop
  • MacNews.com
    • MacNews News
    • Blog
    • MacTech Reviews and KoolTools
    • Whitepapers, Screencasts, Videos and Books
    • News Scanner
    • Rumors Scanner
    • Documentation Scanner
  • Apple Expo
    • by Category
    • by Company
    • by Product
  • MacForge.net
  • Job Board
  • Advertising
    • Benefits of MacTech
    • Mechanicals and Submission
    • Dates and Deadlines
    • Submit Apple Expo Entry
  • User
    • Register for Ongoing Raffles
    • Register new user
    • Edit User Settings
    • Logout
  • Contact
    • Customer Service
    • Webmaster Feedback
    • Submit News or PR
    • Suggest an article
  • Connect Tools
    • MacTech Live Podcast
    • RSS Feeds
    • Twitter
You are not logged in. [Log In] AppleCentral » Forums » Mac » Programming, Web Dev & Scripting » MySQL help?
Register User    Forum List        Active Topics    FAQ
Topic Options
Hop to:
#134223 - 01/30/04 05:48 PM MySQL help?
Trog Offline
Savior

Registered: 07/18/02
Posts: 10958
Loc: Ivory tower
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>

Top
#134224 - 01/30/04 06:43 PM Re: MySQL help? [Re: Trog]
Lori Offline
missing in action

Registered: 04/19/02
Posts: 2796
Loc: Ct, USA
ok, I know nothing about this, but I found this<br><blockquote><font size=1>In reply to:</font><hr><p>2.4.2.2 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 2.2.1.7 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

Top
#134225 - 01/30/04 06:45 PM Re: MySQL help? [Re: Trog]
Lori Offline
missing in action

Registered: 04/19/02
Posts: 2796
Loc: Ct, USA
Here is the link it came from in case you need to find something else there--->MySQL Manual<br><br><br>My Stuff

Top
#134226 - 01/30/04 07:37 PM Re: MySQL help? [Re: Lori]
Trog Offline
Savior

Registered: 07/18/02
Posts: 10958
Loc: Ivory tower
Excellnt, Lori. I don't know why I even bother posting here, I should just PM you instead. <br><br>

Top
#134227 - 01/30/04 07:47 PM Re: MySQL help? [Re: Trog]
Lori Offline
missing in action

Registered: 04/19/02
Posts: 2796
Loc: Ct, USA
Glad to help!<br>some people do PM me instead...hahaha <br><br><br>My Stuff

Top
Previous Topic
View All Topics Index
Next Topic

Tweet

Preview

Moderator:  Acumowchek, MacGizmo, Reboot 
Print Topic
Switch to Threaded Mode
Publications, Articles and Industry Discussion
   »MacTech/MacNews Article Discussions
   »Apple World
Marketplace
   »Deals and Special Offers
      »Expired Offers
   »Trading Warehouse
Mac
   »Hardware
   »Software
   »Servers, Security, and Networking
   »Programming, Web Dev & Scripting
   »Windows and Virtualization
   »Cloud and Online Services
Mobile Technologies
   »iPhone Apps, AppStore, and iTunes
   »iPad, iPhone, iPod and Apple TV Hardware
Mods and Hacks
   »General Mods
      »Techniques
      »Miscellaneous
      »Mod Logs
   »Laptop Mods
      »Case Mods
      »Hardware Mods
      »Misc. Mods
   »Desktop Mods
      »Case Mods
      »Hardware Mods
      »Misc. Mods
   »Peripheral Mods
      »iPod Mods
      »Misc Mods
   »Software Hacks & Mods
General Discussion
   »Site Feedback & Issues
   »Stan's Lounge
   »Soapbox
Now Software Support
   »Announcements
   »Now X
      »FAQs
      »Discussion
   »Now Up-to-Date & Contact
      »Community Help
      »Tips and tricks
View profile
Send a PM
Add to your Watched Users
View posts
View profile
Send a PM
View homepage
Add to your Watched Users
View posts
View profile
Send a PM
View homepage
Add to your Watched Users
View posts
View profile
Send a PM
Add to your Watched Users
View posts
View profile
Send a PM
View homepage
Add to your Watched Users
View posts
Board Rules · Mark all read
Contact Us · AppleCentral · Top

MacTech Only Search:
Community Search:

 
 
 

 
 
 
 
 
  • SPREAD THE WORD:
  • Slashdot
  • Digg
  • Del.icio.us
  • Reddit
  • Newsvine
  • Generate a short URL for this page:



AppleCentral. www.applecentral.com
Main office: 805-494-9797
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.
Generated in 0.041 seconds in which 0.030 seconds were spent on a total of 13 queries. Zlib compression enabled.
Powered by UBB.threads™ PHP Forum Software 7.5.8