Mysql ODBC

I would like to know how to connect to the database

I already have the connector 3.51 the problem I guess is in the address path:

address: (which is different then localhost)
database: dinastia
port: 3306

how do i connect to it??

Who is Participating?
AndyConnect With a Mentor Commented:
A lot of places do not support/allow remote management of MySQL databases. So first up I'd ask them if you can do it. If they say no, find a better host.
ramonklownAuthor Commented:
the error is 10061
Couple questions.

Where is this database located? Is this on a local PC/Server or an ISP server?

Do you have the username/password information for this database?
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

ramonklownAuthor Commented:
It´s in a ISP server.

the server address is and the database is dinastia

And I need to access it from my computer. via ODBC

Yeah I have the user and pass I just can´t post it here haha :)

Thanks for the help.
maybe your isp doesn't have port 3306 open to everyone...
The description of the problem is a little sketchy - it doesn't say what you have and havent tried.

So going back to basics:

You will first need to create an ODBC Datasource ON THE MACHINE THAT IS RUNNING PHP that contains your connection information. You can do this by going to control panel -> Administrative tools -> Data Sources (ODBC).

In the Microsoft ODBC Administrator - click the Add button and pick the MySQL ODBC driver

The MySQL DSN Configuration dialog will now prompt you for a name and your connection details. Make sure you test the connection to make sure your details are correct. If the DSN Config dialog cannot connect, nothing else will.

Once your datasource is created, how you connect to it is largely dependand on the language/application you are using to connect.

In PHP for example, you can connect using:


This will give you a connection handle ($hCon) which you reference when running queries:

$hStmt=odbc_exec($hCon, "SELECT * FROM my_table");

With a bit more info (language/application you are using), I can probably help further...
ramonklownAuthor Commented:
Yeah Probaly the port access is the problem. I have tried everthing.. And none says nothing about special "username" or special "address" to put in. And damn these guys at the ISP are a bunch of dumb guys. It´s like I gotta teach them that there is odbc in mysql...

It´s like if anybody knows cheap old dedicated servers please tell me... :)

Anyways I have signuped for a new server so I will be testing it there...

The Info:
I´m gonna use Access with Mysql, so there is gotta be a odbc via windows.

I don´t have php installed on that machine and I don´t need it that´s why there is odbc.

So the solution is get another ISP .... where at least the guy knows there that there is odbc for mysql and he told me that they let you do myodbc for mysql

I just want to know one more thing:

If I had my own server and stuff to how would i go about configuring for odbc via shell? Do I just need that mysql database management?

Bernard S.Connect With a Mentor Commented:
Beware that odbc will NOT allow some uses you might need with MySQL, eg handling UTF-8 data: Access will handle only Unicode (and not UTF-8), while your web/MySQl use might need UTF8.

In a similar occasion, I was planning to run an architecture like yours... and I had to change my strategy, which is now:
1 - on the local server, have a Mysql base running
2 - export from access to mysql using myodbc. This will creat the basic for tables; columns, datatypes, etc, as well as populate the tables
3 - revise / tune the tables: define indexes, change some datatypes (eg smalltext to varchar or vice-versa)
4 - remove data / "TRUNCATE" from ALL tables
5 - back to Acess, export all the tables using csv format with utf8 encoding
6 - back to mysql / phpmyadmin, import all csv tables each in its respective mysql table
7 - you now have a correct local version of your mysql base.

You might then conside transferring alll this data to your remote mysql base, thru the mysql/phpmyadmin process of backup/ restore
my apologies for the delay in making a recommendation - my computer crashed, and I've been rebuilding.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.