WordPress.org

Ready to get started?Download WordPress

Forums

Can't access database... but Database is ok. (7 posts)

  1. pmatos
    Member
    Posted 9 years ago #

    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']
    SHOW TABLES;

    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?

    Cheers,

    Paulo Matos

  2. TechGnome
    Moderator
    Posted 9 years ago #

    Not at all.... Check your settings for your user, make sure the user has been GRANTed access to the database.

    Tg

  3. Daynah
    Member
    Posted 9 years ago #

    hmm... is the host name suppose to be "define('DB_HOST', 'sat');" or localhost?

  4. georgianlady
    Member
    Posted 9 years ago #

    "localhost" should work. Try it. It won't hurt!

  5. pmatos
    Member
    Posted 9 years ago #

    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...

  6. pmatos
    Member
    Posted 9 years ago #

    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?

  7. pmatos
    Member
    Posted 9 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.