Hello folks,
Here are tricks to access MySQL as root without password.
Trick 1 : Create a file .my.cnf under /root directory and add the credentials there as below.
Quote[client]
user=root
password="password"
Trick 2 : Open a mysql configuration file /etc/my.cnf and add below line in it.
Quoteskip-grant-tables
Save the file and restart the mysql service.
Quote
#/etc/init.d/mysql restart
Hope this post will like you..
Enjoy !! :) :)