|
CI 3.1.0 数据库localhost连接正常,生产服务器上异常 ,不停的进入死循环.
请问谁遇到过如此问题,帮忙看下,谢谢。
一、数据库默认配置如下:
$active_group = 'default';
$query_builder = TRUE;
$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'root',
'password' => '146123',
'database' => 'my_database',
'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
);
二、报错如下:
A PHP Error was encounteredSeverity: Warning Message: mysqli::real_connect(): Filename: mysqli/mysqli_driver.php Line Number: 202 Backtrace: File: C:\wamp\www\algo\application\controllers\Auth.php
Line: 8
Function: database File: C:\wamp\www\algo\index.php
Line: 315
Function: require_once
A PHP Error was encounteredSeverity: Warning Message: mysqli::real_connect(): Filename: mysqli/mysqli_driver.php Line Number: 202 Backtrace: File: C:\wamp\www\algo\application\controllers\Auth.php
Line: 8
Function: database File: C:\wamp\www\algo\index.php
Line: 315
Function: require_once
A Database Error OccurredUnable to connect to your database server using the provided settings. Filename: C:/wamp/www/algo/system/database/DB_driver.php Line Number: 436
|
-
|