Results 1 to 23 of 23
  1. #1
    Join Date
    Apr 2006
    Posts
    57

    How Setting a remote mysql server

    Hello,

    I have a vps, I ahve a customer that would like to connect his mysql database fron a distant website. How can I setting that ? Now it's only localhost work as mysql server.

    Regards.

  2. #2
    Join Date
    Apr 2004
    Location
    Singapore
    Posts
    1,506
    You need to open up your MySQL networking. If you have firewall, you need to open up Port 3306.

    For your MySQL user, you need to set which host that the user is allow to connect from.
    tanfwc
    Singapore Managed Colocation
    Singapore BGP Announcement

  3. #3
    Join Date
    Dec 2005
    Location
    Internet
    Posts
    1,337
    Yes, and then he need to edit his script to connect the mysql port of your server

  4. #4
    Join Date
    Apr 2005
    Location
    Cochin
    Posts
    2,446

  5. #5
    Join Date
    Apr 2006
    Posts
    57
    Please I'm newbie so I add a host to the user account : %.*******.com but nothing error : Fatal error: Unknown MySQL Server Host 'sql.******.com' (1) in /home/****/public_html/config/link.php on line 6

    How to fix that.

    Thank you for your help

  6. #6
    Join Date
    Apr 2006
    Posts
    57
    Ok I change %.domain.com with the IP so it seems to be fine but I have an error : Fatal error: Access denied for user: [email protected]' (Using password: YES) in /home/********/public_html/*******/config/link.php on line 6

    How can I proceed ?

    Regards.

  7. #7
    Presuming you have verified the password for that user is correct, ensure that you have changed the access host on the remote database from localhost to all, or the IP of your HTTP server.
    BeeServe
    * Rock solid shared & reseller UK webhosting. No downtime™ *
    Now offering fully managed VPS servers

  8. #8
    Join Date
    Apr 2006
    Posts
    57
    How to do this exactly please ? Where I go on cpanel, what thing adding, ..

    Regards.

  9. #9
    Join Date
    Dec 2005
    Location
    Internet
    Posts
    1,337
    Use Cpanel >> MySQL databases, on the next page scroll down to the bottom of the page, where you see "Access Hosts:" option. Please add the IP address (of the other server) there.

    Also, verify whether the port 3306 is opened by running 'telnet IP 3306' in the command prompt of your local machine.

    Let us know how it goes

  10. #10
    depending on the location of the db and traffic expect latency.
    Datums Internet Solutions, LLC
    Systems Engineering & Managed Hosting Services
    Complex Hosting Consultants

  11. #11
    Join Date
    Apr 2006
    Posts
    57
    thanks to all members for help especially linuxcares.
    It's ok now, I put a '%' on Access Hosts and it's ok.

    Merry christmas for all

  12. #12
    Join Date
    Feb 2006
    Location
    Pittsburgh PA
    Posts
    289
    putting a % on access hosts is a potential security risk, because it doesnt seem like you have a firewall for one, and for two, you are allowing anyone to send mysql queries to your server.

    I would rethink it, and find out the actual IP he is requesting from, even a range.

    Just me 2 cents, you dont want to have everything open when 1 server needs access.

    Dan

  13. #13
    Join Date
    Dec 2005
    Location
    Internet
    Posts
    1,337
    Quote Originally Posted by ultra2006
    thanks to all members for help especially linuxcares.
    It's ok now, I put a '%' on Access Hosts and it's ok.

    Merry christmas for all
    You are welcome . Also, as tnndotnet said, there is no need to put wildcard "%" on Access Hosts, just entering the IP of the other server is enough!

    Have a Happy X'mas and Prosperous new year!
    Senior Server Administrator

  14. #14
    Join Date
    Apr 2006
    Posts
    57
    So I request from the customer the ip that he uses for connecting to the database and put it in place of % ?

  15. #15
    Join Date
    Dec 2005
    Location
    Internet
    Posts
    1,337
    Quote Originally Posted by ultra2006
    So I request from the customer the ip that he uses for connecting to the database and put it in place of % ?
    Exactly! you got it
    Senior Server Administrator

  16. #16
    Amazing thing, people with straight faces are discussing here how to create one more security hole. Would you like if your bank with your account will do the same?

    Peter.
    Open Solution, Inc
    http://opensolution-us.com

  17. #17
    Join Date
    Dec 2005
    Location
    Internet
    Posts
    1,337
    Quote Originally Posted by pnorilsk
    Amazing thing, people with straight faces are discussing here how to create one more security hole. Would you like if your bank with your account will do the same?

    Peter.
    Can you please explain how it becomes a security hole? There is no IPs given, no passwords either.

  18. #18
    I certainly can, but see no way. Even in your statement you managed to demonstrate the degree of IT knowledge. Since when will password itself constitute a sufficient level of security? Are you serious?

    Peter.
    Open Solution, Inc
    http://opensolution-us.com

  19. #19
    Join Date
    Dec 2005
    Location
    Internet
    Posts
    1,337
    Quote Originally Posted by pnorilsk
    I certainly can, but see no way. Even in your statement you managed to demonstrate the degree of IT knowledge. Since when will password itself constitute a sufficient level of security? Are you serious?

    Peter.
    I read this thread once again, but couldn't see any security hole. May be because I am weak in server security

    Do you mean the entire "Technical & Security Issues" forum itself is a big security hole? I am certainly interested to hear it from you, if you don't mind.

  20. #20
    Quote Originally Posted by linuxcares
    Do you mean the entire "Technical & Security Issues" forum itself is a big security hole? I am certainly interested to hear it from you, if you don't mind.
    I don't. The forum as far as I remember of a questionable quality for the past few years deteriorate very rapidly.
    Open Solution, Inc
    http://opensolution-us.com

  21. #21
    Join Date
    Feb 2003
    Location
    North Hollywood, CA
    Posts
    2,554
    Lets keep this on topic...

    Setup a firewall to only allow this IP to port 3306, and drop all other requests...
    Last edited by Jeremy; 12-24-2006 at 03:20 PM.
    Remote Hands and Your Local Tech for the Los Angeles area.

    (310) 573-8050 - LinkedIn

  22. #22
    Quote Originally Posted by Jeremy
    Lets keep this on topic...

    Setup a firewall to only allow this IP to port 3306, and drop all other requests...
    I like to keep it on topic. And I believe your advice is very wrong.
    Open Solution, Inc
    http://opensolution-us.com

  23. #23
    Join Date
    Jul 2006
    Location
    Florida
    Posts
    195
    Quote Originally Posted by pnorilsk
    I like to keep it on topic. And I believe your advice is very wrong.
    Well open a few other ports SSH, FTP, etc... but most should be closed.

    I'd also think that only allowing connections from your Apache box would be a good idea too but maybe I'm missing something?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •