Set Mysql root Password In ubuntu 18

sudo mysql
UPDATE mysql.user SET plugin="mysql_native_password" WHERE User='root';
UPDATE mysql.user SET authentication_string=PASSWORD("password") WHERE User='root';
FLUSH PRIVIlEGES;
quit
sudo service mysql restart

Leave a Reply

Your email address will not be published. Required fields are marked *