How to change MySQL’s root to use mysql_native_password in Ubuntu

John Pili
1 min readOct 8, 2020

--

After installing MySQL, log in to it via terminal with

$sudo mysql -u root

Once inside MySQL, we will need to change the default plugin authentication to mysql_native_password and set a password for root.

mysql> ALTER USER[email protected] IDENTIFIED WITH mysql_native_password BY 'password'; mysql> exit

You can now login in MySQL as root using the password you set.

$mysql -u root -p

Originally published at https://johnpili.com on October 8, 2020.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

John Pili
John Pili

Written by John Pili

I am currently working as a software development manager in Malaysia. I manage and help my team with technical software design and implementation.

No responses yet

Write a response