Comment 15 for bug 456674

Revision history for this message
Ricalsin (rcs) wrote :

I struggled with this before finally solving it, so take my notes with the understanding that I'm still blurry eyed:

I followed the instruction using synaptic and verified that php5 was loaded through the localhost/testing.php phase.
Next, loaded mysql USING the "mysql-server" package that "... is an empty package that depends on the current "best" version of mysql-server (currently mysql-server-5.1), as determined by the MySQLmaintainers. Install this package if in doubt about which MySQL version you need." Which, is mistake #1 -> just go to mysql-server-5.1 (as of today) and let it grab the dependencies.

I never checked the status of the mysql server before installing phpMyAdmin and that could have been one problem (as I was surprised at one point to find it off). It needs to be on.

Another problem was the installer that was trying to setup the sockets between mysql and phpMyAdmin (below). The installer was also trying to setup a database as some sort of initial db -> which, I'm not sure why that's needed (unless some people don't know how to set up a database, which is maybe intended for first timers). I finally said "no" and that seemed to help get through the installer.

The socket issue #1: By default the socket (mysqld.sock) is located at /var/run/mysqld/mysqld.sock but (I THINK) that file is non-existent when mysql is not running; at least, it was non-existent for me until I finally un-installed both mysql and phpMyAdmin again and then rechecked the mysql status before installing phpMyAdmin - it finally was there. Prior, it was not. Not exactly what solved it, but it definitely needs to be there before installing phpMyAdmin.

The socket issue #2: The "my.cnf" located at etc/mysql/my.cnf needs to have these lines:

[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock

..and it did for me. But it's mate, located in the php.ini file was missing this path. Find the php.ini file at etc/php5/apache2/php.ini and look for this section:

; Default port number for mysql_connect(). If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
; at MYSQL_PORT.
; http://php.net/mysql.default-port
mysql.default_port =

; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
; http://php.net/mysql.default-socket
mysql.default_socket =

...for me, both the port number (3306) and the path for the default port (/var/run/mysqld/mysqld.sock) were missing and needed to be installed manually.

You may need to restart the apache server. But you will definitely need to clear your browser's cookies and cache in order to login in to the phpMyAdmin interface (http://localhost/phpmyadmin)

In my view, the phpMyAdmin needs to check to make sure the mysql status is running. The installer needs to write the path and port of the socket in the php.ini file. And maybe the concern imposed by the installer to choose the creation of a database should be less - cause things went smooth after I just bypassed it.

(BTW: I've seen the non-Microsoft side of life. And I want to thank all who have been here waiting for me. It's been too long. And I love you.)