allin0n3 allin0n3 - 29 days ago 6
MySQL Question

MYSQL on Debian: what's the real host name?

When I was connecting to the database I always used "localhost" as a host name.
Now I want to connect to my MYSQL database from Windows program and I have to use the real IP instead of localhost.

I tried to use the server IP and IP from this:

SHOW VARIABLES WHERE Variable_name = 'hostname'

But both don't work. How can I check the real IP adress, which can be used to connect to MYSQL DB?

MYSQL database was installed on my Debian server without any special settings I think.


Check the user table in MySQL.

select user, host from mysql.user;

Check either they have privileges to connect remotely or not.
Also check bind-address in configuration file, it has to be commented.