• Brian TH

    (@brian-th)


    My WordPress site was hacked (despite being kept up to date and regular wordfence scans) and my account suspended.

    I have now installed WordPress in MAMP on my macbook and imported the SQL database xyz123. I have amended wp-admin.php to point to the database.

    But I now get:

    Error establishing a database connection etc.

    User name and password are correct. Hostname is correct at localhost The servers are running (green lights on MAMP.)

    Is there something else I need to change?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Randy Sandberg

    (@randywsandberg)

    Hi Brian, you mean wp-config.php, right? And your settings look something like these:

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'xyz123');
    
    /** MySQL database username */
    define('DB_USER', 'root');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'root');
    
    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    Right? Note that the only bits I know about your setup is that your database name is xyz123 and your hostname is local host. The rest is just default MAMP username/password stuff.

    Hope this helps!

    Randy Sandberg

    (@randywsandberg)

    P.S., It might be a good idea to create a new database and install a fresh copy of WordPress just to be sure the basics are working. ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Not able to get SQL database connection on local install’ is closed to new replies.