Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
mysql:installation_mariadb_ubuntu_2004 [2021/02/07 15:49] marclebrun [Installation de phpMyAdmin] |
— (Version actuelle) | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== Installation d'un serveur MariaDB sous Ubuntu 20.04 ====== | ||
- | |||
- | Source: [[https://www.digitalocean.com/community/tutorials/how-to-install-mariadb-on-ubuntu-20-04-quickstart-fr]] | ||
- | |||
- | ===== Installer le serveur ===== | ||
- | |||
- | <code bash> | ||
- | sudo apt install mariadb-server | ||
- | </code> | ||
- | |||
- | Vérifier qu'il fonctionne : | ||
- | |||
- | <code bash> | ||
- | sudo systemctl status mariadb | ||
- | </code> | ||
- | |||
- | ===== Sécurisation ===== | ||
- | |||
- | <code bash> | ||
- | sudo mysql_secure_installation | ||
- | </code> | ||
- | |||
- | Répondre aux questions : | ||
- | |||
- | | ''Enter current password for root (enter for none):'' | **ENTER** | | ||
- | | ''Set root password? [Y/n]'' | **N** | | ||
- | | ''Remove anonymous users? [Y/n]'' | **Y** | | ||
- | | ''Disallow root login remotely? [Y/n]'' | **Y** | | ||
- | | ''Remove test database and access to it? [Y/n]'' | **Y** | | ||
- | | ''Reload privilege tables now? [Y/n]'' | **Y** | | ||
- | |||
- | ===== Création d'un utilisateur admin ===== | ||
- | |||
- | <code bash> | ||
- | sudo mariadb | ||
- | </code> | ||
- | |||
- | <code> | ||
- | GRANT ALL ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'MonMotDePasse' WITH GRANT OPTION; | ||
- | FLUSH PRIVILEGES; | ||
- | exit | ||
- | </code> | ||
- | |||
- | Tester le compte **admin** avec cette commande : | ||
- | <code bash> | ||
- | mysqladmin -u admin -p version | ||
- | </code> | ||
- | |||
- | ===== Installation de phpMyAdmin ===== | ||
- | |||
- | * Télécharger la dernière version sur [[https://www.phpmyadmin.net/downloads/]] | ||
- | * Décompresser l'archive | ||
- | * Chez moi le dossier s'appelle **/home/marc/prgweb/phpMyAdmin-5.0.4-all-languages** | ||
- | * Configurer un **Virtual Host** pour Apache | ||
- | * Créer un fichier **/etc/apache2/sites-available/phpmyadmin.localhost.conf** | ||
- | |||
- | <code apache phpmyadmin.localhost.conf> | ||
- | |||
- | </code> | ||