Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
This morning I got an error from connection.php
My batch program suddenly got following error for 3 times.
2002 - SQLSTATE[HY000] 
No such file or directory
Do you have any suggestion why I am getting this errors?
mysql Ver 14.14 Distrib 5.7.27, for Linux (x86_64)
It means PDO can't connect to the database, so either your DB config is wrong, or your programme can't find the correct config.
Most common error are:
* using a socket while you need to connect to an IP
* using "localhost" instead of 127.0.0.1 (on some platforms)
Thanks for your comments.
However, my batch is up and running without any issue after these errors as well as my front-end app.
My config file seems fine for me.
Here is my config.
'default' => array(
'connection' => array(
'dsn' => 'mysql:host=localhost;dbname=mydb',
'username' => 'username',
'password' => 'password',
This is weird for me.
Does the server run a dual stack, or is IPv6 completely disabled?
If not, change it to
'dsn' => 'mysql:host=127.0.0.1;dbname=mydb',
If you develop on a Mac, you should do the same.
Okay, thanks for that.
I will do it.
Add a Comment
It looks like you're new here. If you want to get involved, click one of these buttons!
Apply for Membership
↳ Job Board
↳ Installation & Setup
↳ Tips and Tutorials
↳ Code share
In this Discussion