0

I'm trying to do database backup using MysqlBackup library ( http://mysqlbackupnet.codeplex.com/ ).

When I'm working with my local Mysql Server everything is ok. I tried to connect to my website database, I receive exception:

Access denied for user <...> using password "YES"...

I know that I'm using correct data, maybe I need special settings on server to allow remote connections ?

When I'm connecting from PHP, the db server that I use is "localhost", in C# application I'm using as server my site address.

3
  • does your db user have remote connection('%') enabled? Commented Jan 10, 2014 at 21:42
  • I don't know this, how I can verify ? ( My hosting is using CPanel ) Commented Jan 10, 2014 at 22:45
  • It's definitely remote connection problem Commented Jan 10, 2014 at 23:49

1 Answer 1

1

It's definitely remote connection not enabled, problem.
Just Google How to Enable Remote MySQL Connection in cPanel
Here is the answer below URL:

CPanel Guide for this

You probably can't enable full remote connection access without root access to your server most likely if your server doesn't have ssh running then the best you can do is just add your ip address so mysql will allow you to connect from your C# program's IP address. Which the guide above tells you how to do.

Enable Remote MySQL Connections in cPanel
Remote MySQL connections are disabled by default in cPanel servers because they are considered a potential security threat. Using the tools in the Web Host Manager (WHM) and the domain-level cPanel interface (usually http://domainname.com/cpanel) remote hosts can be added which the server allows to connect to the MySQL service.
Please note that Liquid Web Shared customers are not permitted to use remote MySQL connections in order to ensure the security of the other customers on the same server. This guide pertains to Dedicated and VPS customers running Linux servers with cPanel. Before using either of the following techniques, you will need to to open up port 3306 in your server’s firewall.
Enabling Remote MySQL in the WHM Interface
Log in to the server’s WHM interface and find the section in the left-side navigation bar labeled SQL Services. Click on the link marked Additional MySQL Access Hosts:
sql
On the following page, enter one or more hosts or IP addresses in the text box (1) and click the Save button (2). If you wish to activate these settings on all user accounts see (3).
sql2

Now that the remote connection has been activated in the WHM each domain account that wants to use the remote connection will need to activate it in their own cPanel interface.
Enabling Remote MySQL in the Domain cPanel Interface
Using the X3 cPanel theme:
Log in to the domain’s cPanel interface and find the section on the main page labeled Databases.
In the Databases section find the link/button labeled Remote MySQL and click on it.
sql3
The following page will appear in your browser. Add a hostname or IP address that you want to grant remote MySQL access to (1) and then click the Save button (2).
If a host or IP address needs to be removed from this list you can click the red X next to the entry in the list.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you, now I can connect to server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.