我运行wamp并尝试连接到db但我得到了
Unable to connect to your database server using the provided settings.
很少的常见问题/我做过的事情:
$db['default'] = array( 'dsn' => '', 'hostname' => 'localhost', 'username' => '', 'password' => '', 'database' => 'ciintro', 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => TRUE, 'db_debug' => TRUE, 'cache_on' => FALSE, 'cachedir' => '', 'char_set' => 'utf8', 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', 'autoinit' => TRUE, 'encrypt' => FALSE, 'compress' => FALSE, 'stricton' => FALSE, 'failover' => array(), 'save_queries' => TRUE );
答案 0 :(得分:2)
'username' => ''
,
应该是
'username' => 'root'
,
检查用户名。
答案 1 :(得分:0)
我认为你是较新的codeigniter。
'username'=> 'root'(root或您为PHPMYADMIN设置的任何内容。)
'password'=> 'password'(密码或您为PHPMYADMIN设置的任何内容。)