• I am trying to install through wp-admin/install.php and I am getting this error.

    The mysqladmin page given by my Hosting Provider is https://mysqladmin.net4india.com through which I am able to login with my DBUsername and DBPassword. But the same is not working through PHP. My WP-Config.php details are as follows :

    define(‘DB_NAME’, ‘TestDB’); // The name of the database
    define(‘DB_USER’, ‘DBUsername’); // Your MySQL username
    define(‘DB_PASSWORD’, ‘WordPress’); // …and password
    define(‘DB_HOST’, ‘https://mysqladmin.net4india.com’);

    I tried changing the Host to localhost but no luck. But I am able to login to Mysqladmin with the same details.

Viewing 6 replies - 1 through 6 (of 6 total)
  • “mysqladmin” and the DB (database) host are NOT the same!
    Ask you host what exactly is the database host name.

    DB_HOST with webhost looks something like this
    **mysql**.nameofwebhostornot.com
    Some have numbers and text before or after the mysql
    Good luck.

    Thread Starter 811011

    Alternatively they asked to use my domain name https://www.saxon.co.in or IP 202.71.129.99 as DB_HOST but even these donot work.

    Is there some way of checking the host from Mysqladmim – the “Server variables and settings – Hostname in Mysqladmin shows as corp3.net4india.com. I tried using this but no luck.

    I tried running the following from a php file on my domain :

    $port[3] = “3306”; $service[3] = “MYSQL”; $ip[3] =””;

    and it shows that Mysql is running on Port 3306.

    Error establishing a database connection

    okay, what would cause this error if ones WP blog was running perfectly for several months and problem just showed up one day. my other wp blogs at same host work okay.

    alx

    getting ‘Error establishing a database connection’

    My database is at 000webhost.com; I entered this info in wp-config.php

    define(‘DB_NAME’, ‘a3177430_trying’);
    define(‘DB_USER’, ‘a3177430_nbierma’);
    define(‘DB_PASSWORD’, ‘——–‘);
    define(‘DB_HOST’, ‘https://mysql9.000webhost.com’);

    advice?

    Thanks,

    Nathan

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error establishing a database connection’ is closed to new replies.