Support » Installing WordPress » Can’t access database… but Database is ok.

  • Hi all,

    I’ve downloaded 1.5 and my wp-config.php is as follows:
    define(‘DB_NAME’, ‘pocm’);
    define(‘DB_USER’, ‘pocm’);
    define(‘DB_PASSWORD’, ‘********’);
    define(‘DB_HOST’, ‘sat’);

    However, when I run install.php, insert blog name and my email I get a report of the queries done to DB and all of them fail with errors like the following:

    WordPress database error: [Access denied for user: ‘@sat’ to database ‘pocm’]

    However, my user is not ‘@sat’. It is defined as ‘pocm’ in wp-config.php. Is it confused due to the fact that the database and username are equal?


    Paulo Matos

Viewing 6 replies - 1 through 6 (of 6 total)
  • Not at all…. Check your settings for your user, make sure the user has been GRANTed access to the database.


    hmm… is the host name suppose to be “define(‘DB_HOST’, ‘sat’);” or localhost?

    “localhost” should work. Try it. It won’t hurt!

    sat is the same as localhost so if I try it I just get the same error but instead of ‘@sat’ I get ‘@localhost’. Well, I’ll check permissions…

    It seems everything is ok.
    Check the following interaction:
    $ mysql -h sat -u pocm -p
    Enter password: **********
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 39 to server version: 4.0.15-standard

    Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

    mysql> USE pocm;
    Database changed
    mysql> SHOW TABLES;
    Empty set (0.00 sec)

    mysql> CREATE TABLE test ( ID int(11) NOT NULL auto_increment, PRIMARY KEY (ID)) TYPE=MyISAM;
    Query OK, 0 rows affected (0.02 sec)

    mysql> SHOW TABLES;
    | Tables_in_pocm |
    | test |

    1 row in set (0.00 sec)

    So, it seems I do have permissions. Why is the error? Anyway to debug the info sent to the server by wordpress?

    Forgot to refer that I also have:
    define (‘WPLANG’, ”);
    i.e. WPLANG is empty. Is there a problem with it?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can’t access database… but Database is ok.’ is closed to new replies.