• Resolved Robert Vogel

    (@rovowp2)


    Hi,
    I am using XAMPP for having WordPress on local host.
    I had a problem with MySQL shutdown unexpectedly. I solved the problem by going to C:\xampp\mysql\data. I renamed the data folder, then I created a new data folder and copied all files from the backup folder to this new data folder. After that MySQL could be started again in XAMPP.
    However, when I now try to access WordPress as before via https://localhost/name/wp-admin/, then I get an Error message Can’t select database.
    Please could anyone help me to re-establish the connection?
    Thanks a lot in advance and best regards,
    Robert

    • This topic was modified 4 years, 2 months ago by Yui. Reason: moved to "localhost installs"
Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @rovowp2

    tried to access your phpmyadmin to see if the database exists? Otherwise, you will have to create another database if you are looking at something like the attached image.

    Thread Starter Robert Vogel

    (@rovowp2)

    Hi,
    Thanks for the reply. I compared the new data folder with the old one. In the old data folder there is a folder named wpdata and this folder is missing in the new data folder.
    I copied it to the new data folder, but now the system wants me to install WordPress angain and the come many error messages. So, how I can manage this?

    Thread Starter Robert Vogel

    (@rovowp2)

    Hi,
    Now I also copied the log files from the old data folder to the new one. The result is that I can access the dashboard again. If I click Edit on a page, it opens up, but I can’t update it. The message is: Updating failed. The response is not a valid JSON response. When I click View on the page, then I get the message: Not found.The requested URL was not found on this server.
    How can I fix these last issues?

    “When I click View on the page, then I get the message: Not found.The requested URL was not found on this server ”

    try to update the URLs using Settings >> Permalinks to see if it solves the problems with the url

    Thread Starter Robert Vogel

    (@rovowp2)

    When I logged in, there was a WordPress update. After doing this update, everything worked well again.

    Nevertheless, thank you very much for your kind support!

    Perfect. ??

    Then you can put the post as resolved

    Thread Starter Robert Vogel

    (@rovowp2)

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Cannot select database in localhost’ is closed to new replies.