Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Goal

Provide the necessary instructions to install MySQL required to use Vivo-i18n

Table of Contents
minLevel3

Prerequisite

To have carried out the procedure 1) Starting with basic installation: Java-Maven-Solr-GIT

Procedure

StepAction

1) Execute the following instruction sequence:


Code Block
languagebash
sudo apt update
sudo apt install mysql-server


2) Securing

  1. choose a password for root
  2. eliminate the anonymous user
  3. allow remote root connection
  4. deletion of the test board
  5. refill of the privileges table


Code Block
languagebash
sudo mysql_secure_installation


3) Setting user authentication and privileges

Warning

change-root-password must contain the password defined in step 2



Code Block
languagebash
sudo mysql
SELECT user,authentication_string,plugin,host FROM mysql.user;


Code Block
languagebash
+------------------+-------------------------------------------+-----------------------+-----------+
| 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)


Code Block
languagebash
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'change-root-password';
FLUSH PRIVILEGES;
exit


4) Testing Authentication

Mysql now requires you to enter a password for root


Code Block
languagebash
sudo mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)


Code Block
languagebash
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) create a VIVO user for local and remote access

Warning

change-root-password must contain the password for the vivo user



Code Block
languagebash
sudo mysql -u root -p
Enter password: 
mysql>
CREATE USER 'vivo_i18n'@'localhost' IDENTIFIED BY 'change-root-password';
CREATE USER 'vivo_i18n'@'%' IDENTIFIED BY 'change-root-password';


6) Create the DB needed for VIVO


Code Block
languagebash
CREATE DATABASE vivodb_i18n CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT ALL PRIVILEGES ON vitrodb.* TO 'vivo_i18n'@'localhost';
GRANT ALL PRIVILEGES ON vitrodb.* TO 'vivo_i18n'@'%';


7) Confirm the installation


Code Block
languagebash
titleList user content
SELECT user,authentication_string,plugin,host FROM mysql.user;


Code Block
titleResult
+------------------+-------------------------------------------+-----------------------+-----------+
| user             | authentication_string                     | plugin                | host      |
+------------------+-------------------------------------------+-----------------------+-----------+
| root             | *711841F70B99BE5C909F7990576BF5864330C88E | mysql_native_password | localhost |
| mysql.session    | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password | localhost |
| mysql.sys        | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password | localhost |
| debian-sys-maint | *1E7991B7DEC6D1826ECFF03586E179300A3B8BBE | mysql_native_password | localhost |
| vivo_i18n        | *711841F70B99BE5C909F7990576BF5864330C88E | mysql_native_password | localhost |
| vivo_i18n        | *711841F70B99BE5C909F7990576BF5864330C88E | mysql_native_password | %         |
+------------------+-------------------------------------------+-----------------------+-----------+
6 rows in set (0.00 sec)


Code Block
languagesql
titleList the databases
SHOW DATABASES;


Code Block
titleResult
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| vivodb_i18n        |
+--------------------+
5 rows in set (0.00 sec)