Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 15 of 15
  1. #1
    Member
    Join Date
    May 2002
    Location
    Arkansas
    Posts
    53

    Default odbc for connection

    Hi,

    I have a client who wants to connect to his database on cpanel using filemaker pro.

    How can I tell if the odbc driver is compiled on my server so he can connect?

    He could connect on the Plesk server.

    I think I have to run easy apache for this but I just ran it last night to add more security to php.

    Thanks!
    Sincerely,
    Melinda
    http://www.designhosting.biz

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by modom View Post
    Hi,

    I have a client who wants to connect to his database on cpanel using filemaker pro.

    How can I tell if the odbc driver is compiled on my server so he can connect?

    He could connect on the Plesk server.

    I think I have to run easy apache for this but I just ran it last night to add more security to php.

    Thanks!
    I am not familiar with FileMaker Pro. Are they trying to connect to a MySQL database, a PostgreSQL database or another type of database?

  3. #3
    Member
    Join Date
    May 2002
    Location
    Arkansas
    Posts
    53

    Default

    Yes he is trying to connect to the mysql database first as he told me this morning and then he uses file maker so file maker has nothing to do with his connection.

    He put his IP of his home computer in the remote mysql section but I'm wondering if I did something since I ran easy apache 2 days ago using "PHP Encryption and Image Manipulation" and think I saw something about the ODBC but now cannot remember. I checked off other things to add though.
    Sincerely,
    Melinda
    http://www.designhosting.biz

  4. #4
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by modom View Post
    Yes he is trying to connect to the mysql database first as he told me this morning and then he uses file maker so file maker has nothing to do with his connection.

    He put his IP of his home computer in the remote mysql section but I'm wondering if I did something since I ran easy apache 2 days ago using "PHP Encryption and Image Manipulation" and think I saw something about the ODBC but now cannot remember. I checked off other things to add though.
    PHP's ODBC is used for PHP making database connections to other servers (such as MS SQL servers). It has no relation to the ODBC your customer may need to have installed on their workstation to connect to their MySQL database from their workstation.

    MySQL isn't directly affected by EasyApache so it is very doubtful that did anything to affect things with regards to a remote client connecting to your MySQL server.

    One thing I would encourage your customer to do when their database connection is malfunctioning is always get their public IP address (such as from a site like WhatIsMyIP.com) and ensure that is in their access list. If not, then they add it and try again.

    Also, the client will need to authenticate using the full database username and full database name. So if they created a database "stuff" then the database name would be "username_stuff" where username represents their cPanel username. The same prefixing occurs on database usernames as well. This is something a user from another control panel may not immediately understand.

  5. #5
    Member
    Join Date
    May 2002
    Location
    Arkansas
    Posts
    53

    Default

    When he was on the Plesk server before we changed to cPanel he could connect to his database but not now for some reason.

    Is this correct that I already have the ODBC driver because it is in PHP?

    I know nothing about mysql remote connections.
    Sincerely,
    Melinda
    http://www.designhosting.biz

  6. #6
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by modom View Post
    When he was on the Plesk server before we changed to cPanel he could connect to his database but not now for some reason.
    cPanel/WHM blocks all remote connections except those that are explicitly allowed by allowing that IP address. This is different than what other control panels may do

    Quote Originally Posted by modom View Post
    Is this correct that I already have the ODBC driver because it is in PHP?
    Just because you have PHP doesn't mean you have ODBC.

    This application the user is running, is it programmed in PHP? Is it running on your server? If the answer to either of those questions is no, then ODBC support being compiled into PHP is likely irrelevant.

    Quote Originally Posted by modom View Post
    I know nothing about mysql remote connections.
    That's okay, just use the cPanel interface to allow remote connections (from that user's workstation) and follow the advice I provided above. You can read more about this in our documentation at:

    http://twiki.cpanel.net/twiki/bin/vi...cs/RemoteMySQL

  7. #7
    Member
    Join Date
    May 2002
    Location
    Arkansas
    Posts
    53

    Default

    The application my customer is running is the osCommerce store which is php programming and it is on my cpanel server.

    This is from my client:
    I am running on a Windows XP machine with ODBC 3.51.26 driver connection package. I used http://whatismyip.com/ to find my IP address and then using cPanel Remote MySQL I plugged in that IP address as an allowable Host. From the ODBC connect stuff on my XP machine I plugged in all of the proper info; DB name (full name motohea_xxx), User Name (motorhea_yyy, and Password (zzzzzz). I did not specify a port or any other special configuration parameters. Using the ODBC driver to test the interface, I get the following error.
    [
    MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'XX.X.XXX.XXX' (10060) where XX... is the IP address of the MySQL Server.

    I then set up the XP based ODBC connections driver to test against the old Plesk based IP and it worked which confirms to me that my side of things is working just fine, at least with the Plesk based database.

    Is there a specific port that needs to be specified with cPanel? What else can I look at or test?
    Thank you for help.
    Sincerely,
    Melinda
    http://www.designhosting.biz

  8. #8
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by modom View Post
    The application my customer is running is the osCommerce store which is php programming and it is on my cpanel server.

    This is from my client:


    Thank you for help.
    Are you able to make a connection to the MySQL server from either a remote workstation or remote server?

    If you're not able to connect remotely TO your server (even with allowing the IP) then there may be server-side issue such as firewalls blocking access.

    If you're able to connect but not your customer, it could just be something with what the customer is doing.

  9. #9
    Member
    Join Date
    Sep 2004
    Location
    inside a catfish
    Posts
    963
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    If you are running a hardware or sofware firewall, either on your network or on your cpanel machine, you need to make sure that TCP 3306 is open for incoming connections from the IP address of your customer.

    Then your customer needs to go into his control panel interface and set up his mysql user to be allowed to make connections from the IP address of his machine - This can be done under the MySQL section in Cpanel.

    Your customer can test to see if it is an issue where you or him have a firewall blocking his ability to access TCP 3306.

    He should:
    1. Open a DOS prompt
    2. Type in: telnet IP_OF_YOUR_CPANEL_SERVER 3306

    He should get a banner such as:

    Connected to hostname.of.your.server (xxx.xxx.xxx.xxx).
    Escape character is '^]'.
    >
    5.0.67-communityÛÖ.&O<{zrLd,6{.of1auK



    If he gets no such banner, then a firewall is blocking his ability to access.

    If he DOES get such a banner, then he needs to make sure his MySQL user has the needed permission to make a connection from a remote server - Again, that can be done within the Cpanel interface.

    Mike

  10. #10
    Member
    Join Date
    May 2002
    Location
    Arkansas
    Posts
    53

    Default

    Thank you!

    It was a firewall problem that cpanel helped me with but I'm still unclear as to what the "Additional MySQL Access Hosts" list is for in WHM. There is not anything setup in there and I'm not understanding if this needs to be setup for future reference.

    My customer has his home IP setup in his cpanel space hosts section.

    I know I'm not setting up a "Remote MySQL server" that is in WHM.

    I just want to make sure my customer's access to his database is setup properly in addition to the firewall information you just provided so if another customer needs this there won't be any problems.

    Thanks!
    Sincerely,
    Melinda
    http://www.designhosting.biz

  11. #11
    Member
    Join Date
    Sep 2004
    Location
    inside a catfish
    Posts
    963
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by modom View Post
    Thank you!

    It was a firewall problem that cpanel helped me with but I'm still unclear as to what the "Additional MySQL Access Hosts" list is for in WHM. There is not anything setup in there and I'm not understanding if this needs to be setup for future reference.

    My customer has his home IP setup in his cpanel space hosts section.

    I know I'm not setting up a "Remote MySQL server" that is in WHM.

    I just want to make sure my customer's access to his database is setup properly in addition to the firewall information you just provided so if another customer needs this there won't be any problems.

    Thanks!
    As long as your firewall allows incoming TCP 3306, the rest can be done by each individual from within their Cpanel by adding their IP address that they wish to connect from.

    1. The "Additional MySQL Access Hosts" accomplishes a similar thing, but is managed by you. And you dont' want to have to be adding an IP address each time a customer requests. Let them do it via their Cpanel interface.

    2. I personally think its a bad idea [but possibly unavoidable for you] to allow your customers to connect remotely to MySQL. Why? You may find your customers using your MySQL server for external applications that cause unnecessary resource usage in your MySQL. Remote MySQL connections over TCP over a typical intternet route are not robust, take longer to complete, and may increase MySQL resource usage. But you may have no choice but to allow this to keep a customer such as the one you are referring to now.

    Mike

  12. #12
    Member
    Join Date
    May 2002
    Location
    Arkansas
    Posts
    53

    Default

    Thank you! This has been very helpful and think I am catching on.
    Sincerely,
    Melinda
    http://www.designhosting.biz

  13. #13
    Member
    Join Date
    Sep 2004
    Location
    inside a catfish
    Posts
    963
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    You are welcome

    mike

  14. #14
    Member
    Join Date
    May 2002
    Location
    Arkansas
    Posts
    53

    Default

    Hi,

    I kept getting a security warning in the csf firewall on my server about having listed the mysql port for TCP_IN so I need another solution.

    Would this work?

    1. put the customer's home IP in the allow list on the firewall

    2. would I also put the customer's home IP in the mysq additional hosts of whm? In whm it says to put a username and password with the host name but in the cpanel docs it says to just put a host name or number. How do you set this up?

    3. what host name would the customer put in his cpanel remote mysql section?

    Thanks!
    Sincerely,
    Melinda
    http://www.designhosting.biz

  15. #15
    Member
    Join Date
    Sep 2004
    Location
    inside a catfish
    Posts
    963
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by modom View Post
    Hi,

    I kept getting a security warning in the csf firewall on my server about having listed the mysql port for TCP_IN so I need another solution.

    Would this work?
    Perhaps you entered it incorrectly? See below.

    1. put the customer's home IP in the allow list on the firewall
    Sure you could do that. But you should be able to just enter this into WHM / Plugins / CSF Firewall / Firewall Allow IPs :

    tcp:in:d=3306:s=xxx.xxx.xxx.xxx

    - where xxx.xxx.xxx.xxx = your customers static IP address

    You'll then have to restart CSF.

    2. would I also put the customer's home IP in the mysq additional hosts of whm? In whm it says to put a username and password with the host name but in the cpanel docs it says to just put a host name or number. How do you set this up?
    WHM / SQL Services / Additional MySQL Access Hosts

    In the box, enter in the IP address of your customer's machine

    3. what host name would the customer put in his cpanel remote mysql section?
    Host (% wildcard is allowed): xxx.xxx.xxx.xxx

    - where xxx.xxx.xxx.xxx = your customers static IP address
    Mike

Similar Threads & Tags
Similar threads

  1. cPanel/WHM ODBC configuration for remote connection
    By netearth in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 07-17-2009, 07:24 AM
  2. ODBC help
    By Zion Ahead in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 04-23-2008, 12:40 PM
  3. ODBC connection
    By go4kpo in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-16-2005, 03:42 AM
  4. ODBC - Mysql
    By dwykofka in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 11-02-2004, 08:05 AM
  5. ODBC or MSSQL connection with php under cpanel
    By kirkmiesle in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 07-30-2004, 08:22 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube