1)update the package index on your server with
Codice: Seleziona tutto
sudo apt update
Codice: Seleziona tutto
sudo apt install mysql-server
Run the security script:
Codice: Seleziona tutto
sudo mysql_secure_installation
In order to use a password to connect to MySQL as root, you will need to switch its authentication method from auth_socket to mysql_native_password. To do this, open up the MySQL prompt from your terminal:
Codice: Seleziona tutto
sudo mysql
Codice: Seleziona tutto
SELECT user,authentication_string,plugin,host FROM mysql.user;
Codice: Seleziona tutto
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
Then, run FLUSH PRIVILEGES which tells the server to reload the grant tables and put your new changes into effect:
Codice: Seleziona tutto
FLUSH PRIVILEGES;
Codice: Seleziona tutto
SELECT user,authentication_string,plugin,host FROM mysql.user;
Codice: Seleziona tutto
exit
Codice: Seleziona tutto
systemctl status mysql.service
For an additional check, you can try connecting to the database using the mysqladmin tool, which is a client that lets you run administrative commands. For example, this command says to connect to MySQL as root (-u root), prompt for a password (-p), and return the version.
Codice: Seleziona tutto
sudo mysqladmin -p -u root version
from https://www.digitalocean.com/community/ ... untu-18-04
installazione PMA
1)Update the apt package tool to ensure we are working with the latest and greatest.
Codice: Seleziona tutto
sudo apt update
Codice: Seleziona tutto
sudo apt upgrade
During this installation you’ll be asked for the webserver selection, we will select Apache2 and select ENTER.
Codice: Seleziona tutto
sudo apt install phpmyadmin php-mbstring php-gettext
Codice: Seleziona tutto
phpenmod mbstring
Codice: Seleziona tutto
sudo nano /etc/apache2/apache2.conf
Codice: Seleziona tutto
Include /etc/phpmyadmin/apache.conf
Codice: Seleziona tutto
systemctl restart apache2
from:https://www.liquidweb.com/kb/install-ph ... ntu-18-04/