image
image

Go Back   macosx.com > Design, Media, Programming & Scripting > Design & Media

Reply
 
Thread Tools
  #1  
Old November 29th, 2002, 08:42 PM
Reloaded
 
Join Date: Oct 2002
Location: I'm not really here.
Posts: 760
Thanks: 0
Thanked 0 Times in 0 Posts
MacLuv is on a distinguished road
PHP & mySQL revisited: Help needed

Hi

I've just installed PHP and mySQL on OS X so that I can use Dreamweaver MX on my local machine to create dynamic web pages before sending them to my live server.

I know there's a script I have to install if I want to start mySQL at bootup... I haven't done that yet.

Do I need mySQL and PHP to be running when I access them from Dreamweaver MX? Or will Dreamweaver access them automatically?

How to I know if mySQL is running? I try the "top" command and see mysql and mysqld. I don't see httpd for PHP.

How do I start both manually?

Am I correct in assuming that PHP doesn't have to have a daemon running all the time, it just gets accessed when needed?

Thanks in advance for all your help.

Reply With Quote
  #2  
Old November 29th, 2002, 10:05 PM
kendall's Avatar
Banned
 
Join Date: Aug 2002
Posts: 1,089
Thanks: 0
Thanked 0 Times in 0 Posts
kendall is on a distinguished road
The URL below should answer any MySQL and PHP questions you may have.

Never run Dreamweaver MX, can't help you there.

http://www.entropy.ch/software/macosx/mysql/
Reply With Quote
  #3  
Old November 30th, 2002, 04:16 AM
Reloaded
 
Join Date: Oct 2002
Location: I'm not really here.
Posts: 760
Thanks: 0
Thanked 0 Times in 0 Posts
MacLuv is on a distinguished road
thanks for the reply itanium... unfortunately i've been to marc's site many times and haven't been able to find answers for the direct questions i'm looking for..

Have you installed PHP or mySql on OSX yet?
Reply With Quote
  #4  
Old November 30th, 2002, 08:49 AM
uoba's Avatar
Re: member
 
Join Date: Aug 2001
Location: Merseyside, UK
Posts: 1,726
Thanks: 0
Thanked 0 Times in 0 Posts
uoba is on a distinguished road
Hi Macluv

Okay, MySQL will stop working upon a Restart or Shutdown, therefore you will have to start it up once your machine has started-up. Once it's running (MySQL), it'll stay running until you turn off/restart your machine, or it crashes...

I presume you've already installed the MySQL package from entropy.ch?

Anyway, once it's running it'll stay running... if you want to start it up, do the following in the terminal:


cd /usr/local/mysql

sudo ./bin/safe_mysqld --user=mysql &

Occassionaly, I cannot start the mysql daemon with the sudo command in front of the ./bin etc... therefore do the following instead:


cd /usr/local/mysql

sudo -s

Enter your root password here

./bin/safe_mysqld --user=mysql &

A quick scroll of info should happen; if all goes well, type:

exit

Make sure you exit since you'll be logged-in as root!

To test if it works, type: mysql in the terminal, this'll log you into MySQL from the command line (type exit to get out of it)...

A quick point, your root user for MySQL has no password initially, so make sure to figure this out (see www.entropy.ch for references).


As for PHP, once installed, it'll work whenever Apache is running, since it is only a module for Apache... I presume that you are running Apache for web serving all the time (at least for testing).



Reply With Quote
  #5  
Old December 2nd, 2002, 10:41 AM
billbaloney's Avatar
House pianist
 
Join Date: Oct 2000
Location: Brooklyn, NY
Posts: 509
Thanks: 0
Thanked 0 Times in 0 Posts
billbaloney is on a distinguished road
It is possible, as with just about any application, to have a working startup script for MySQL. Apple and other sites (probably including MacOSX.com, if you take a look around) have primers on how to write startup scripts.

I believe Marc at Entropy provides a startup script. A script I'd acquired previously from someone, maybe Marc, failed in Jaguar. The guts of the working script that I have goes like this:

cd /usr/local/mysql
./bin/safe_mysqld &

This is assuming that you have a /usr/local/mysql.

A previous command, which was no longer working after a few MySQL and OS X updates, was this:

/usr/local/share/mysql/mysql.server start

safe_mysqld is, as it says, a safe way to start up the daemon: the script makes several different checks to make sure there aren't any other MySQL instances running on the system, and starts the server as the mysql user.

For more on startup scripts, do a quick search on this site.
__________________
Matt (billbaloney)
1.67GHz "October 2005" G4 Aluminum 1.5 GB RAM, OS 10.5.2
Lots of other things around
Helen Marie
Holford Industries
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP / MySQL Nynaeve Mac OS X System & Mac Software 6 December 21st, 2005 04:59 PM
Problem with MySQL and PHP dlloyd Design & Media 7 March 21st, 2003 09:03 PM
PHP + MySQL running but not ZLIB lashampoo Mac OS X System & Mac Software 2 October 8th, 2001 05:58 PM


All times are GMT -5. The time now is 04:20 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.