Tag Archives: mysqli

Upon trying to run some migrations in FuelPHP via command line with Oil I ran into this error message containing the error

Uncaught exception Fuel\Core\Database_Exception: No MySQLi Connection

I discovered that when running from the command line my normal php.ini was not being run. PHP was using the defaults, including the default mysql socket which was in the wrong place.

Solution

In my case I created a symlink to redirect which seems to have done the trick. I am running Mamp on OS X in default locations so your directories may differ.

cd /var/mysql

sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock mysql.sock

There may be a better fix and this may be a symptom of something else being ‘off’. I initially created a /etc/php.ini with the proper socket location directive but this did not work out properly, possibly due to permissions or something.

Dustin Bolton – Software Engineer, Web & WordPress Developer

About Me

I have a degree in Computer Engineering and have excelled at computing from a young age. I enjoy complex problems ranging from software development, customized home renovations, or researching the complexities of biology and researching medical journals for fun. When the weather is nice I love exploring the outdoors and when not, playing with technologies such as Node.js, with which I created the popular note-taking site Typity.com.

From 1/1/2010 through 2/1/2018 I was employed at iThemes.com where I created many WordPress plugins, the most popular of which was BackupBuddy which under my watch ran on over a MILLION websites. Being almost the sole developer on such a popular plugin for 8 years was one of the most challenging yet rewarding adventures!