Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 at 18:49

2 Answers 2

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

 
discard

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.