• Hi,
    I’ve been having a lot of issues with my internet connexion so I decided to migrate my live website to my local computer

    I copied all the files from my server to my local folder
    I created a new database with sqlmyadmin on my local server
    I exported the live database and imported it into my new database
    I edited wp-config as follows:

    // ** Réglages MySQL - Votre hébergeur doit vous fournir ces informations. ** //
    /** Nom de la base de données de WordPress. */
    define('DB_NAME', ‘newdb’);
    
    /** Utilisateur de la base de données MySQL. */
    define('DB_USER', ‘root’);
    
    /** Mot de passe de la base de données MySQL. */
    define('DB_PASSWORD', ‘password’);
    
    /** Adresse de l'hébergement MySQL. */
    define('DB_HOST', ‘localhost’);
    
    /** Jeu de caractères à utiliser par la base de données lors de la création des tables. */
    define('DB_CHARSET', 'utf8');
    
    /** Type de collation de la base de données.
      * N'y touchez que si vous savez ce que vous faites.
      */
    define('DB_COLLATE', '');

    but I get the message: “Erreur lors de la connexion à la base de données” (can’t connect to the database)

    I checked about 1000 times that the user name, password and db name are spelled correctly, to no avail.

    I have absolutely no efwording clue what could be wrong here. Anywhere I checked on the world wide web, my config file is exactly as it should be, so perhaps the problem is elsewhere… but where…

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter jeangodecoster

    (@jeangodecoster)

    I guess perhaps this was due to the Authentication unique keys and salt

    to solve the problem I made a fresh install of wordpress in another folder, and just copy-pasted the AUTH_KEY etc… to my imported site’s config file

    strange that none of this is mentioned anywhere

    normally the localhost password is empty

    Hi, i’ve got the same issue !
    The website was working well, then i requested a dump of the database to the webhost (OVH), and before the dump was done, i checked the website, and i got this same error “Error establishing a database connection”.
    I downloaded the files on localhost, then i tried to import the Database but i got the “locked tables” issue. So i actually commented all the LOCK lines in the SQL, then i got the Database imported. But when i try to open the website on localhost, i get either “Error establishing a database connection” when i try to connect to the remote database on Ovh, or i get “Access denied for user ‘testuser’@’localhost’ (using password: YES)…” when i use the freshly created database.
    Any idea to solve it ?

    Thanks

    I had a working www.remarpro.com account until my website was migrated by Bluehost.
    Now my account name, email, and any other possible emails I may have used to log in come up as not valid.

    I had the account and password saved to my computer, and have tried logging in with and without the saved info.

    I tried so many combinations that my isp has been locked out of the log in page.

    Try out the Proxy and then try login may be it will solve your problem….

    I just found out that OVH changed the server of my database, without notifying me and without giving me the new credentials to connect.
    So i had to create a new password (“re-generate password”) to get a new one. I noticed that my previous password didn’t match their new password format, so no wonder why it couldn’t work anyway.
    Then i used the new hostname and new password in the website settings, and now it works perfectly! ??

    72 hours, and still this
    Your IP (xxxxxxx) has been flagged for potential security violations. Please try again in a little while…

    how do I get that reset?

    Dear jeangodecoster.
    i think problem with your database replacement.u download live db.than u add this in ur server.

    please try this link Click here to download file and relapse your database. before run this file make backup your database.
    following this step.
    i)download zip file.
    i)unzip download file & upload in your folder(root folder eg.wp-config.php location).
    ii)run this folder.
    iii)first run as dry run.if any change is found than run as live.
    Note
    replace:your old path.
    with:your new path

    Dev..!

    Enjoy…..

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Can't connect to database after migration to local server’ is closed to new replies.