Tuesday, May 12, 2020

How To Reset Recover Change MySQL Or MariaDB 10.3 Root Password On Linux

Video Tutorial - https://youtu.be/89M6ZWPX3Ag

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

MySQL root password allows the root user to have full access to the MySQL database.
MySQL is an open-source relational database management system.MariaDB is an open source relational database management system (DBMS).
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Os - Linux Mint 19.3 Tricia | ubuntu 20.04 LTS
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
mysql -V
systemctl stop mysql ; mkdir -p /var/run/mysqld
chown mysql:mysql /var/run/mysqld ; /usr/sbin/mysqld --skip-grant-tables --skip-networking &
mysql -u root
use mysql;
update user set authentication_string=PASSWORD("NewPassword123") where User='root';
update user set plugin="mysql_native_password" where User='root';
flush privileges;
quit;

pkill mysqld
systemctl start mysql ; systemctl status mysql
mysql -u root -p
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Mariadb Server version: 10.3
mysql -V
systemctl stop mariadb ; systemctl status mariadb
mysqld_safe --skip-grant-tables --skip-networking &
mysql -u root
use mysql;
update user SET PASSWORD=PASSWORD("YourNewPaasword") WHERE USER='root';
flush privileges;
exit
pkill mysqld
systemctl stop mariadb ; systemctl start mariadb ; systemctl status mariadb
mysql -u root -p
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

No comments:

Post a Comment