PDA

View Full Version : Connecting to MySQL database



yuvaly
04-11-2008, 01:41 AM
Is it possible to connect to a database I created in your site from my desktop? What is the connection string?

Thanks

silencox
04-11-2008, 01:55 AM
Is it possible to connect to a database I created in your site from my desktop? What is the connection string?

Thanks


do you have fixed IP or not

if you use some firewall you will need to allow incoming connection on MySQL port which you use ( off course if you use MySQL )

also if you have fixed IP ( when you connect to internet ) then it's little bit easy but if you don't have fixed you will need to change settings of your script every time when you connect to internet in that case you can try to use some DynDNS sites to have dynamic unique address to connect ( I'm not sure how this will work i didn't have need to try but basically may work)


Regards
Sven

yuvaly
04-11-2008, 03:20 AM
Thanks, but That's not what I meant...I set up an accout here and defined a database. I want to connect to that database using MySQL Query Browser on my computer, but I am not sure what to put in the Connection,

I guest I use the Username/Password I defined in bluehost, and the default schema is the database name I defined.
ie, username: domain_user, password: domain_password, schema: domain_dbname. Server Host= ?????

I hope what I am asking is clear now, Thanks
Yuval

alemcherry
04-11-2008, 11:24 AM
Ip address is simply the ip of the mysql server. but most hosts do not allow connections from outside, due to obvious reasons. I guess bluehost mysql also will not be configured to allow connections from outside IP. You will have to test to confirm. Or ask the support.

felgall
04-11-2008, 03:13 PM
I am not sure if there is an option in cPanel to set this up. You may need to arrange for external access to the database with BlueHost first before being able to access it from outside.

Basil
04-12-2008, 05:33 AM
Go into cPanel, click on "Remote MySQL", add your IP address there. Afterward, click on the "Customer Profile" link on the same page, scroll down to "Customer Preferences" and edit them to whitelist your IP.

The host that you are connecting to is yourdomain.com, the port is 3306, the username and password are your bluehost cPanel login. Keep in mind that you cannot create new databases through anything but cPanel because of their naming scheme.

MarkP
04-14-2008, 01:13 PM
I'm also looking at MySQL and wondering how I can connect when my IP address keeps changing. I've added a post here (http://www.bluehostforum.com/showthread.php?p=52344#post52344) in the Advanced Scripting section but no reply as yet. Is there a Bluehost reccomended way of whitelisting an IP automatically?

Sageth
04-14-2008, 04:28 PM
I don't know that you can do it automatically, but you can use the CIDR format.

It can be a bit intimidating, but it should fit your situation. Try the calculator here: http://www.subnet-calculator.com/cidr.php

TheWebHostingHero
04-15-2008, 09:13 AM
You will need to get the MySQL ODBC driver installed on your computer:

http://dev.mysql.com/downloads/connector/

You could also try to allow access to your ISP's domain name:


%.your-isp.com

Of course that's not as secure as allowing your IP address. The other option is to get a dynamic dns (www.dyndns.org) pointing to your home PC. You'll need to install a software on your pc in order to update its IP address on dyndns.org when it changes. Then you could allow the dynamic dns entry to access MySQL.