MySQL Issues when running via CLI |
I was trying to get some resources working via CLI, so I created a "cli_test" method inside the "Test" controller, which just outputs a string. When I execute it, I get a database error. Here is the output:
Quote:$ clear Heres the MySQL config: PHP Code: $active_group = 'development'; However whenever visit the page via the browser, it works perfectly fine.. I looked at line 135 in the mysqli_driver.php file, its PHP Code: return $mysqli->real_connect($hostname, $this->username, $this->password, $this->database, $port, $socket, $client_flags) ? $mysqli : FALSE; Could it be the $socket? Edit: When I output the socket, its empty/null, so I doubt thats it...
I tried a simple CLI call on another CI instance that I have running locally. When its not configured to use the database, it works fine, when I do have a database configured, it throws the error.
is there something special I need to do to get CI working with the DB on the command line?
I found it, looks like I had to specify the mysqli.default_socket in the php.ini
|
Welcome Guest, Not a member yet? Register Sign In |