title: How to connect to WordPress database remotely?
body: <p>I have a WordPress website, which is not done by me, all I need to do is connect to its database remotely and query some results from its database. The point is that I don't know anything about WordPress, and I saw that the database information are written inside the wp-config.php file, when I opened it, there was the username and password, but the host name was this:</p>
  
  <blockquote>
    <p>define('DB_HOST', 'localhost');</p>
  </blockquote>
  
  <p>Which seems a bit curious to me. The website uses cPanel X from GoDaddy, and when I logged in there and opened phpMyAdmin, it had these information under database server part:</p>
  
  <blockquote>
    <p>Server: Localhost via UNIX socket</p>
  </blockquote>
  
  <p>So, I really don't know how to remotely connect to the database and query things, because host name says localhost. I'm used to ASP.NET MVC, and where I specify the host name to be the actual server ip or hostname of the database server. Any idea how should I proceed?</p>