View Full Version : MySQL Connector/ODBC 3.51
bforbes
01-19-2007, 11:06 AM
I am trying to use Visual Basic 2005 to access my MySQL database. To do this, I'm using MySQL Connector/ODBC 3.51, but I'm having trouble connecting to my MySQL database.
Here's the screen I'm having trouble getting to cooperate:
http://thedragoongame.com/odbc.gif
Any help would be greatly appreciated, thanks.
shadmego
01-19-2007, 12:12 PM
I'm not really that familiar with Visual Basics or the bridge(?) that allows the connection to a MySQL database, but I can tell you what information you need to connect to MySQL.
You seem to have it set up correctly, but just in case,
The server would normally be localhost if you are on the local machine, but since you are trying to connect remotely, from VB 2005, you will need two things:
1. To know if HM allows remote connections to the database and,
2. If they do, the port number to use for the connection.
Once you know this, and everything is good, then your server would be the url + port #.
You will also need the username, password, and database name to connect to.
This structure takes two parts:
1. The account name
2. The name you give the user and the database (these can be different).
An example:
Your HM account name is john. Your database name is datab1. Using this information, your MySQL database would be john_datab1. Your usename would follow the same convention. Account name first and then the database username with a " _ " in the middle.
You will need these 4 pieces of information to connect to the database, but you need to ask HM if they even allow remote connections first.
~regards,
Shadmego
bforbes
01-19-2007, 01:19 PM
Wow, thanks for the descriptive reply! I really appreciate that.
Here's a quote from the HM cPanel under MySQL:
"To remotely access your databases, you must contact support to allow the connection through our firewall as well. Please contact us with the IP numbers you would like to be able to connect from. You can find your IP Address Here"
Here's what I'm a little confused on though. I am creating an application that I plan to distribute to people other than myself whom I do not know all the IP numbers for. So in my case, what do I need to do? I know you're not from HM, but in order to have anyone using the application be able to connect to my database through the application, will the firewall need to be able to allow all IP numbers through?
Thanks again for all your help shadmego.
shadmego
01-19-2007, 01:27 PM
...
I am creating an application that I plan to distribute to people other than myself whom I do not know all the IP numbers for. So in my case, what do I need to do? I know you're not from HM, but in order to have anyone using the application be able to connect to my database through the application, will the firewall need to be able to allow all IP numbers through?
...
That is an interesting situation. I'm not sure I fully understand it, but here is my stab ...
It sounds like you want to allow remote access to your database by a multiple number of clients. Normally, in this case you would create several different users and attach them to the database (through the MySQL features in CPanel) with varying degrees of access rights, unless you want the database completely open (not recommended).
If this is the case, you would probably have to ask HM if they would allow this. My question is ... would it not be easier to write the application for yourself to access the db remotely and then create a script that others can access via their browser to gain access to the database? You should be able to write a php script that can take usernames and grant access accordingly. Then you would only need one remote access IP address and the others could connect locally (through the webserver).
Anyway, just shooting ideas out there. Thanks for the compliment! They are a rare treat! ;)
~regards,
Shadmego
bforbes
01-19-2007, 01:49 PM
Hum. Well, this is what I want the application to do. I want it to be able to connect to a database and extract values from it to use in the application. I also want it to be able to send these values back and update the database once the users are done manipulating them in the application.
So...
- The user connects to the database and extracts a bunch of data from the database (the user doesn't pick what to extract, it's all pre-coded in the application).
- In the application, the user will use this data and change it.
- The user connects to the database again and updates the data in the database to reflect the changes that occurred while the user was using the application.
The application will be free software that anyone will be able to download and use. There will be a website that users register on, which creates data rows in the database which will be what they manipulate in the application.
Thanks for all the help. It sounds like I need to email HM - I keep thinking an official HM person is going to show up and help me here. But I guess HM technical support doesn't browse these forums?
McCoy
01-19-2007, 01:54 PM
Maybe if you buy a dedicated IP ($30 per year) they will allow to disable the firwall alltogether for the mySQL port? At least that's how it works when you need to set up a TeamSpeak server, for example. You need to buy a dedicated IP and then you can request them to open up all the ports if that's what you want.
shadmego
01-19-2007, 01:59 PM
Maybe if you buy a dedicated IP ($30 per year) they will allow to disable the firwall alltogether for the mySQL port? At least that's how it works when you need to set up a TeamSpeak server, for example. You need to buy a dedicated IP and then you can request them to open up all the ports if that's what you want.
DANG! I'm glad to know we think alike ... gives me hope for myself! ;) I was just about to come on and say that! I was also going to suggest for bforbes to PM RDM as he is employed by HM. There are a few others too, but RDM is the most active here.
You are correct though, these forums are intended for user to user help.
~regards,
Shadmego
McCoy
01-19-2007, 02:11 PM
The problem is that I think that mySQL databases are hosted in a different server alltogether.
That's a common practice for high traffic and resource-intensive system, like a shared hosting company: server specialization. A server only for web-serving, another server for database-management only. That way you can use the resources of each server better as you can optimize the configuration for each task.
If that's how they have it then maybe it won't work to open the firewall for your IP of your WEB server...
In any case, contact support, that's it, we are only especulating, while they will tell you the right and sure answer ;)
McCoy
01-19-2007, 02:14 PM
Thanks for all the help. It sounds like I need to email HM - I keep thinking an official HM person is going to show up and help me here. But I guess HM technical support doesn't browse these forums?
That's correct. Only a user called DRM comes from HM, but he doesn't come by here that often, and if the question involves configuration changes or strange server problems and all that he usually directs you to support directly, which I think would be the right thing this time too :)
bforbes
01-19-2007, 04:30 PM
Okay, I sent a ticket in through the Helpdesk explaining the situation.
Thanks for all the help guys. Greatly appreciated.
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.