PHP 7 RC3: How to install missing MySQL PDO

后端 未结 12 907
暗喜
暗喜 2020-12-04 11:54

I am trying to setup webserver with PHP 7 RC3 + Nginx on Ubuntu 14.04 (for test purposes).

I installed Ubuntu in Vagrant using

12条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-04 12:44

    ['class' => 'yii\db\Connection',
        'dsn' => 'mysql:host=localhost:3306;dbname=testdb',
        'username' => 'user',
        'password' => 'password',
        'charset' => 'utf8',]
    

    It's simple: Just provide the port number along with the host name and set default sock path to your mysql.sock file path in php.ini which the server is running on.

提交回复
热议问题