Manuale:MySQL

From mediawiki.org
This page is a translated version of the page Manual:MySQL and the translation is 62% complete.
Manuale: Indice Layout del database MediaWiki MySQL/it

Il motore di database MySQL è il backend di database più comunemente utilizzato per MediaWiki. Poiché MySQL era il sistema di gestione del database relazionale utilizzato nei siti web di Wikimedia Foundation, è ben supportato in MediaWiki. Gran parte dei consigli per MySQL e per MariaDB si applicano a entrambi.

See Compatibility#Database for a list of supported versions.

Connessione a MySQL

 mysql -u wikiuser -p my_wiki

Change wikiuser and my_wiki to the username and database name for your wiki ($wgDBuser and $wgDBname ). When prompted, enter your password.

Example

$ 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>.

Installazione

For further information, see Manuale:Installazione MediaWiki#Creare un database

Basilarmente, se MySQL è installato, lo script di installazione può creare il database per te. Basta fornire lo script con la tua password di root di MySQL (per default vuota).

Attenzione Attenzione: Lasciare la password di root vuota può compromettere seriamente la sicurezza dell'installazione di MediaWiki. Dovresti modificare la password se non lo hai già fatto.
Se stai installando MediaWiki su un server ISP, potresti dover condividere un database con altre applicazioni, che aumenta il rischio di un conflitto tra le tabelle del database richieste da MediaWiki e le tabelle preesistenti. Per risolvere questo problema si può indicare a MediaWiki di utilizzare un prefisso di tabella, in modo che tutte le tabelle di MediaWiki inizino con questo prefisso. In alternativa, se il vostro ISP lo consente, utilizzate database diversi per ogni applicazione che risiede sul server.

Manutenzione

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

For further information, see Manual:Importing XML dumps

Export database

For further information, see Manuale:Fare una copia di sicurezza di una wiki

See also

External links