Jump to content

autoloader

New Members
  • Posts

    4
  • Joined

  • Last visited

autoloader's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. The permissions on the mysql.sock file seem to be OK: [root@anakin etc]# cd /tmp [root@anakin tmp]# ls -l m* srwxrwxrwx 1 mysql mysql 0 May 20 12:34 mysql.sock -rw------- 1 mysql mysql 6 May 20 12:34 mysql.sock.lock [root@anakin tmp]# cd / [root@anakin /]# ls -ld tmp drwxrwxrwt. 8 root root 4096 May 20 16:44 tmp
  2. Sorry, php 5.6 as I wrote in my first posting (5.7 was the Mysql version). 127.0.0.1 did work - thanks. Why did I not think about that in the first time. Seems like PHP does not resolve localhost to 127.0.0.1 while in the shell localhost seem to be OK.
  3. This is my code: $dbh = @mysql_connect($dbhost, $dbuser, $dbpass); if (false === $dbh) { $err = @mysql_error(); if ($triggerError) { throw new Exception("Could not connect to db: $err\n"); } } But perhaps you are right. It might be PHP that say I do not have access to mysql_connect! It this a 'new feature' in php 5.7 ??? I have never ever experienced such a problem.
  4. 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) ...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.