Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed apache server (this story). I cannot connect with remote (I tried local too) mysql server. After a long loading page I get error MySQL database connect failure. Mysql server is far from me. On same page which locate in Internet with same settings is good work. How to solve this?

When I typed in terminal:

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

After a minute I get:

ERROR 2003 (HY000): Can't connect to MySQL server on 'xxxxxxxxx' (110)

I cannot visit localhost/phpadmin/, because I get 403 error. I doubt the correctness of the phpadmin settings...

share|improve this question
what is the URL are you trying to access to your server. you'll need phpmyadmin to access the database. If I'm not mistakn, lamp has it all with pack. Try, http://localhost/phpmyadmin – AzkerM Apr 16 '14 at 18:49

How are you connecting to the database, if it is with php try

mysql_connect("localhost", username, password);

with localhost as your host.

share|improve this answer

Open up your terminal or console and type the following:

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

then enter your password

This gives you the assurance that the connection from your host it works, and if not, return a useful error output.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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