MediaWiki
REL1_22
|
Class for setting up the MediaWiki database using MySQL. More...
Public Member Functions | |
canCreateAccounts () | |
Return true if the install user can create accounts. | |
getCharsets () | |
Get a list of character sets that are available and supported. | |
getConnectForm () | |
getEngines () | |
Get a list of storage engines that are available and supported. | |
getGlobalDefaults () | |
getLocalSettings () | |
Get the DBMS-specific options for LocalSettings.php generation. | |
getName () | |
getSchemaVars () | |
Get variables to substitute into tables.sql and the SQL patch files. | |
getSettingsForm () | |
isCompiled () | |
openConnection () | |
preInstall () | |
Allow DB installers a chance to make last-minute changes before installation occurs. | |
preUpgrade () | |
Allow DB installers a chance to make checks before upgrade. | |
setupDatabase () | |
setupUser () | |
submitConnectForm () | |
Set variables based on the request array, assuming it was submitted via the form returned by getConnectForm(). | |
submitSettingsForm () | |
Public Attributes | |
$minimumVersion = '5.0.2' | |
$supportedEngines = array( 'InnoDB', 'MyISAM' ) | |
$webUserPrivs | |
Protected Member Functions | |
getTableOptions () | |
Return any table options to be applied to all tables that don't override them. | |
Protected Attributes | |
$globalNames | |
Array of MW configuration globals this class uses. | |
$internalDefaults | |
Internal variables for installation. | |
Private Member Functions | |
buildFullUserName ($name, $host) | |
Return a formal 'User'@'Host' username for use in queries. | |
userDefinitelyExists ($host, $user) | |
Try to see if the user account exists. |
Class for setting up the MediaWiki database using MySQL.
Definition at line 30 of file MysqlInstaller.php.
MysqlInstaller::buildFullUserName | ( | $ | name, |
$ | host | ||
) | [private] |
Return a formal 'User'@'Host' username for use in queries.
string | $name | Username, quotes will be added |
string | $host | Hostname, quotes will be added |
Definition at line 599 of file MysqlInstaller.php.
References $name.
Referenced by setupUser().
Return true if the install user can create accounts.
Definition at line 266 of file MysqlInstaller.php.
References $res, array(), as, DatabaseInstaller\getConnection(), and DatabaseInstaller\getVar().
Referenced by getSettingsForm(), and submitSettingsForm().
Get a list of character sets that are available and supported.
Definition at line 257 of file MysqlInstaller.php.
References array().
Referenced by getSettingsForm(), and submitSettingsForm().
Reimplemented from DatabaseInstaller.
Definition at line 84 of file MysqlInstaller.php.
References array(), Html\closeElement(), Html\element(), DatabaseInstaller\getInstallUserBox(), DatabaseInstaller\getTextBox(), Html\openElement(), text, and wfMessage().
Get a list of storage engines that are available and supported.
Definition at line 232 of file MysqlInstaller.php.
References $res, array(), as, and DatabaseInstaller\getConnection().
Referenced by getSettingsForm(), and submitSettingsForm().
Reimplemented from DatabaseInstaller.
Definition at line 77 of file MysqlInstaller.php.
References array().
Get the DBMS-specific options for LocalSettings.php generation.
Reimplemented from DatabaseInstaller.
Definition at line 653 of file MysqlInstaller.php.
References LocalSettingsGenerator\escapePhpString(), getTableOptions(), DatabaseInstaller\getVar(), and wfBoolToStr().
Reimplemented from DatabaseInstaller.
Definition at line 63 of file MysqlInstaller.php.
Get variables to substitute into tables.sql and the SQL patch files.
Reimplemented from DatabaseInstaller.
Definition at line 644 of file MysqlInstaller.php.
References array(), getTableOptions(), and DatabaseInstaller\getVar().
Reimplemented from DatabaseInstaller.
Definition at line 340 of file MysqlInstaller.php.
References $s, array(), canCreateAccounts(), Xml\closeElement(), getCharsets(), getEngines(), DatabaseInstaller\getRadioSet(), DatabaseInstaller\getVar(), DatabaseInstaller\getWebUserBox(), Xml\openElement(), DatabaseInstaller\setVar(), text, and wfMessage().
MysqlInstaller::getTableOptions | ( | ) | [protected] |
Return any table options to be applied to all tables that don't override them.
Definition at line 627 of file MysqlInstaller.php.
References $options, array(), and DatabaseInstaller\getVar().
Referenced by getLocalSettings(), and getSchemaVars().
Reimplemented from DatabaseInstaller.
Definition at line 70 of file MysqlInstaller.php.
References DatabaseInstaller\checkExtension().
Reimplemented from DatabaseInstaller.
Definition at line 150 of file MysqlInstaller.php.
References DatabaseInstaller\$db, array(), DatabaseBase\factory(), DatabaseInstaller\getVar(), and Status\newGood().
Allow DB installers a chance to make last-minute changes before installation occurs.
This happens before setupDatabase() or createTables() is called, but long after the constructor. Helpful for things like modifying setup steps :)
Reimplemented from DatabaseInstaller.
Definition at line 465 of file MysqlInstaller.php.
References array().
Allow DB installers a chance to make checks before upgrade.
Reimplemented from DatabaseInstaller.
Definition at line 168 of file MysqlInstaller.php.
References $res, DatabaseInstaller\getConnection(), DatabaseInstaller\getVar(), global, and DatabaseInstaller\setVar().
Reimplemented from DatabaseInstaller.
Definition at line 477 of file MysqlInstaller.php.
References DatabaseInstaller\getConnection(), DatabaseInstaller\getVar(), and DatabaseInstaller\setupSchemaVars().
Definition at line 499 of file MysqlInstaller.php.
References DatabaseInstaller\$db, $fullName, $name, $password, array(), as, buildFullUserName(), DatabaseBase\factory(), DatabaseInstaller\getConnection(), DBError\getText(), DatabaseInstaller\getVar(), Status\newGood(), DatabaseInstaller\setupSchemaVars(), and userDefinitelyExists().
Set variables based on the request array, assuming it was submitted via the form returned by getConnectForm().
Validate the connection settings by attempting to connect with them.
If this is called, $this->parent can be assumed to be a WebInstaller.
Reimplemented from DatabaseInstaller.
Definition at line 101 of file MysqlInstaller.php.
References array(), DatabaseInstaller\getConnection(), Status\newFatal(), Status\newGood(), DatabaseInstaller\setVarsFromRequest(), and DatabaseInstaller\submitInstallUserBox().
Reimplemented from DatabaseInstaller.
Definition at line 420 of file MysqlInstaller.php.
References DatabaseInstaller\$db, array(), canCreateAccounts(), DatabaseBase\factory(), getCharsets(), getEngines(), DatabaseInstaller\getVar(), Status\newFatal(), Status\newGood(), DatabaseInstaller\setVar(), DatabaseInstaller\setVarsFromRequest(), and DatabaseInstaller\submitWebUserBox().
MysqlInstaller::userDefinitelyExists | ( | $ | host, |
$ | user | ||
) | [private] |
Try to see if the user account exists.
Our "superuser" may not have access to mysql.user, so false means "no" or "maybe"
string | $host | Hostname to check |
string | $user | Username to check |
Definition at line 610 of file MysqlInstaller.php.
References $res, $user, and array().
Referenced by setupUser().
MysqlInstaller::$globalNames [protected] |
array( 'wgDBserver', 'wgDBname', 'wgDBuser', 'wgDBpassword', 'wgDBprefix', 'wgDBTableOptions', 'wgDBmysql5', )
Array of MW configuration globals this class uses.
Reimplemented from DatabaseInstaller.
Definition at line 32 of file MysqlInstaller.php.
MysqlInstaller::$internalDefaults [protected] |
array( '_MysqlEngine' => 'InnoDB', '_MysqlCharset' => 'binary', '_InstallUser' => 'root', )
Internal variables for installation.
Reimplemented from DatabaseInstaller.
Definition at line 42 of file MysqlInstaller.php.
MysqlInstaller::$minimumVersion = '5.0.2' |
Definition at line 50 of file MysqlInstaller.php.
MysqlInstaller::$supportedEngines = array( 'InnoDB', 'MyISAM' ) |
Definition at line 48 of file MysqlInstaller.php.
MysqlInstaller::$webUserPrivs |
array( 'DELETE', 'INSERT', 'SELECT', 'UPDATE', 'CREATE TEMPORARY TABLES', )
Definition at line 52 of file MysqlInstaller.php.