Results 1 to 9 of 9

Thread: Remote MySql problem

  1. #1
    Member
    Join Date
    Apr 2011
    Posts
    5

    Default Remote MySql problem

    Hi everybody
    I have an application that wants to connect to mysql database on server.
    I already add my computer IP to remote mysql section in cpanel.
    But the app can not connect to database.
    also, my connection string is:
    "Server=somesite.net; database='somesite_test';User Name='somesite_test'; Password='somesite_test' ;Port=3306; charset=utf8"
    What's the problem?

  2. #2
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Remote MySql problem

    Did you add the MySQL user to the MySQL database for access? Creating the user in cPanel > MySQL Databases area does not automatically add the user to the database. That step is another additional one that is needed.

    Next, are you certain you are using the right password for that MySQL user to connect to the database?
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  3. #3
    Member
    Join Date
    Apr 2011
    Posts
    5

    Default Re: Remote MySql problem

    Yes. I did both of them carefully, but it didn't work. Is my connection string right?

  4. #4
    Registered User
    Join Date
    Apr 2011
    Posts
    3

    Default Re: Remote MySql problem

    if the connection string is wrong or you have used wrong login credentials then you must receive an error message accordingly.
    Can you please let us the exact error you are getting ?

  5. #5
    Member aapkapratik's Avatar
    Join Date
    Oct 2009
    Posts
    24

    Default Re: Remote MySql problem

    In my opinion the problem might be because of the two reasons

    1. As described by cPanelTristan and SamWin the connection string you are using or the login credentials you are using needs to be verified again..

    To remove the doubt here, I'd request you to login to your server using SSH as root and run the following commands

    root@server [~]# mysql

    Now affiliate the mysql user to the database with full privileges to do so execute


    mysql>grant all privileges on somesite_test.* to somesite_test@localhost identified by 'somesite_test';
    Description of command is

    mysql>grant all privileges on database_name.* to user_name@localhost identified by 'password';

    Still if you are not able to connect to the mysql database on the server remotely..

    2. Please check if the firewall on your server is blocking the connection.. To test you may try connecting after disabling the firewall on the server or check if the local machine IP address is blocked on the server firewall..
    Pr@T!K R@W@L,
    "Simple, Capable, Ready for the Future"
    http://etechsupport.net, http://esds.co.in
    ESDS Software Solution Pvt.ltd.

  6. #6
    Member
    Join Date
    Apr 2011
    Posts
    5

    Default Re: Remote MySql problem

    Quote Originally Posted by SamWin View Post
    if the connection string is wrong or you have used wrong login credentials then you must receive an error message accordingly.
    Can you please let us the exact error you are getting ?
    Thanks for your reply.
    I use visual studio.net 2010 and MySql connector net. when I run my application the following error arises:

    http://fileofme.com/show.php/1256_error.jpg.html

    and I checked my user and password.

  7. #7
    Member
    Join Date
    Apr 2011
    Posts
    5

    Default Re: Remote MySql problem

    Thank you for your reply.
    I checked my credentials and those were correct.
    1. How can I use SSH.

    2. How can I check firewall on server. I only have an account of cpanel in somesite:2082 and when I login into it, I can not find an option for firewall.

  8. #8
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Remote MySql problem

    Do you only have a cPanel account? If you do not have WHM or root SSH access, then you would need to contact your hosting provider to have them assist with this issue. If you cannot log into the machine as the root user, then your access level would not be high enough to check the firewall on the machine.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  9. #9
    Member
    Join Date
    Apr 2011
    Posts
    5

    Default Re: Remote MySql problem

    Yes I only have a cPanel account.
    Thank you for your helps, I'll contact with them.

Similar Threads

  1. Remote MySQL problem
    By jimik in forum New User Questions
    Replies: 2
    Last Post: 04-15-2009, 10:04 AM
  2. Remote mysql server problem
    By Sh3nKo in forum cPanel & WHM Discussions
    Replies: 12
    Last Post: 07-14-2008, 08:14 AM
  3. remote mysql problem (important)
    By katmai in forum cPanel & WHM Discussions
    Replies: 10
    Last Post: 09-20-2007, 01:28 PM
  4. mysql remote host problem
    By Radio_Head in forum cPanel & WHM Discussions
    Replies: 7
    Last Post: 12-06-2005, 07:59 AM
  5. Remote MySQL connection problem
    By ialex03 in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 02-06-2004, 08:53 AM