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'
More Related Contents:
- CodeIgniter: Unable to connect to your database server using the provided settings Error Message
- SSL operation failed with code 1: dh key too small
- Codeigniter: fatal error call to undefined function mysqli_init()
- About how does mysqli_query() Function and mysqli_fetch_array($result) work?
- How print in Jquery / Datatables [closed]
- Can I mix MySQL APIs in PHP?
- How to change mysql to mysqli?
- Sending email with gmail smtp with codeigniter email library
- MySQLi prepared statements error reporting [duplicate]
- How can I get an unknown username given an ID?
- Build SELECT query with dynamic number of LIKE conditions as a mysqli prepared statement
- MySQLi count(*) always returns 1
- How to set proper codeigniter base url?
- Warning: mysqli_connect(): (HY000/2002): No such file or directory
- CodeIgniter: “The filetype you are attempting to upload is not allowed.”
- Using Mysqli bind_param with date and time columns?
- SELECT * FROM in MySQLi
- Redirect with CodeIgniter
- Codeigniter Routes regex – using dashes in controller/method names
- What are the differences between backtick and single quote? Can I use IF statement in a query as above?
- How to print SQL statement in codeigniter model
- Mysqli fetch_assoc vs fetch_array
- Enabling $_GET in codeigniter
- Mysqli throws “Warning: mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt, boolean given” [duplicate]
- Remove index.php in codeigniter 2.1.0
- php warning: mysqli_close() expects parameter 1 to be mysqli
- To Use a PHP Framework or Not? [closed]
- File upload required validation in CodeIgniter
- Using Prepared Statement, how I return the id of the inserted row?
- Getting data from post array in CodeIgniter