I have an ip of host where glpi database is installed. I have to make a mysql request to get data from glpi database.

I have also a login and a password.

The basic command like this

mysql -h -p

gave me an error

ERROR 2003 (HY000): Can't connect to MySQL server on '' (110 
"Connection timed out")

What is wrong?

2 Answers 2


Use this command:

mysql -h xxx.xxx.x.xx -u username -p 

where xxx.xxx.x.xx = your ip address;


show databases;
use glpi;
show tables;

You will have an access of all tables of glpi BD.


In this case you had forgotten the username, but in your scenario, if you are accessing from another server you might have:

  1. Firewall access blocked
  2. Mysql access limited to localhost
  3. User access limited to localhost

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.