DEV Community

Shaikh Al Amin
Shaikh Al Amin

Posted on

1

Install and configure mysql in ubuntu 20.04

Please follow step by step command

sudo apt update
sudo apt install mysql-server
Enter fullscreen mode Exit fullscreen mode

After installation please follow below steps:

sudo mysql
Enter fullscreen mode Exit fullscreen mode

Now update the native plugin for root user

USE mysql;
Enter fullscreen mode Exit fullscreen mode
UPDATE user SET plugin='mysql_native_password' WHERE User='root';
Enter fullscreen mode Exit fullscreen mode
FLUSH PRIVILEGES;
Enter fullscreen mode Exit fullscreen mode

Now change the password using below commands:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password_here';
Enter fullscreen mode Exit fullscreen mode

Now restart your mysql service

sudo service mysql restart
Enter fullscreen mode Exit fullscreen mode

Run below command to connect mysql workbench to work correctly

sudo snap connect mysql-workbench-community:password-manager-service
Enter fullscreen mode Exit fullscreen mode
sudo snap connect mysql-workbench-community:ssh-keys
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay