mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
config-dist.php: new template for DB connection settings
This commit is contained in:
parent
a0b7200d9c
commit
d0bf00e064
1 changed files with 19 additions and 21 deletions
|
@ -36,28 +36,26 @@ $CFG = new stdClass();
|
||||||
// First, you need to configure the database where all Moodle data //
|
// First, you need to configure the database where all Moodle data //
|
||||||
// will be stored. This database must already have been created //
|
// will be stored. This database must already have been created //
|
||||||
// and a username/password created to access it. //
|
// and a username/password created to access it. //
|
||||||
// //
|
|
||||||
// mysql - the prefix is optional, but useful when installing //
|
|
||||||
// into databases that already contain tables. //
|
|
||||||
//
|
|
||||||
// postgres7 - the prefix is REQUIRED, regardless of whether the //
|
|
||||||
// database already contains tables. //
|
|
||||||
// //
|
|
||||||
// A special case exists when using PostgreSQL databases via sockets. //
|
|
||||||
// Define dbhost as follows, leaving dbname, dbuser, dbpass BLANK!: //
|
|
||||||
// $CFG->dbhost = " user='muser' password='mpass' dbname='mdata'"; //
|
|
||||||
//
|
|
||||||
|
|
||||||
$CFG->dbtype = 'mysql'; // mysql or postgres7 (for now)
|
$CFG->dbtype = 'pgsql'; // 'pgsql', 'mysqli', 'mssql' or 'oci'
|
||||||
$CFG->dbhost = 'localhost'; // eg localhost or db.isp.com
|
$CFG->dblibrary = 'native'; // 'native' only at the moment
|
||||||
|
$CFG->dbhost = 'localhost'; // eg 'localhost' or 'db.isp.com' or IP
|
||||||
$CFG->dbname = 'moodle'; // database name, eg moodle
|
$CFG->dbname = 'moodle'; // database name, eg moodle
|
||||||
$CFG->dbuser = 'username'; // your database username
|
$CFG->dbuser = 'username'; // your database username
|
||||||
$CFG->dbpass = 'password'; // your database password
|
$CFG->dbpass = 'password'; // your database password
|
||||||
$CFG->prefix = 'mdl_'; // Prefix to use for all table names
|
$CFG->prefix = 'mdl_'; // prefix to use for all table names
|
||||||
|
$CFG->dboptions = array(
|
||||||
$CFG->dbpersist = false; // Should database connections be reused?
|
'dbpersist' => false, // should persistent database connections be
|
||||||
// "false" is the most stable setting
|
// used? set to 'false' for the most stable
|
||||||
// "true" can improve performance sometimes
|
// setting, 'true' can improve performance
|
||||||
|
// sometimes
|
||||||
|
'dbsocket' => false, // should connection via UNIX socket be
|
||||||
|
// used? if you set it to 'true' here,
|
||||||
|
// set dbhost to 'localhost'
|
||||||
|
'dbport' => '', // the TCP port number to use when connecting
|
||||||
|
// to the server. keep empty string for the
|
||||||
|
// default port
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue