cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution
New

Trouble connecting MySql Database in my asp.net form

Hey,

 

I am new to this and have problems regarding connecting my MySql database to asp.net form. Whenever I try to connect from my website it shows an error that:

"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections."

 

I read some answers regarding this and tried to enable direct access but there is no such option.

Please help me find a solution to this problem. Thanks in advance.

 

Regards,

Heta

2 ACCEPTED SOLUTIONS

In that case, you must login to your MySQL and allow your self to login remotely . You could specify an IP to allow only that IP or use a wildcard (%) to allow all IP address. Just a warning though, remoting GD database is really slow. Establishing connection sometimes takes so long that it will fail... not ideal for web apps.
~Jan Mykhail Hasselbring Web Administrator @ fullstackwebsolution.com

View solution in original post

GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'IP' IDENTIFIED BY 'PASSWORD' with grant option; FLUSH PRIVILEGES;
~Jan Mykhail Hasselbring Web Administrator @ fullstackwebsolution.com

View solution in original post

6 REPLIES 6
Helper VI

Hi there, GoDaddy makes it really hard for you to connect to your database remotely. Are you doing a local connection or remote? Meaning, are your script and database in the same machine/cluster?
~Jan Mykhail Hasselbring Web Administrator @ fullstackwebsolution.com

Hi

 

I am trying for a remote connection. My database and scripts are on different machines. I tried changing my database from MySQL to Microsoft Access database but still not able to do it.

 

Thank You in advance

In that case, you must login to your MySQL and allow your self to login remotely . You could specify an IP to allow only that IP or use a wildcard (%) to allow all IP address. Just a warning though, remoting GD database is really slow. Establishing connection sometimes takes so long that it will fail... not ideal for web apps.
~Jan Mykhail Hasselbring Web Administrator @ fullstackwebsolution.com

View solution in original post

GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'IP' IDENTIFIED BY 'PASSWORD' with grant option; FLUSH PRIVILEGES;
~Jan Mykhail Hasselbring Web Administrator @ fullstackwebsolution.com

View solution in original post

I have a similar problem but the only way I can run the GRANT ALL... command is in phpMyAdmin. Doing that gives me the access denied for user error message. How else can I run the command to grant privileges to the Mysql user I am logged in to phpMyAdmin with?

I have multiple accounts with GoDaddy.  My website in the first account is not able to access the database from another godaddy account. How can I enable the database get shared among the websites of multiple godaddy accounts? THis database is publically accessible by default.