Bytemare Bytemare - 5 months ago 10
MySQL Question

Having a local my.cnf for mysql

Is it possible to have a local my.cnf file for MySQL in which can override global one which is in

/etc/mysql
. I am using Ubuntu 14.04. I installed mysql from
apt-get
.

Answer

Yes, it is possible. Create a file called .my.cnf in your home folder. It can look something like this:

[client]
host        =<MySQL server ip>
user        =user
password    =pass