The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - General (http://hintsforums.macworld.com/forumdisplay.php?f=16)
-   -   Tiger: php & mysql (http://hintsforums.macworld.com/showthread.php?t=39250)

vancenase 05-09-2005 10:20 AM

Tiger: php & mysql
 
So what are the easiest ways of installing php & mysql under Tiger? Should I compile w/ Fink?

seagull 05-09-2005 12:08 PM

Hi,
I would recommend doing some searching first. There are a lot of guides out there on how, and in what order, to install php and mysql. If you are new to these tools, as I was when I installed it, my best advice would be to read as much documentation as your patience will allow :o before starting to install.

-seagull

perryjohnson 05-09-2005 12:33 PM

Marc Liyanage has PHP and links to MySQL
 
This gentleman has made packages for PHP 4 and PHP 5 that work fine on Tiger. I'm using the PHP 5 package right now on Tiger. Marc used to make MySQL packages, but the company behind MySQL now makes packages for MacOS X. I'm also running their MySQL package on Tiger and it runs fine.

Here is the link:
http://www.entropy.ch/software/macosx/welcome.html

seagull 05-09-2005 01:40 PM

I agree with perryjohnson, I just checked and this was in fact the link that I jused when I installed php + mysql over a year ago (I don't use it very much so I forgot). Before that I had tried using Fink, but I found the packages and install instructions on the linked website to be much more straight-forward.

-seagull

sailgreg 05-09-2005 09:04 PM

Quote:

Originally Posted by vancenase
So what are the easiest ways of installing php & mysql under Tiger? Should I compile w/ Fink?

I am using the version of php4 that is included with tiger along with MySQL 4.1 from the offical mysql site. Works perfectly, and does exactly what I need.

guardian34 05-10-2005 10:01 AM

I use the official MySQL package with Marc Liyanage's PHP 5 package.

carouzal 05-10-2005 10:08 AM

The latest 10.3 build from mysql.com works for me along with the php5 from entropy.ch as stated above... I would also grab phpMyAdmin as well. You can google for that.

Jamin42b 05-13-2005 09:06 PM

Does the preference pane freeze in tiger for anyone else?

carouzal 05-13-2005 09:12 PM

I havnt used it... been starting it by hand.. kind of a pain but I figured I would wait for auto starts until they at least release an update that is for tiger

vancenase 05-13-2005 10:22 PM

does one of the above builds add a preference pane for mysql? i compiled & installed from fink w/ no problems. i've been starting by hand as well, but there was a previous hint on the main page on setting mysql up as a 'startup service' of some sort. i'll have to dig that out again.

carouzal 05-13-2005 10:28 PM

The installer package from mysql.com (official) has a startup item and pref pane with it... Tiger uses launchd which seems to be the way to go... I just havnt had time to play with it yet... I believe startup items still work for now but it's not the apple recomended way...

vancenase 05-13-2005 10:30 PM

that sounds fun. but it freezes for you?

vancenase 05-13-2005 10:33 PM

i just visited the download page. i only saw official downloads for 10.2 and 10.3. could it be these installers are not fully compatible w/ 10.4?

carouzal 05-13-2005 10:49 PM

I have the one for 10.3 installed on my PowerMac and iBook both running tiger with no issues.... But, I did not install the Pref Pane or Startup Item... Everything else worke perfect...

jamie 05-15-2005 11:17 AM

Quote:

Originally Posted by vancenase
i just visited the download page. i only saw official downloads for 10.2 and 10.3. could it be these installers are not fully compatible w/ 10.4?

I saw the same as well. I grabbed th 10.3 one, on the day Tiger came out, and it did not work. From comments above it seems that people have gotten this to work. So either, something odd happened for me, or the MySQL peeps silently updated the installer and didn't mention it anywhere.

I was able to get PHP and MySQL working togeter on Tiger, but phpMyAdmin didn't work due to the Tiger PHP being built with a MySQL client API < 4.1.x.

If anyone cares to see the 'long way' to get this working, I threw up some instructions (based on the Apple Developer PHP page, which is now out of date) at http://blog.360.yahoo.com/jamie_young

~jamie

south 05-21-2005 12:24 PM

Quote:

Originally Posted by jamie
I was able to get PHP and MySQL working togeter on Tiger, but phpMyAdmin didn't work due to the Tiger PHP being built with a MySQL client API < 4.1.x.

If anyone cares to see the 'long way' to get this working, I threw up some instructions (based on the Apple Developer PHP page, which is now out of date) at http://blog.360.yahoo.com/jamie_young

~jamie

Jamie - Thank you! I've been haphazardly trying to get phpmyadmin installed along with mysql but couldn't do it. I did have to throw in a sudo here and there but your instructions were very clear and worked beautifully. One quick tweak to the phpmyadmin config file and I'm off and running! Many thanks (I would have added a blog comment but don't want to wrestle with yahoo 360 atm)

drumbum 06-02-2005 08:51 PM

Thanks Jamie for posting such detailed instructions! It helped me alot, although I am still having some problems. After completing all the instructions listed on your blog, I tried to use phpMyAdmin to set up some databases...

#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

I checked within the config.inc.php file to make sure it had the right host... but I dont know why it isnt working. Any help would be greatly appreciated!

jamie 06-02-2005 10:45 PM

Quote:

Originally Posted by drumbum
#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)


Check if you can connect to mysql via Terminal. I suspect it did not start up correctly.

Something like the following:
Code:

$ mysql -u root -p mysql
If you can connect there, then it is, in my opinion, something in phpmyadmin that is not right. If you can not connect there, then we know that mysql didn't start up correctly.

Glancing over my initial instructions, I think I messed up the line to start up mysql (D'oh), when you start up mysql, try the following:
Code:

$ sudo /sw/bin/mysqld_safe &
Hope that helps ~jamie

drumbum 06-03-2005 11:02 AM

Using the first line of code
Quote:

Code:

$ mysql -u root -p mysql
I get a command not found error. (Should I modify my .cshrc file to add additional paths to my environmental path variable?)


Quote:

Code:

$ sudo /sw/bin/mysqld_safe &
Starts up MySQL and have confirmed that it is still a running process. I tried opening phpMyAdmin at the point and received the same #2002 error. :confused:

jamie 06-03-2005 12:17 PM

Quote:

Originally Posted by drumbum
Using the first line of code

I get a command not found error. (Should I modify my .cshrc file to add additional paths to my environmental path variable?)


Yeah, you want to make sure that you have /sw/bin in your path after installing Fink. You also want to make sure that you are calling /sw/bin/init.csh in your .cshrc. That should set the path right. I didn't refer to that on my blog entry cause I use bash, which requires init.sh.

~jamie

sailgreg 06-04-2005 06:27 PM

I made a LaunchDaemon file for MySQL which works as a replacement for the StartupItem on Tiger. Save it as com.mysql.database.plist in /Library/LaunchDaemons and run 'sudo launchctl load /Library/LaunchDaemons/com.mysql.database.plist' or reboot to load MySQL.

PHP Code:

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 
<plist version="1.0"> 
<dict> 
   <key>Label</key> 
   <string>com.mysql.database</string> 
   <key>OnDemand</key> 
   <false/> 
   <key>ProgramArguments</key> 
   <array> 
      <string>/usr/local/mysql/bin/mysqld_safe</string> 
   </array> 
</dict> 
</plist>

I use MySQL 4.1 from the official site, you can change the path to make it load a version compiled with DarwinPorts or Fink.

vancenase 06-04-2005 06:44 PM

i just found this gem on the main site: http://www.macosxhints.com/article.p...31212142956308

Code:

daemonic install MySQL
now a fink installed mysql automatically starts on boot!

sailgreg 06-04-2005 07:20 PM

Quote:

Originally Posted by vancenase
i just found this gem on the main site: http://www.macosxhints.com/article.p...31212142956308

Code:

daemonic install MySQL
now a fink installed mysql automatically starts on boot!

The code I posted in the post above yours is a better way of doing it. Just change /usr to /sw to use the the version of mysql compiled with fink. StartupItems are being phased out and being replaced with LaunchDaemons.

smeshy123 07-05-2005 05:35 PM

Sorry for bringing up this old thread, I know its been dead for about a month. But I've done absolutely everything on this thread! (which has been the most informative one out there) and I cannot get PHPMyAdmin to work for anything. I get that error message:

#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

And I'm soo confused. I'm not even sure if MYSQL works properly. I have like 2 versions installed the one under usr and the one under the other directory that is installed with fink. I have no clue how to get anything to work. I also get this error on my actual web page as opposed to just PHPMyAdmin:

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)

Any help would be much appreciated.

Thanks a bunch!

Smesh

bhedana 09-19-2007 03:56 PM

if you CAN connect to mysql via terminal but not from phpmyadmin then chances are php can't locate your mysql.sock file...

set the path to the socket in your php.ini file and restart apache and you should be golden

J_T 09-20-2007 08:31 PM

first things first make sure the fink installed mysql is running try using this command

ps -aux | grep mysqld

see if it returns an instance of mysqld running out of the fink folder ../sw/ I beleive. If the correct one is running then, like bhedana says, make sure your php.ini is set to look for the mysql socket. It shoud look something like this.

mysql.default_socket =/tmp/mysql.sock

acme.mail.order 09-21-2007 06:13 AM

bhedana and J_T:

The first thing both of you should do is check the post dates - this one seems to be finished back in 2005, and they've probably either solved it or given up by now :rolleyes:


All times are GMT -5. The time now is 06:22 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.