IAMEM Hosting

cPanel:Autologin to MySQL without having to enter the password everytime

Home > Blog > cPanel > cPanel:Autologin to MySQL without having to enter the password everytime
06Apr, 2016
0

cPanel:Autologin to MySQL without having to enter the password everytime

If you have logged into putty as root and you have to monitor the database activity its quiet annoying to enter the MySQL password every time you want to login or run monitoring scripts, we can actually skip entering the password by creating .my.cnf file in /root which is root users home directory

1. Create the .my.cnf file in /root directory

 

vi /root/.my.cnf

 

2. Enter the below information

 

[client]
password='password'

 

Note: Replace the password with MySQL root password.

Now you can login to the MySQL server by just typing mysql and ENTER.

 

Leave a Reply

one × five =

Copyright © 2019 | iamemhost.com . All rights reserved.