I've looked through related posts and their suggested solutions (here and here) but they don't seem to help in my situation.
I'm running MacPorts 2.1.2 on Snow Leopard, and I've got the following packages installed:
php5-mysql @5.3.15_0+mysql5 (active)
php5 @5.3.15_0+apache2 (active)
mysql5 @5.1.63_0 (active)
mysql_select @0.1.2_0 (active)
apache2 @2.2.22_2+preforkmpm (active)
I can point my web browser at localhost and it will connect to the default site; a test index.php
<?php phpinfo() ?>
page works fine as well, so I assume at this point that PHP is functional. The problem is connecting to the installed MySQL server. Neither phpmyadmin nor Joomla can seem to connect, and trying a .php test script resulted in problems too. I'm a bit at loss as to how to proceed from here.
The MySQL server is apparently running:
~ > ps ax | grep mysql
10884 ?? S 0:00.03 /bin/sh /opt/local/lib/mysql5/bin/mysqld_safe
10930 ?? S 0:07.66 /opt/local/libexec/mysqld --basedir=/opt/local --datadir=/opt/local/var/db/mysql5 --user=_mysql --log-error=/opt/local/var/db/mysql5/tigger.local.err --pid-file=/opt/local/var/db/mysql5/tigger.local.pid
and I am able to use the mysql client:
~ > mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 5.1.63 Source distribution
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| test |
+--------------------+
2 rows in set (0.04 sec)
mysql> show grants for 'root'@'localhost';
+---------------------------------------------------------------------+
| Grants for root@localhost |
+---------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION |
+---------------------------------------------------------------------+
1 row in set (0.00 sec)
There's the socket
~ > ll /opt/local/var/run/mysql5/mysqld.sock
srwxrwxrwx 1 _mysql admin 0 Jul 31 16:55 /opt/local/var/run/mysql5/mysqld.sock
and the php.ini contains the MySQL module and configuration
~ > /opt/local/bin/php -i | grep mysql | grep socket
mysql.default_socket => /opt/local/var/run/mysql5/mysqld.sock => /opt/local/var/run/mysql5/mysqld.sock
mysqli.default_socket => no value => no value
pdo_mysql.default_socket => /opt/local/var/run/mysql5/mysqld.sock => /opt/local/var/run/mysql5/mysqld.sock
It all seems to me as this is how things should be. However, when I try to log into phpmyadmin using 'root' the connection fails, and the same happens during Joomla setup.
Any help, hints, suggestions are appreciated :-)