when I try to connect my mysql server it says "can't connect Mysql 5.2 server on '127.0.0.1' (10061)". I have opened the port and installed connector too.
I am following all the steps given in the following link for windows vista
Mysql is usually a username at a client address, not just a username. % means any host, hence root@% would allow root to connect from anywhere. User@127.0.0.1 would allow that user to connect from the same machine Provided they specify localhost or ip in the jdbc url. If you use the host name or ip then the user needs permission from that host too, even though it is the same machine!
I am unable to make connection using Connector/ODBC
I am entering the following values
DATA SOURCE NAME: Hiteshmysql
TCP/IP SERVER: localhost PORT: 3306
DATABASE: Is it necessary to select databse from list? I don't get any any name here to select database so leave it blank.
When I click on TEST then it gives me following error...
"Connection Failed:[HY000][MYSQL][ODBC 5.1 Driver] Cn't connect to MySQL server on 'localhost' (10061)
If your connecting to MySQL from a Java application, you should be using the Connector/J. Take a look at the following and go from there. ODBC sounds like its completely unrelated to what you're attempting to do.
OK... Are you sure your server is running? Are you sure you are using the same port on both your client and server? Are you sure you don't have a firewall program blocking access? Also, try using localhost instead of 127.0.0.1, and make sure you have those connection properties allowed for that user.
Most of the time MySQL uses 3306 as the default port so after installing MySQL and Workbench on the same computer, the two can connect to each other pretty easily, unless blocked by a third party application.
I have checked the box in the windows firewall to make an exception for MySQL Workbench...and made a connection using NEW SERVER INSTANCE (Admin@127.0.0.1 Local Type:Windows) but it still says " There is no connection to the MySQL Server. This functionalit requires an established coonection to a running MySQL server to work".
I downloaded the ZIPPED MySQL Server 5.2.29 from www.mysql.org and unzipped it. Finally I ran mysqld.exe which is located in the bin folder to start the server by manually clicking on the icon mysqld.exe. Now i can also make connection using MySQL workbench.
The Issue is now resolved.
Thank you everyone for your valuable suggestions. I appreciate them.
1)when you installed mysql, you must have skipped networking because you are working on a local machine
result -->does not create a address field in your configuration file my.ini or my.cnf if its linux
2)When you install mysql workbench, it tries to connect from your given credentials and looks for that line in my.ini, which is not there.
so it can never connect even though mysql client can connect from shell
2)add this line to you server section of mysql configuration file