Setup:
- Debian Jessie
- mysqld 5.5.46-0+deb8u1
- nginx 1.8.0 from dotdeb.org
- php-fpm 7.0.0 RC7 from dotdeb.org
- phpMyAdmin 4.5.2
I recently upgraded to PHP 7.0 RC7 on my development linux box.
Since then, phpMyAdmin is only throwing "Cannot log in to the MySQL server" as well as "Connection for controluser as defined in your configuration failed." without further message, error number or details.
I was not able yet to trace any more information out of this WHY the connection fails (the highly abstracted classes from phpMyAdmin makes it hard).
Any hint on how to get more information out of phpMyAdmin is much appreciated.
- The MySQL server is running
- I can login on the terminal with the mysql and mysqladmin command
- I tried to reset and refresh the MySQL passwords
- My GOGS instance can access it
- A quick self made php script can use it as well (using mysqli).
- I tried socket-based as well as tcp-based access in phpMyAdmin
- I tried config-based and http-based authentication with same result
Relevant configuration below:
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '/var/run/mysqld/mysqld.sock';
$cfg['Servers'][$i]['connect_type'] = 'socket';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['ssl'] = true;
And here is my test script which works fine:
<?php
$_dbHost = 'localhost';
$_dbUser = 'root';
$_dbPass = 'mysupersecretrootpassword';
$_dbName = '';
$_dbPort = 0;
$_dbSock = '/var/run/mysqld/mysqld.sock';
$mysqli = new mysqli($_dbHost, $_dbUser, $_dbPass, $_dbName, $_dbPort, $_dbSock);
if ($mysqli->connect_errno) {
echo "Error: Failed to make a MySQL connection, here is why: \n";
echo "Errno: " . $mysqli->connect_errno . "\n";
echo "Error: " . $mysqli->connect_error . "\n";
exit;
} else {
echo "Connection Successfull";
$dbList = $mysqli->query('show databases;');
echo "<pre>";
var_dump($dbList->fetch_assoc());
echo "</pre>";
}
?>

所有评论(0)