Jump to content

Recommended Posts

Posted

Here what I did...

1. Exporting DB from localhost, Created new DB in different name and importing DB.  success

2. Transfer entire PW files from local to host. success

3. Changed config.php

$config->dbHost = 'localhost';
$config->dbName = 'bdgplaye_dbname';
$config->dbUser = 'bdgplaye_user';
$config->dbPass = '**********'; <!-- will not reveal :)
$config->dbPort = '3306';

 Then replace config.php from local with /site/config.php in host. suceess

4. running site from browser and I get an error....

Quote

Fatal error: Exception: SQLSTATE[42000] [1044] Access denied for user 'bdgplaye_user'@'localhost' to database 'bdgplaye_beedee' (in /home1/bdgplaye/public_html/beedee/wire/core/ProcessWire.php line 293) #0 /home1/bdgplaye/public_html/beedee/wire/core/ProcessWire.php(149): ProcessWire\ProcessWire->load(Object(ProcessWire\Config)) #1 /home1/bdgplaye/public_html/beedee/index.php(52): ProcessWire\ProcessWire->__construct(Object(ProcessWire\Config)) #2 {main} in /home1/bdgplaye/public_html/bdgp/index.php on line 64

I am not sure what exactly was the problem but I am guessing it have something to do with config.php? I have tried..

  • change password -- does not solve the problem
  • remove and upload DB again. -- does not solve the problem
  • change $config->dbhost = 'localhost' into $config->dbhost = '127.0.0.1' - does not solve the problem.

Can anyone help with this issue SQLSTATE[42000] [1044].   ? 

Thanks in advance

Posted

Found solution... I had to replace 

$config->dbHost = 'localhost';

into

$config->dbHost = '::1';

The Localhost or 127.0.0.1 didn't work! Werid

Posted

It might be that MySQL and PHP differ in the opinion what localhost should resolve to. If MySQL treats localhost as ::1 (ipv6) and PHP thinks of localhost as 127.0.0.1, that would explain this behavior. Though it's also possible that the user is defined as user@% instead of user@localhost and ipv6 loopback access is treated like a remote access. It's hard to say without taking a peek into the system.

  • Like 4

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...