MAMP를 사용할 수 있으므로 포트를 기본값 3306으로 변경하거나 database.php에서 127.0.0.1을 사용하십시오.
$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost',// leave it for port 3306
'username' => 'yourUserhere',
'password' => 'yourPassword',
'database' => 'yourDatabase',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
또는 기본 설정으로 :
$db['default'] = array(
'dsn' => '',
'hostname' => '127.0.0.1:8889',// leave it for port 8889
'username' => 'yourUserhere',
'password' => 'yourPassword',
'database' => 'yourDatabase',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);