Objectif
Fournir les instruction nécessaires à l'installation de MySQL nécessaire à l'utilisation de Vivo-i18n
Prérequis
Avoir réalisé la procédure a) Installation de base: Java-Maven-Solr-GIT
Procédure
Étape | Action |
---|---|
1) Exécuter la séquence d'instruction suivante: | sudo apt update sudo apt install mysql-server |
2) Sécuriser
| sudo mysql_secure_installation |
3) Régler l’authentification et les privilèges utilisateurschanger-pour-le-root-password doit contenir le mot de passe définit à l'étape 2 | sudo mysql SELECT user,authentication_string,plugin,host FROM mysql.user; +------------------+-------------------------------------------+-----------------------+-----------+ | user | authentication_string | plugin | host | +------------------+-------------------------------------------+-----------------------+-----------+ | root | | auth_socket | localhost | | mysql.session | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password | localhost | | mysql.sys | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password | localhost | | debian-sys-maint | *D9DEF051BA53BF5AC0AD114CB5A4DA80B38C83FE | mysql_native_password | localhost | +------------------+-------------------------------------------+-----------------------+-----------+ 4 rows in set (0.00 sec) ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'changer-pour-le-root-password'; FLUSH PRIVILEGES; exit |
4) Tester l'authentificationmysql nécessite maintenant d'entrer un mot de passe pour root | sudo mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) sudo mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 5.7.28-0ubuntu0.18.04.4 (Ubuntu) Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> |
5) créer un utilisateur VIVO pour un accès local et à distancechanger-pour-le-password doit contenir le mot de passe pour l'utilisateur vivo | sudo mysql -u root -p Enter password: mysql> CREATE USER 'vivo'@'localhost' IDENTIFIED BY 'changer-pour-le-password'; CREATE USER 'vivo'@'%' IDENTIFIED BY 'changer-pour-le-password'; |
6) Créer la BD nécessaire à VIVO | CREATE DATABASE vitrodb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; GRANT ALL PRIVILEGES ON vitrodb.* TO 'vivo'@'localhost'; GRANT ALL PRIVILEGES ON vitrodb.* TO 'vivo'@'%'; |
7) Valider l'installation | Lister le contenu des utilisateurs SELECT user,authentication_string,plugin,host FROM mysql.user; Résultat +------------------+-------------------------------------------+-----------------------+-----------+ | user | authentication_string | plugin | host | +------------------+-------------------------------------------+-----------------------+-----------+ | root | *C068C76BBEB339E65388257D895038BB8A031654 | mysql_native_password | localhost | | mysql.session | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password | localhost | | mysql.sys | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password | localhost | | debian-sys-maint | *D9DEF051BA53BF5AC0AD114CB5A4DA80B38C83FE | mysql_native_password | localhost | | vivo | *C068C76BBEB339E65388257D895038BB8A031654 | mysql_native_password | localhost | | vivo | *C068C76BBEB339E65388257D895038BB8A031654 | mysql_native_password | % | +------------------+-------------------------------------------+-----------------------+-----------+ 6 rows in set (0.00 sec) Lister les bases de données SHOW DATABASES; Résultat +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | | vitrodb | +--------------------+ 5 rows in set (0.00 sec) |