Hello,
Just reinstalled / upgraded a Fedora Core server with FC 21, MySQL 5.7.7 and PHP 5.6.8. After the installation I restored a database and added/granted access to the neccessary users.
But when running a PHP script in CLI mode I'm not able to connect to the database using mysql_connect. It say "Permission denied".
but using 'mysql -h <host> -u <user> -p <database>' on the same machine gives me the access.
(<host>, <user>, <database> and the password is the same as
Any suggestions how to fix this?
mysql> grant all privileges on foobar.* to 'foo'@'localhost' identified by 'someSecretPassword';
mysql> flush privileges;
In the PHP script:
$con = mysql_connect("localhost", "foo", "someSecretPassword");
// here it fails with "Permission denied".
$ mysql -h localhost -u foo -p foobar
Password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 49
Server version: 5.7.7-rc-log MySQL Community Server (GPL)
...