wvcrafted Posted April 1, 2007 Posted April 1, 2007 I have a small app that I can run from my desktop that will upload/download info from my online store into/from the Mysql database. For it to work it needs the Mysql server address and port number. I have the other info such as the username/Pw/db name. I know localhost will not work. Is this possible since it's shared or do I need to keep it local. Thanks. PS Sorry if this is the wrong place to ask. Quote
TCH-Andy Posted April 1, 2007 Posted April 1, 2007 You will need to enable it in cpanel (go into the database part of mysql, and at the bottom there is a section on allowing remote hosts. Add your IP there, or % for to enable access from anywhere). You will need to use the usersname and password assigned to a the user you have given access to the database, you can then use domain name to access it and port 3306. Server host: your domain name Port: 3306 Username: the username for your database, usually cpanelusername_user Password: the password for the database Quote
Ray_Bman Posted August 20, 2009 Posted August 20, 2009 You will need to enable it in cpanel (go into the database part of mysql, and at the bottom there is a section on allowing remote hosts. Add your IP there, or % for to enable access from anywhere). You will need to use the usersname and password assigned to a the user you have given access to the database, you can then use domain name to access it and port 3306. Server host: your domain name Port: 3306 Username: the username for your database, usually cpanelusername_user Password: the password for the database So in a config file that normally would have 'localhost' what would be the correct path to the remote mysql database. Something like this? http://my-domain:3306/ Or? Quote
TCH-Bruce Posted August 20, 2009 Posted August 20, 2009 Andy posted the contents of how a config file would look. Server host: your domain namePort: 3306 Username: the username for your database, usually cpanelusername_user Password: the password for the database Just use your domain name and add the Port: 3306 line to the config file. Quote
Ray_Bman Posted August 20, 2009 Posted August 20, 2009 Andy posted the contents of how a config file would look. Just use your domain name and add the Port: 3306 line to the config file. Thanks, Got it to work with: my-domain.com:3306 Without the "http://" Appreciate the help Ray Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.