Browse Source

Add DSN for non MySQL/MariaDB RDBMSes.

tags/2.0.0-beta
resurtm 12 years ago
parent
commit
2433563451
  1. 8
      docs/guide/database-basics.md

8
docs/guide/database-basics.md

@ -19,7 +19,13 @@ return array(
// ...
'db' => array(
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=mydatabase',
'dsn' => 'mysql:host=localhost;dbname=mydatabase', // MySQL, MariaDB
//'dsn' => 'sqlite:/path/to/database/file', // SQLite
//'dsn' => 'pgsql:host=localhost;port=5432;dbname=mydatabase', // PostgreSQL
//'dsn' => 'sqlsrv:Server=localhost;Database=mydatabase', // MS SQL Server, sqlsrv driver
//'dsn' => 'dblib:host=localhost;dbname=mydatabase', // MS SQL Server, dblib driver
//'dsn' => 'mssql:host=localhost;dbname=mydatabase', // MS SQL Server, mssql driver
//'dsn' => 'oci:dbname=//localhost:1521/testdb', // Oracle
'username' => 'root',
'password' => '',
'charset' => 'utf8',

Loading…
Cancel
Save