Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## MariaDB Password Reset
- Stop the mariadb service:
- ```
- $ sudo systemctl stop mariadb.service
- ```
- Start MariaDB in safe mode:
- ```
- $ sudo mysqld_safe --skip-grant-tables --skip-networking
- ```
- or
- ```
- $ sudo mysqld_safe --skip-grant-tables --skip-networking &
- ```
- to run the process in the background.
- Login to MariaDB and change password
- ```
- $ sudo mysql -u root
- ...
- MariaDB [(none)]> use mysql;
- MariaDB [mysql]> UPDATE user SET password=PASSWORD("secret") WHERE User='root';
- MariaDB [mysql]> FLUSH PRIVILEGES;
- MariaDB [mysql]> \q
- ```
- Restart MariaDB:
- ```
- $ sudo sytemctl restart mariadb.service
- ```
- Login with the new credentials:
- ```
- $ sudo mysql -u root -p
- ```
Add Comment
Please, Sign In to add comment