mysql access denied after system reboot

  • | 414 points

    I just started using Laragon yesterday to locally stage a clone of my existing Wordpress site. It's working great (SO much better than Local by Flywheel!), except for this one issue...

    Background: I set up my Wordpress site files and database, change the mysql root user password (or not, I've tried it both ways), and I can access my site perfectly (Wordpress talks to the db and my site looks normal, I can access the database in the command line or phpMyAdmin, all good).

    Problem: BUT if I restart my system (Windows 10), the database is no longer accessible: I get "database error" when I visit my local site, and mysql (via command line) and phpMyAdmin both return

    "Access denied for user 'root'@'localhost' (using password: YES)"

    Things I've tried: I've uninstalled and reinstalled Laragon a number of times with various tweaks to try and troubleshoot this issue on my own. Here's what I've tried:

    • leaving the default (blank) mysql password
    • changing the mysql root password through command line
    • changing mysql root password through phpMyAdmin
    • setting the initial mysql password in my.ini
    • changing $cfg['blowfish_secret'] in phpMyAdmin/ (just for the hell of it)

    Note: anytime I change the mysql password, I change the wp-config.php to match.

    Mysql is still accessible when I stop or exit Laragon, then start it back up again, as long as I don't reboot. But as soon as I reboot, mysql is no longer accessible.

    Presumably, the root password is being changed during the reboot. Is this the case? Why is that? And what is the solution?

    Thanks in advance for any guidance you can give!

    -- Will --

Looks like your connection to Laragon was lost, please wait while we try to reconnect.