Jump to content

My Mysql Server Ip/address


Recommended Posts

I'm writing C# application to assist me with my website. I want to connect from it to mySQL DB on my hosting account to work with my data. MySQL has a free module I can use to work with mySQL databases, but to connect to it i need an IP/host adress of the server where mysql db is (along with the other data i already know). when I connect from my Perl/php scripts i specify "localhost", but this isn't local. Where can i find out this address?


Thanks in advance!

Link to comment
Share on other sites

Remember to allow remote access in cpanel ( in the mysql databases section)


im getting:

Exception: Access denied for user 'my_username'@'blah-blah.my_net_provider.net' to database 'my_database'


then I added %.my_net_provider.net to Access Hosts (thats what you ment, right?), but im still getting the same err, only now its ... @'%.my_net_provider.net' ...

Link to comment
Share on other sites

nope :)

getting the same thing. i just now also tried to connect from a perl script, but got exactly the same error.


i tripple checked the user name, pass, and DB name, besides i know they're right cause i copy'pasted it from config file of script thats uses it from the server.

IP was given to me in chat session w/ TCH, and i ran whois on my domain - matches.


the connection string im using in C# is "server=72.18.xxx.xxx;uid=mylogin_user;pwd=mypass;database=mylogin_testdb"

for perl:


# database information

my $db="mylogin_testdb";

my $host="72.18.xxx.xxx";

my $userid="mylogin_user";

my $passwd="mypass";

my $connectionInfo="dbi:mysql:$db;$host";


# make connection to database

my $dbh = DBI->connect($connectionInfo,$userid,$passwd);



i also tried different DBs, and i only have one user for all my DBs.

do i also need to specify port? what would that be?

Edited by flamey
Link to comment
Share on other sites

Join the conversation

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

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