Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jbdegarmo

    (@jbdegarmo)

    I tried that already. It doesn’t matter if I use “localhost” or “localhost:3306” for the DB_HOST. MAMP has 3306 as the default MySQL port. When I log into PHPMyAdmin the database host is “localhost:3306”. I’ve even tried making sure that the PHP.ini file has 3306 as the default – same error whether that value is blank or with 3306.

    I first noticed then after setting up a fresh WP install. After installing the theme, the WP Site Health page mentioned that I should upgrade to at least PHP 7.3. When I set it up in MAMP, it was using 7.033. So, I tried switching from 7.033 to 7.42 and restarting Apache/MySQL and that’s when the error appeared. I checked several other local WP sites and they all did the same thing when switched the PHP version.

    As a test, I completely deleted the new WP install and started from scratch after updating the default PHP Version to 7.42. During the WP install process, I got to the page where you enter the DB credentials, but it failed there with a similar error. At that time the DB Name and DB User were different. I did finally get it to install after setting the DB Name and DB User to be identical. Why is that a requirement for WP install properly to work properly (or for a website upgrading its PHP version)?

    I’m having the same issue with MAMP on a Mac. I’ve checked PHYMyAdmin and the root user and the other user that I set up both have the correct “All Privileges”. I created a test.php script to test my DB credentials and the connection is successful. My issue is that the “no database selected” error displays after upgrading my PHP. If I select any version greater than PHP 7.1.32, I get the error. As soon as I switch it back, the website works. So, I don’t believe that this is a DB issue in my case.

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