WordPress.org

Ready to get started?Download WordPress

Forums

problems with wp-config.php !!! (22 posts)

  1. schmuddel
    Member
    Posted 6 years ago #

    hi!

    i downloaded the version 2.5.1
    after reading the install instructions i made this wp-config.php:

    // ** MySQL settings ** //
    define('DB_NAME', 'xxxxx'); // The name of the database
    define('DB_USER', 'wxxxxx'); // Your MySQL username
    define('DB_PASSWORD', 'xxxxx'); // ...and password
    define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value
    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', '');

    loaded this file up to webspace and then tried to run the installation link.
    i always get the error, that user or password is wrong, or the localhost is not connected.
    but the localhost is okay, and the userdata is okay, too!!

    where is the mistake?
    THX

    greetz
    schmuddel

  2. themystical
    Member
    Posted 6 years ago #

    Did you write the database and user name in the format cpaneluser_DBname and cpaneluser_DBuser? (cpanel used here just as example).

  3. Metahuman
    Member
    Posted 6 years ago #

    The new config file has new entries -

    // Change SECRET_KEY to a unique phrase. You won't have to remember it later,
    // so make it long and complicated. You can visit http://api.wordpress.org/secret-key/1.0/
    // to get a secret key generated for you, or just make something up.
    define('SECRET_KEY', 'put your unique phrase here'); // Change this to a unique phrase.

    // You can have multiple installations in one database if you give each a unique prefix
    $table_prefix = 'wp_'; // Only numbers, letters, and underscores please!

    Please check if you are using the right table prefix if you are updating as it may not find the old table and thereby your login id & password.

  4. davidhogg
    Member
    Posted 6 years ago #

    I have the same problem as Scmuddel. I don't understand the reply from TheMystical. It says "#Did you write the database and user name in the format cpaneluser_DBname and cpaneluser_DBuser? (cpanel used here just as example)." What exactly does this mean.\? I have written the database and user name as "dhoggpress" and "davidhogg", which is the way they were given to me by the hosting company. Is this not correct?

  5. whooami
    Member
    Posted 6 years ago #

    davidhogg,

    some hosts (not all) set up cpanel/mysql/etc so that you username is included in the mysql database bits ..

    in other words, if your username is smith1, and you had a database named abc, you would have this inside wp-config.php:

    define('DB_NAME', 'smith1_abc'); // The name of the database

    Its done so that hosts can tell, at a glance, what dbs belong to what users.

  6. davidhogg
    Member
    Posted 6 years ago #

    I get it now. Thanks. I don't think this is the case with my host. Even so, I do not have an explanation of why I get an error message when I try to open the wp-admin/install.php file.

  7. davidhogg
    Member
    Posted 6 years ago #

    OK. I'm not getting any error messages anymore. But when I try the install.php file all I get is a blank screen.

  8. Samgreen
    Member
    Posted 6 years ago #

    I have seen mentions on here of theme incompatibility. Try using a ftp program to rename the theme you are using, wp will then use the default theme. See if the blank page goes away then.

  9. davidhogg
    Member
    Posted 6 years ago #

    OK, thanks, I'll try this approach.

  10. goborobo
    Member
    Posted 6 years ago #

    OK, let's be clear about this:
    There is a clear problem with the WordPress install because:

    1. I can login to the MySQL db as Master User from my host control panel.
    2. I can login to the MySQL db from a web page as an authorized User.
    3. The login line in PhpMyAdmin shows either user @localhost after I've logged in.

    Putting either of these user settings into wp-config.php returns the error:

    "This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost"

    Permissions?

  11. moshu
    Member
    Posted 6 years ago #

    The user has to be added to the database and must have all the privileges.

    Despite what you think... 99.99% of the cases it is a user error in the wp-config file.

  12. whooami
    Member
    Posted 6 years ago #

    its not even 99.99%.

    Its 100%. That file is never wrong :)

  13. goborobo
    Member
    Posted 6 years ago #

    I thought I wrote the description of the problem clearly:

    How could I have logged in by control panel and web page for two different users if I didn't have the details right?

    I've tried them both in the config file, and they both have superuser permissions.

  14. goborobo
    Member
    Posted 6 years ago #

    And the answer is:

    Not 100% of the time. My host requires:

    localhost:/tmp/mysql5.sock

    for MySQL5.

    Always excellent support and great hosting: icdsoft.com

  15. whooami
    Member
    Posted 6 years ago #

    I dont think anyone misunderstood what you wrote.

    Instead of debating that, why not see if you are actually supposed to be using localhost and not an IP or actual hostname.
    Thats where I would start

    The output from that file isnt wrong -- it never is.

    --
    Edit:

    The Previous post to this one was posted before I finished this one.

  16. kmessinger
    Volunteer Moderator
    Posted 6 years ago #

    Do you mind posting your actual config file without the db name, user name, and password?

  17. goborobo
    Member
    Posted 6 years ago #

    Life is short. I generally accept statements like 99.9% as an indication that there would be little point in considering a probability of .01%.
    However, may I suggest that the documentation might include a parenthetical adviso along the lines:
    "If you are certain that you have entered the username and password corrrectly, and are able to connect to the db by other means, check the db hostname."
    But this is trivial and I'm not an argumentative person so in parting let me just say:
    I love WordPress.
    Thank you to everyone who has made it a reality.

  18. moshu
    Member
    Posted 6 years ago #

    Why? The error message told you exactly:

    "This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost"

    If you think you can exclude user/pw as possible error - then the only logical thing is to check out whether "localhost" is OK or not.

  19. goborobo
    Member
    Posted 6 years ago #

    its not even 99.99%.
    Its 100%. That file is never wrong :)

    The instructions did not explicitly suggest checking the localhost parameter.
    And whooami's statement (quoted) is incorrect.
    The documentation would be improved with the removal of 99.9%.
    But hey, you know better right?

  20. whooami
    Member
    Posted 6 years ago #

    Ok, I'll bite. God knows why, but I will.

    What do you think was wrong about the output of the file???

    "This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost"

    It told you the problem.

    It couldnt connect to localhost. Thats because your host/whatever doesnt allow connections to JUST 'localhost'.

    You stated above, that you had to edit that line --

    There nothing wrong in that output. It was spot fucking on.

    --

    I have a better suggestion for that file..

    I think it ought to read "Talk to your host to learn what the values need to be or stick to static HTML".

  21. goborobo
    Member
    Posted 6 years ago #

    its not even 99.99%.
    Its 100%. That file is never wrong :)

    My suggestion for revised wording:

    "If you are certain that you have entered the username and password corrrectly, and are able to connect to the db by other means, check the db hostname."

    Your suggestion:

    "Talk to your host to learn what the values need to be or stick to static HTML".

    "...or stick to static HTML" ? (Luser?)

  22. davidhogg
    Member
    Posted 6 years ago #

    For me the problem is different at this stage. WP does connect to the database server correctly. At least, I assume so, since I get no error messages at all now. But, on the other hand, I get a blank screen. What can I do with that?

Topic Closed

This topic has been closed to new replies.

About this Topic