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

dBase, Calc, CSV, MS ACCESS, MySQL, PostgrSQL, OTHER
Post Reply
ben11
Posts: 5
Joined: Sun Oct 17, 2010 11:03 pm
Location: Montreal, Canada

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

Post 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.
Last edited by Hagar Delest on Tue Oct 19, 2010 8:06 am, edited 1 time in total.
Reason: tagged [Solved].
openOffice.org 3, windows vista
User avatar
therabi
Volunteer
Posts: 763
Joined: Wed Sep 01, 2010 10:01 pm
Location: USA

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

Post 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 .
OpenOffice.org v3.3, LibO v3.32 on Ubuntu 10.10 and Win7
rudolfo
Volunteer
Posts: 1488
Joined: Wed Mar 19, 2008 11:34 am
Location: Germany

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

Post 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).
OpenOffice 3.1.1 (2.4.3 until October 2009) and LibreOffice 3.3.2 on Windows 2000, AOO 3.4.1 on Windows 7
There are several macro languages in OOo, but none of them is called Visual Basic or VB(A)! Please call it OOo Basic, Star Basic or simply Basic.
ben11
Posts: 5
Joined: Sun Oct 17, 2010 11:03 pm
Location: Montreal, Canada

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

Post 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.
openOffice.org 3, windows vista
Post Reply