DEV Community

Cover image for Instalación Mysql en Linux Ubuntu 20
Manuel Ortega Carcamo for 4GeeksAcademy

Posted on

Instalación Mysql en Linux Ubuntu 20

Guía de instalación

Abrir una terminal y ejecutar los siguientes pasos:

Actualizar los paquetes disponibles y sus versiones.

sudo apt update
Enter fullscreen mode Exit fullscreen mode

Instalar Mysql

sudo apt install mysql-server

Enter fullscreen mode Exit fullscreen mode

Instalar la secuencia de comandos de seguridad, esta opción agrega seguridad a la instalación de nuestra base de datos

sudo mysql_secure_installation

Enter fullscreen mode Exit fullscreen mode

Output

Output
Please set the password for root here.


New password:

Re-enter new password:
Enter fullscreen mode Exit fullscreen mode

Ajustar la autenticación y los privilegios de usuario

sudo mysql

SELECT user,authentication_string,plugin,host FROM mysql.user;

ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'password';

Enter fullscreen mode Exit fullscreen mode
  • Ejecutamos este comando para indicar al servidor que vuelva a cargar la tabla de permisos y aplique sus nuevos cambios:
FLUSH PRIVILEGES;
Enter fullscreen mode Exit fullscreen mode

Instalación de WorkBench

  • Ingresar al Link

  • Descargar el archivo presionando la opción Download

  • Presionar la opción No thanks, just start my download

  • Arrastrar el archivo descargado a la terminal quedando de la siguiente forma

sudo apt install '/home/student/Downloads/mysql-apt-config_0.8.16-1_all.deb' 

Enter fullscreen mode Exit fullscreen mode

Actualizar los paquetes disponibles y sus versiones.

sudo apt update
Enter fullscreen mode Exit fullscreen mode

Instalar MySQL Workbench

sudo apt install mysql-workbench-community
Enter fullscreen mode Exit fullscreen mode

Ejecutar desde la terminal MySQL Workbench

mysql-workbench
Enter fullscreen mode Exit fullscreen mode

Fuente: DigitalOceans

Top comments (1)

Collapse
 
ritik_raj_eb4e6e986982918 profile image
Ritik Raj

I recently went through the process of installing MySQL on my Ubuntu 20 server, and while there were plenty of guides out there, I found some steps to be more complex than expected. I started with updating the available packages, installing MySQL, and then configuring the root password.

It was a bit tricky to figure out the correct user privileges and authentication methods, but with some trial and error, I was able to set everything up.

The process got a lot easier when I came across the Vultr documentation on installing MySQL on Ubuntu. The Vultr MySQL installation guide provided clear and straightforward instructions.

It covered every step of the installation process and helped me configure MySQL securely with no issues. I also appreciated the troubleshooting tips for setting up user privileges and ensuring proper authentication methods.

Additionally, Vultr's documentation on setting up a LAMP stack on Ubuntu was invaluable when I needed to set up Apache and PHP alongside MySQL. The steps were very well-detailed, and it saved me a ton of time.

The guide for securing MySQL installation also helped me run the mysql_secure_installation command correctly, ensuring my database setup was secure.

I highly recommend using Vultr's documentation for any MySQL setup. It made the entire process smooth and worry-free!