Solved

Mysql ODBC

Posted on 2004-04-26
12
807 Views
Last Modified: 2008-02-01
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: dbhost.wb.com.br (which is different then localhost)
database: dinastia
port: 3306

how do i connect to it??

help?
0
Comment
Question by:ramonklown
12 Comments
 
LVL 2

Author Comment

by:ramonklown
ID: 10919668
the error is 10061
0
 
LVL 6

Expert Comment

by:campbelc
ID: 10920629
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?
0
 
LVL 2

Author Comment

by:ramonklown
ID: 10920699
It´s in a ISP server.

the server address is dbhost.wb.com.br 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.
0
 
LVL 7

Expert Comment

by:mquiroz
ID: 10921349
maybe your isp doesn't have port 3306 open to everyone...
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 6

Accepted Solution

by:
Reapz earned 25 total points
ID: 10934674
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.
0
 
LVL 2

Expert Comment

by:RichardAllsebrook
ID: 10936797
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:

$hCon=odbc_connect("datasource_name","username","password");

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...
0
 
LVL 2

Author Comment

by:ramonklown
ID: 10938091
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?

Thanks
0
 
LVL 29

Assisted Solution

by:fibo
fibo earned 25 total points
ID: 12942188
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
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 13319391
my apologies for the delay in making a recommendation - my computer crashed, and I've been rebuilding.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

A lot of articles have been written on splitting mysqldump and grabbing the required tables. A long while back, when Shlomi (http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump) had suggested a “sed” way, I actually shell …
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now