Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a wamp server running on LAN ip address . From the browser on my PC which is on the LAN I can access the webserver and have as well set the phpmyadmin.conf file to be able to access the phpmyadmin interface. This works smoothly.

On the wamp server I have a database which I'd need to access from any PC on the LAN using the MySQL Connector/ODBC. The problem is that I do not manage to setup the connection correctly. Here are the paramenters I use:

Data Source Name: test_connection

Description: test conenction


Port: 3306

User: root



The error message I get is the following:

Connection Failed: [HY000][MySQL][ODBC 5.1 Driver]Can's connect to MySql server on '' (10060)

Would anybody have a hint to set up correctly the connection?

share|improve this question
When all else fails, read the documentation. –  John Gardeniers Nov 14 '12 at 9:42
Does your datasource / schema is named 'test_connection' ? –  Piotr Kieszczyński Nov 14 '12 at 9:44
usually, you need create an account 'root'@'%' in mysql server ('%' means any host). because by default, 'root' user is only accessible from 'localhost'. –  LiuYan 刘研 Nov 14 '12 at 9:48

2 Answers 2

It looks like the firewall in the computer where database is located is not accepting connections to port 3306. Can you check if your firewall is allowing that?

share|improve this answer
1) yes there is an account 'root' '%' set –  Emmanuel Nov 14 '12 at 10:24
Did you check your firewall? –  Hex Nov 14 '12 at 10:31

Just found this, hope it works.

To allow remote access to apache on Windows

Edit the file: c:\wamp\bin\apache\Apache2.2.17\conf\httpd.conf

You need to allow remote access to directory C:\wamp\www like this:

<Directory "c:/wamp/www/">
    ExecCGI MultiViews
    Options Indexes FollowSymLinks
    AllowOverride all

    Order allow,deny
    Allow from all


To grant remote access to MySQL:

use mysql;

GRANT ALL PRIVILEGES ON *.* to root@'%' IDENTIFIED BY 'password';

flush privileges;

To see what is already allowed do this:

use mysql;

select user,host from user;

| user | host      |
| root |           |
| root | %         |
|      | localhost |
| root | localhost |
4 rows in set (0.00 sec)

“empty” places are nulls here. ‘%’ means from any host.

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.