• I’m trying to correctly setup a MySQL database and edit wp-config.php to install WP on my 123Reg domain.
    None of the many articles or videos I’ve found are solving my problem.

    When I entre my website’s URL into a browser I get the following message:
    Error establishing a database connection

    This is what I’ve done so far:
    (Some names and numbers have been changed in case it makes any difference to security.)

    In the MySQL page on 123Reg I’ve created a new user.
    Name : WPuser
    Password : ThisIsNotMyRealPW

    This seemed to create a database with the following details:
    Server : 35.21.239.28 (internal: 11.17.26.5)
    username : WPuse-b7g-w-056480
    (This confuses me because the Username is not WPuser.)

    Moving over to the wp-config.php file, I know I need to edit the following information:
    /** The name of the database for WordPress */
    define(‘DB_NAME’, ‘WPuser’);
    /** MySQL database username */
    define(‘DB_USER’, ‘WPuser’);
    /** MySQL database password */
    define(‘DB_PASSWORD’, ‘ThisIsNotMyRealPW’);
    /** MySQL hostname */
    define(‘DB_HOST’, ‘localhost’);

    I’ve tried various combinations of DB_NAME and DB_USER; both WPuser and WPuse-b7g-w-056480
    Looking at 123Reg’s support pages, I’ve found som informaion that DB_HOST should perhaps be cust-mysql-123-02 or cust-mysql-123-03 or cust-mysql-123-04 or cust-mysql-123-05 or atlas-sql-07, but I think localhost is right.

    Nothing I’ve tried so far works.
    Can anyone tell me what I’m getting wrong please?

    • This topic was modified 9 years, 7 months ago by eyeghoti.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    1. You should contact tech support for your host as they have this information at their fingertips.

    2. This script gives you more useful errors that “could not connect”: https://gist.github.com/sivel/162913

    Thread Starter eyeghoti

    (@eyeghoti)

    Thanks.
    As my host are out of the office until I’m back in it, I was hoping someone here could help over the weekend.

    In the meantime, the comment that follows the script suggests it no longer works.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Well, try the host names you found in the docs. There’s no one at your host manning the phones or online chat? Yeah, I just looked. Monday through Friday, business hours only. You might consider finding a different host!

    Thread Starter eyeghoti

    (@eyeghoti)

    I’ve tried all the host names.

    The details they provide do look pretty confusing.

    It’s worth trying the database server IP address they provide in place of ‘localhost’ in define(‘DB_HOST’, ‘localhost’);. The database may be on a different server to your site files, in which case ‘localhost’ won’t work.

    I’d try 35.21.239.28 followed by 11.17.26.5

    Thread Starter eyeghoti

    (@eyeghoti)

    DavidCW – solvedwith ypur suggestion. Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘123Reg, MySQL, wp-config.php’ is closed to new replies.