1.Install/Unstall Mysql
2.How to RESET root password
Last active
May 26, 2025 16:42
-
-
Save Javvadilakshman/7adbc72e1cd0cd1d66af to your computer and use it in GitHub Desktop.
Mysql Commands,Tips,Tricks,Fix etc....
dpkg -l | grep mysql
sudo apt-get update
sudo apt-get install mysql-server-5.5
sudo netstat -tap | grep mysql
sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
alias ms="sudo service mysqld status";
alias ma="sudo service mysqld start";
alias mb="sudo service mysqld restart";
alias mc="sudo service mysqld stop";
alias mysql="sudo mysql";
###How To Reset Mysql Root Password in GNU/Linux
1.Stop MySQL server process.
2.Start MySQL (mysqld) daemon process with the
"--skip-grant-tables"
option so that it will not prompt for password.
3.Connect to mysql server as the root user.
4.Setup new mysql root account password i.e. reset mysql password.
5.Exit and restart MySQL server.
##Example :
/etc/init.d/mysql stop
mysqld_safe --skip-grant-tables &
mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
mysql> flush privileges;
mysql> quit
/etc/init.d/mysql stop
/etc/init.d/mysql start
mysql -u root -p
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment