Manual:SQLite/fr

Le support SQLite de MediaWiki concerne la qualité depuis MediaWiki 1.17. Le support de SQLite fait partie de la base de code principale depuis la version 1.13 de MediaWiki. There are some notes below on installing the SQLite library into your PHP environment.

À propos de SQLite
SQLite est une bibliothèque de base de données à source ouvert mise dans le domaine public. Unlike client-server database management systems, the SQLite library is linked into PHP and thus becomes an integral part of the server process. MediaWiki uses SQLite's functionality through simple function calls, which reduces latency in database access as function calls are more efficient than inter-process communication.

Using SQLite as database backend for MediaWiki has its own pros and cons:


 * Pour :


 * You don't have to install and maintain a standalone database server such as MySQL; this significantly reduces efforts spent on administration and removes some points of failure.
 * The former also means that SQLite is much more suitable for portable MediaWiki installs running from a USB stick.
 * Sur les hôtes partagés, vous n'êtes pas contraint par les limites artificielles de la base de données.
 * La base de données toute entière est rangée comme un fichier unique interplateforme facilitant ainsi les sauvegardes et la migration.


 * Contre :


 * SQLite is not that scalable, so if you have a large and popular wiki, you should use MySQL.
 * Although SQLite has its own search engine, it's not supported by more advanced solutions such as Lucene.
 * Several extensions are known to have database update or installation issues with SQLite: AbuseFilter, Echo, Flow, and LiquidThreads.

Installation de SQLite
Au minimum vous avez besoin de la version 3.8.0 de SQLite. Also, in order to use full text search, SQLite must be compiled with FTS3 module enabled (most builds have it out of the box these days). SQLite3 works via PHP's PDO functions.


 * Pour installer SQLite3 sur un système basé sur Debian ou Ubuntu, utilisez.
 * Les binaires Windows de php.net sont OK.
 * Le module PHP PDO SQLite doit être chargé. Vous devez décommenter la ligne suivante du fichier
 * Où mettre la base de données SQLite elle-même ? Le chemin par défaut semble être $IP/../data/$dbname.sqlite . Anything outside of the webroot should be safe; it's good to keep it nearby. Or, if you feel like it, you could put it in the web root somewhere and make sure to use webserver config to deny access to it.
 * Où mettre la base de données SQLite elle-même ? Le chemin par défaut semble être $IP/../data/$dbname.sqlite . Anything outside of the webroot should be safe; it's good to keep it nearby. Or, if you feel like it, you could put it in the web root somewhere and make sure to use webserver config to deny access to it.

Installer MediaWiki sur le serveur SQLite
On MediaWiki versions prior to 1.16, you need to enter something into the "DB username" and "DB password" fields for installer to continue even though SQLite does not need them.
 * If SQLite module for PHP is properly installed, MediaWiki installer should offer you an option to use SQLite.
 * If you enter nothing into the "SQLite data directory" field, your will be left empty, which corresponds to   directory in the parent of the document root, however this directory might be different for web scripts and maintenance scripts run from command line, so specifying it explicitly is recommended.

Moteur de recherche
Search capabilities for SQLite backend was introduced in MediaWiki 1.16. They require SQLite with FTS3 module compiled-in, which is usually present in most modern builds. If you've recently updated your SQLite support to a version that includes FTS3, run the updater as if you're upgrading MediaWiki. After the updater script created the search index table, populate it with. Same applies to switches back to environments without FTS3: re-running the updater will downgrade the table to avoid SQL errors.

Impossible d'accéder à la base de données à partir du terminal
Pour obtenir l'accès aux commandes de la base de données en mode ligne, entrez dans le terminal :

sqlite3 /var/data/database_name.sqlite

en remplaçant  par le répertoire qui a été défini comme « répertoire de données de SQLite » dans le processus d'installation. Alternatively, look for inside.

This can be tricky if you are not experienced about SQLite and run  - because this will open a completely different database (creating it if it doesn't exist) since SQLite interprets the argument not as a system-wide database name, but instead as the file name that contains the db.

Problèmes
Bugs should be reported to Wikimedia's bug tracker. First check if your problem was already reported - check the dependencies of tag and use search. If you can't find your problem, create a new issue. If the problem is directly related to SQLite backend, report it under MediaWiki → Database component. Otherwise (if the problem is related to one very specific aspect, of the software or an extension), select an appropriate product and component. In any case please take some steps to make your bug easy to find and track: mention SQLite is its summary field and make it depend on tag sqlite.

Voir aussi

 * Paramètres de configuration spécifiques à SQLite :
 * Script de maintenance
 * Script de maintenance

Liens externes

 * Migrating MediaWiki from MySQL to SQLite
 * Page d'accueil de SQLite
 * Article Wikipedia sur SQLite