Mysql连接,但Mysqli显示没有文件或目录错误

时间:2018-04-22 00:09:43

标签: php codeigniter google-app-engine google-cloud-sql

更新我的myqsli驱动程序功能后,我一直看到这个

     A PHP Error was encountered
    Severity: Warning

    Message: mysqli_connect(): (HY000/2002): No such file or directory

    Filename: mysqli/mysqli_driver.php

    Line Number: 110

    Backtrace:

    File: /Applications/XAMPP/xamppfiles/htdocs/alcantara/application/controllers/Vendor.php
    Line: 11
Function: __construct

File: /Applications/XAMPP/xamppfiles/htdocs/alcantara/index.php
Line: 274
Function: require_once

我不知道是否有什么我必须再次安装,我正在使用mac os。 这是我的数据库文件

*/

$active_group = 'default';
$query_builder = TRUE;
$db['default']['hostname'] = '127.0.0.1';
$db['default']['username'] = 'testing';
$db['default']['password'] = '';
$db['default']['database'] = 'database';
$db['default']['dbdriver'] = 'mysqli';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = FALSE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
$db['default']['socket'] = 'mysql:unix_socket=/cloudsql/project_id:xxx';

1 个答案:

答案 0 :(得分:0)

我终于解决了它购买更新我的codeigniter mysqli连接功能与从网站上下载的新的..