MilesWeb Hosting Forum

Web Hosting Technical Support => How To's => Topic started by: Dipak Bhoi on May 01, 2015, 07:43:35 PM

Title: How to access MySQL without password from command line?
Post by: Dipak Bhoi on May 01, 2015, 07:43:35 PM
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 !! :) :)