Page 1 of 1

[Solved] Can't connect to MySql server on localhost (10061)

Posted: Mon Oct 18, 2010 12:31 am
by ben11
Hi,
My OS is Windows Vista home premium service pack 2, I am trying to set up a connection to a MySQL database version 5.1. I started the openOffice.org 3 database wizard and I followed the steps:
- select database: I choose connect to an existing database "MySQL"
- set up a connection to a MySql database: I choose "directly"
- set up my SQL server data: I put in my database name, then server: "local host", then port: 3306
- set up user authentication: in the user name field I put root and checked the "Password required" box.
then I pushed the buttton "Test Connection", I was then prompted to enter the password, and after a while received an error msg "can't connect to MySql server on localhost (10061)".
I have the latest versions: OpenOffice.org 3 and MySQL 5.1 (both downloaded this week).

Before that I downloaded the MySQL connector for openOffice.org (choosed windows).
I created my database using the my SQL command line client and I verified with the command "show databases"; it was fine: the database name appeared along with two other databases: mysql and test.
I checked my user name with the command select user(); and obtained root@localhost.
I tried it many times and I always get the same error msg.
I really can't figure out what went wrong.
Thank you for your help.
Ben.

Re: can't connect to MySql server on localhost (10061)

Posted: Mon Oct 18, 2010 1:06 am
by therabi
ben11 wrote:Hi,
My OS is Windows Vista home premium service pack 2, I am trying to set up a connection to a MySQL database version 5.1. I started the openOffice.org 3 database wizard and I followed the steps:
- select database: I choose connect to an existing database "MySQL"
- set up a connection to a MySql database: I choose "directly"
- set up my SQL server data: I put in my database name, then server: "local host", then port: 3306
- set up user authentication: in the user name field I put root and checked the "Password required" box.
then I pushed the buttton "Test Connection", I was then prompted to enter the password, and after a while received an error msg "can't connect to MySql server on localhost (10061)".
I have the latest versions: OpenOffice.org 3 and MySQL 5.1 (both downloaded this week).

Before that I downloaded the MySQL connector for openOffice.org (choosed windows).
I created my database using the my SQL command line client and I verified with the command "show databases"; it was fine: the database name appeared along with two other databases: mysql and test.
I checked my user name with the command select user(); and obtained root@localhost.
I tried it many times and I always get the same error msg.
I really can't figure out what went wrong.
Thank you for your help.
Ben.
Your line
- set up my SQL server data: I put in my database name, then server: "local host", then port: 3306

is that a typo with a space between local and host? If that is the way you entered it in Base it will never connect, local host <> localhost .

Re: can't connect to MySql server on localhost (10061)

Posted: Mon Oct 18, 2010 1:15 am
by rudolfo
There are several things what you can check and test. Maybe you look in this other thread for ideas: http://user.services.openoffice.org/en/ ... 61&t=32540

Obviously you can connect with the command line client to the database engine. That's good. I have only limited experience with MySQL server on MS Windows, but I think it can't use named sockets on this OS so it will always use TCP/IP sockets. But the error messages that you get sounds a lot like the connection can't be established. Better check with netstat -na if the server port 3306 is really listening. It's also a good idea to run this command again, when you have an active connection from the command line client. This time only list the connected sockets: netstat -n.
If you are sure that it is not an issue of the server, evaluate in a second step the OOo Base client side. Make sure you restarted the complete OpenOffice (including the quickstarter) after you installed the extension for direct mysql connections.
Try other connectors (jdbc or odbc).

Re: Can't connect to MySql server on localhost (10061)

Posted: Tue Oct 19, 2010 4:30 am
by ben11
Hi,

Why i did: I skipped the "Test Connection" and clicked the next button and ... it just worked. I Named my database and saved it.
Now I can open my database (with OpenOffice) check the structure of the tables and so on. it looks like the "Test Connection" button is not credible.
Thank you Rudolfo and Therabi for your quick response.
Ben.