Cannot log into phpmyadmin

Ryan Schmidt ryandesign at macports.org
Sat Jun 15 17:15:05 PDT 2013


On Jun 15, 2013, at 11:21, Rodolfo Aramayo wrote:

> I am having trouble figuring out the following:
> 
>  Following the instructions posted in: http://trac.macports.org/wiki/howto/MAMP
> 
> I was able to successfully install everything and get everything working perfectly
> 
> Basically I was able to see:
> 
> localhost
> localhost/phpinfo.php
> localhost/phpmyadmin
> localhost/mywebsite1
> localhost/mywebsite2
> 
> Using phpmyadmin i was able to create databases and users correctly

Ok, so at this point in time you knew a MySQL username and password that allowed you to log in.


> I then activated Include conf/extra/httpd-vhosts.conf in the httpd.conf and in the httpd-vhosts.conf I configure a virtual host which works well
> 
> Days later I tried to access phpmyadmin and while I can see phpmyadmin well but I cannot log into it using usernames and passwds I know are correct
> 
> Using the same usernames and passwds I can successfully log into mysql via terminal

I'm assuming your MySQL server is on the same machine as your web server and that you're therefore trying to talk to the MySQL server using a UNIX socket. If that's not so, let me know.

Perhaps there is a mismatch between where the MySQL server stores its socket file and where you've configured PHP to look for it. Have you changed where MySQL stores its socket, by editing the my.cnf file? If so, make the same change in the php.ini and/or the phpmyadmin config file.

Which PHP port are you using: php5, php53, php54, php55?

Which variant of the php5*-mysql port is installed? If mysqlnd, have you followed the instructions, e.g.:


$ port notes php54-mysql
php54-mysql has the following notes:
  To use mysqlnd with a local MySQL server, edit /opt/local/etc/php54/php.ini and set mysql.default_socket, mysqli.default_socket and pdo_mysql.default_socket to the path to your MySQL server's socket file.
  
  For mysql5, use /opt/local/var/run/mysql5/mysqld.sock
  For mysql51, use /opt/local/var/run/mysql51/mysqld.sock
  For mysql55, use /opt/local/var/run/mysql55/mysqld.sock
  For mariadb, use /opt/local/var/run/mariadb/mysqld.sock
  For percona, use /opt/local/var/run/percona/mysqld.sock


> Similarly, I cannot access:
> 
> localhost/phpinfo.php

Why not? What happens?


> If I turn conf/extra/httpd-vhosts.conf in the httpd.conf off I can now see the display of localhost/phpinfo.php,

What strange directives are in httpd-vhosts.conf that are causing that?


> but still cannot log into phpmyadmin
> 
> I tried re-installing phpmyadmin to no avail



More information about the macports-users mailing list