1
0
mirror of https://github.com/tommytran732/MariaDB-Root-Password-Reset synced 2024-12-21 15:41:33 -05:00

Update mariadb-103.sh

This commit is contained in:
TommyTran732 2020-07-25 20:05:55 -04:00 committed by GitHub
parent 035b38e954
commit 3fa463119a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,7 @@ output(){
}
mariadb_root_reset(){
service mysqld stop
service mysql stop
mysqld_safe --skip-grant-tables >res 2>&1 &
sleep 5
rootpassword=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`
@ -13,7 +13,7 @@ mariadb_root_reset(){
SQL="${Q1}${Q2}${Q3}"
mysql mysql -e "$SQL"
pkill mysqld
service mysqld restart
service mysql restart
output "Your MariaDB root password is $rootpassword"
}