Manual:MariaDB
↑ 手册:索引 | MediaWiki database layout | MariaDB/zh |
The MariaDB database engine is one of the most commonly-used database backends for MediaWiki. Since MariaDB is the relational database management system used by the Wikimedia Foundation websites, it is well-supported in MediaWiki.
See Compatibility#Database for a list of supported versions.
Connecting to MariaDB
$ mariadb -u root -p my_wiki
If using a MariaDB 10.3 or earlier:
mysql -u wikiuser -p my_wiki
将wikiuser和my_wiki更改为您的Wiki的用户名和数据库名称($wgDBuser
和$wgDBname
)。
出现提示时,输入密码。
例
$ mysql -u root -p my_wiki
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 150
Server version: 5.6.24-0ubuntu2 (Ubuntu)
...
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>.
Installation
If MariaDB is installed, the installation script can create a database for you. Just supply the script with your RDBMS root password (by default, blank).
Maintenance
Multiple maintenance scripts are included in the /maintenance/
directory of your MediaWiki installation.
Some of these scripts are provided to refresh parts of the database as one-time operations.
Import database
- 更多信息请参见手册:从XML备份文件文件导入
Export database
- 更多信息请参见手册:备份一个维基
See also