Jump to content

Recommended Posts

Posted

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.

Posted

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

  • 2 years later...
Posted

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?

Posted

Andy posted the contents of how a config file would look.

 

Server host: your domain name

Port: 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.

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...