• I am trying to access remote mysql database where i have expoerted my wordpress database.
    I have added The correct IP address in the DBHost and also add access to cpanel for that specific request.
    But I am getting Error Database Connection.
    and when Debug mode is true
    Warning: mysql_connect() [function.mysql-connect]: Can’t connect to MySQL server on …includes/wp-db.php on line 1633
    I am getting this warning

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • The error I am getting seems to be saying that your WordPress blog cannot access its own database. From your WordPress hosting point of view, the connection is nearly always to a local database and not a remote one. Are you really trying to use a database server which is remote to your hosting server ?

    Have you talked with your website hosting support ?

    Thread Starter nasirkhan259

    (@nasirkhan259)

    define(‘DB_NAME’, ‘databasename’);

    /** MySQL database username */
    define(‘DB_USER’, ‘user’);

    /** MySQL database password */
    define(‘DB_PASSWORD’, ‘password’);

    /** MySQL hostname */
    define(‘DB_HOST’, ‘50.87……..87’); //IP Address to my server where MYSQL database is located

    The IP you have in your wp-config.php is different from your hosts ip, so are you trying to use a remote db here?
    If so, is the db server setup to allow remote connections? By default it’ll be running socket connections for localhost only.

    Thread Starter nasirkhan259

    (@nasirkhan259)

    Yeah, I have added the remote server IP address to listen to that specific Ip address in Remote My SQL. And the IP address is fine I have just changed for demonstration purpose. But Still getting the error of database connection.

    Have you tried connecting to that database locally? Using a tool like https://www.sequelpro.com/ for example to test that the database does actually allow remote connections?

    Sounds like a server config issue.

    Thread Starter nasirkhan259

    (@nasirkhan259)

    Okay thanks @pross I will give it a try. Thanks for your time

    Thread Starter nasirkhan259

    (@nasirkhan259)

    @pross Thanks, Sorry I am late but man I resolved the issue. Actually, everything was right I have added wrong IP address to my hosting Cpanel.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘I am trying to access Remote MySQL database where my wordpress is installed’ is closed to new replies.