I don't know if I'll make the issue clear, but I've installed MySQL on CentOS 6.3 using root account on a specific domain (f.ex. root@mydomain), but when I try to log on to it I'm being asked for password to root@localhost account, which I do not have access to. How can I log on to MySQL installed on 'mydomain' and not to 'localhost'?
I've tried editing my.cnf using bind-address='domain_ip', but it didn't help, it still wanted localhost password.
Best Answer
Mysql maintains it's own user and password information which are different from the main operating system accounts. The root@localhost and root@yourhost.tld accounts are the default administrator accounts for an installation on CentOS.
If you have recently installed this mysql server and you have not set a password then you should be able to access it with a blank password
or
If you can do this then you should secure your system by setting a password
or run
Which will give you various options for securing your system. Pay particular attention to the
Question
But you appear from your question to want to allow this (although you probably don't really).
If someone else has set this system up for you and they have set a password you should ask them for it.
If a password has been set and you cannot obtain it then you can reset the password with the following procedure providing you have root access to the OS.
Now stop mysql
and restart the service
You should be able log on with your know password.