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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay