First , you should know where is your config file ? where is your config file ?
IF you installed with apt-get or yum install ?
config file may appear in
/etc/mysql/my.cnf
datafile may appear in
/var/lib/mysql
and what you should do is
and then jobs done.
But if you didn't install it with apt or yum,the direcotry may not like this ,and you can find the mysql files with
whereis mysql