PHP / MySQL

Nynaeve

Registered
Hi there,

I´m just getting started with Macs and actually I´m a bit desperate trying to get PHP and MySQL working. I´ve already done this on a PC many times without any problems. But on a Mac???

I installed PHP and MySQL like entropy.ch says.

First problem:
Even though I have put ALL error-reporting functions ON in the php.ini, I don´t get any error reports at all. The only thing I get when running a php-file is blank pages, that´s so annoying. PHP seems to be working alright, at least I have no problem running phpinfo.

Second problem:
When I run phpinfo I get the information (in the mysql section) that MySQL didn´t set any user nor host. But I need these to connect to a db. When you install MySQL on a PC these things (User, Host) are set automatically.

I have really tried hard: installed everything again twice, done all the installation-manuals available on the web...

If it is any help to you: I have checked with NetInfoManager that there is an mysql user. I don´t know ANY Unix, but I´m following the installation guides. I understood that I´m supposed to change the password for the mysql user. If I try, I get this:

[MIS-Computer:/usr/local/mysql] inti% sudo chown -R mysql:mysql data
[MIS-Computer:/usr/local/mysql] inti% sudo ./bin/safe_mysqld --user-mysql &
[1] 613
[MIS-Computer:/usr/local/mysql] inti% Starting mysqld daemon with databases from /usr/local/mysql/data
030806 11:52:29 mysqld ended

/usr/local/mysql/bin/mysqladmin -u root password XXXX
/usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
[1] + Done sudo ./bin/safe_mysqld --user-mysql
[Maria-Inti-Metzendorfs-Computer:/usr/local/mysql] inti%

Hope anybody has any hints for me!
 
With regards to MySQL users, obviously you don't want your PHP scripts connecting as root.

What I did was I installed phpMyAdmin and used it to create user accounts.

Did you edit httpd.conf to enable the php file extension?
 
I solved the PHP problem by installing it all over again... Unfortunately this didn´t work with MySQL. I keep getting this error:

[127:/usr/local/mysql] inti% sudo echo

[127:/usr/local/mysql] inti% sudo ./bin/mysqld_safe &
[1] 1311
[127:/usr/local/mysql] inti% Starting mysqld daemon with databases from /usr/local/mysql/data
030806 17:26:27 mysqld ended

/usr/local/mysql/bin/mysql test
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
[1] + Done sudo ./bin/mysqld_safe
[127:/usr/local/mysql] inti%

What am I to do now?

(I´ve already used the CLEANUP Script from entropy.ch and started all over again...)
 
Check the mysql.com documentation about it. Or the docs that the entropy.ch package installs in the mysql directory. Somewhere in there in the install notes, is a thing about what to do if you get "mysql ended". It might actually also be on the bottom of the entropy.ch MySQL page if i remember correctly.
 
Well the only thing that seems to work is unistalling everything and then beginning from scratch. This is what I did and it worked.

Computers can be so capricious sometimes...
 
I seem to remember getting that problem too. I don't remember exactly what I did to remove it, but I think I also had to completely uninstall and start over again.
 
I'm looking for a solution to a Tiger server install that doesn't autolaunch mySQL upon restart of the computer. Are there tools built into the server to set this up via a GUI? Is there some CLI I can use to program this? What a pain to have to log into the server upon restart just to relaunch mySQL for sites.

I found this in another post:

Or just download this package and it will load mysql on startup.
http://www2.entropy.ch/download/mysq...tem.pkg.tar.gz

But am not certain if something that ran in Puma or Jaguar is appropriate for the newer version in Tiger.
 
Back
Top