2023年2月6日 星期一

Ubuntu 22.04 Change Mysql root with password without sudo


sudo mysql -u root

> use mysql;

> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '***';

// *** is your password

> FLUSH PRIVILEGES;