?
Solved

Mysql ODBC

Posted on 2004-04-26
12
Medium Priority
?
819 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

 
LVL 7

Expert Comment

by:mquiroz
ID: 10921349
maybe your isp doesn't have port 3306 open to everyone...
0
 
LVL 6

Accepted Solution

by:
Andy earned 100 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 100 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

719 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