cannot connect to MySQL server (HY000/2002)
Seen that you changed in config.inc.php:
localhost
to 127.0.0.1
Well you could try not doing it by just adding the port-number where the mysql runs like in the example below:
$cfg['Servers'][$i]['host'] = 'localhost:3306';
Actually, I too had same problem and tried as you did which is ultimately answered everywhere in different forums.
Finally, I tried the above and worked for me. hopefully, it does work for you as well.
Good luck!
Getting error mysqli::real_connect(): (HY000/2002): No such file or directory when I try to access my project on live server
MySQL connection driver does not get any meaningful server at the location of localhost. So use,
'hostname' => '127.0.0.1'
rather than
'hostname' => 'localhost'
Related Topics
PHP String Manipulation: Extract Hrefs
How to Query All the Graphql Type Fields Without Writing a Long Query
Design Patterns: How to Create Database Object/Connection Only When Needed
Laravel Mail: Pass String Instead of View
How to Customize Fos Userbundle Urls
Can't Find Fulltext Index Matching the Column List (Indexes Is Set)
Getting All Values from H1 Tags Using PHP
Add Http:// Prefix to Url When Missing
PHP Crop Image to Fix Width and Height Without Losing Dimension Ratio
Sort Array in PHP by Value and Maintain Index Association
PHP - Extracting a Property from an Array of Objects
Simple PHP Form: Attachment to Email (Code Golf)
Category Hierarchy (Php/Mysql)
Fatal Error: Out of Memory, But I Do Have Plenty of Memory (Php)