I am programming an application by using the Slim Framework in PHP and MySQL. I am on Mac OS X and using XAMPP.
I have tried this solution but no luck.
In my phpmyadmin I have the root user's servers in the three modes:
- %
- linux
- localhost
This is the code of configs to connect to the database:
'db' => [
'driver' => 'mysql',
'host' => '127.0.0.1',
'name' => 'rl',
'username' => 'root',
'password' => 'the_password',
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => ''
],
Any ideas to fix this?
FIXED
I changed 127.0.0.1
for localhost
and now it works!
Now the question is, how can i make it work by using 127.0.0.1
?