Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Mysql not answering localhost but responds to remote hosts

Discussion in 'Database Discussion' started by Data9er, Dec 16, 2010.

  1. Data9er

    Data9er Registered

    Dec 16, 2010
    Likes Received:
    Trophy Points:
    WHM 11.28.52

    Spent 2 days trying to figure this out hoping someone here knows what went wrong WHERE.

    Basically it is like this.

    I have a database loaded in mysql via Cpanel on net server the script however never gets an answer from mysql.

    Now here is the weird part, I installed the same script on my PC using wamp, I then used the online database settings inside my local copy I enabled the remote hosts to my PC IP addie. EVERYTHING WORKS !

    SO can someone explain WHY my website cannot get data results but my PC can when both scripts are EXACTLY the same and calling the same cpanel mysql database?

    Here is the thing to make it weirder, this happens on 2 seperate WHM/Cpanel servers.

    I normally install fresh databases from a WINDOWS RDP server on the net, I use Navicat Mysql to import csv, txt, or xlsx files to a database already created on the remote Linux box.

    That is what I did this time, when nothing worked I deleted the 10 million record database and started from scratch and redid the process, again no luck.

    To make things sound weirder when I looked inside Cpanel it listed the databases but showed them as empty, looking inside phpmyadmin though all the tables and data were there. Using Navicat I could browse and search the data just like in phpmyadmin.

    I tried all of this on the second server with the same results, the second server being a fresh setup with only the one website on it I was working on.

    Next I decided ok try it another way, so I installed everything onto a wamp/mysql install on my PC and on the Windows RDP server, everythign worked. So I decided make a 120,000 record sample database backit up using phpmyadmin into gz file and see if cpanel would recognize the data.

    That worked to the point both phpmyadmin and cpanel say the database is there, but still cannot use the script to search it from the website. But can still search the cpanel database by using the script on my PC and remotely calling up Cpanel Mysql account information.

    I am COMPLETELY LOST on this one I have never seen anything like this before.

    Anyone out there have any idea what to do or try?
  2. ChrisRHS

    ChrisRHS Well-Known Member

    Jul 12, 2006
    Likes Received:
    Trophy Points:
    Hello there,

    Have your checked your /etc/hosts file on the Linux machine to ensure that is still mapped to localhost. Do you have a firewall on the Linux machine as well? Perhaps turn that off and see what happens.

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice