Re: Cannot connect to local server
| From: | Dusty Bin | Date: | Thu, 10 Feb 2005 11:36:02 +0000 |
| Subject: | Re: Cannot connect to local server | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-38542@lists.php.net to get a copy of this message | ||
Denis,
try executing the following statement in your mysql client.
grant all privileges on db.* to user@localhost identified by 'pass';
I didn't check the documentation but it seems that localhost is not in the set {%}.
HTH. . . Dusty
Denis Gerasimov wrote:
Hello, I am trying to connect to MySQL using $mysqli = new mysqli("example.com", "user", "pass", "db"); And access is ALWAYS denied (I played around changing user name/pass/host - didn't help me at all) The thing is that I CAN connect to the db server using this user name and password with my DB administration tool. Some background 1. MySQL and Apache + PHP are running on the same machine. 2. The user is allowed to connect from '%' (everywhere) 3. Connecting to localhost fails too (saying "cannot connect to socket...") What is going on? Best regards, Denis Gerasimov Outsourcing Services Manager, VEKOS, Ltd. www.vekos.ru