• Hi!
    I have been developing a site on localhost for my local library. I’m working with a team so I signed up for free hosting through infinityfree so I could share with them to get input etc. I’m having trouble getting things up and running though. Imported my database from a localhost export. Everything seemed just fine. Uploaded a copy of my localhost site files using FileZilla FTP. Everything transferred fine.

    But when I load my site I get “error establishing database connection”. I poked around in the forums on infinityfree, got some help there. Added “true” to debug in config.php. The db username and password, host etc is all correct in config as well. But I am now getting this message:

    
    Warning: mysqli_real_connect(): (HY000/1045): Access denied for user 'epiz_27666533'@'192.168.2.192' (using password: YES) in /home/vol9_5/epizy.com/epiz_27666533/htdocs/wp-includes/wp-db.php on line 1635
    
    Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/vol9_5/epizy.com/epiz_27666533/htdocs/wp-includes/wp-db.php on line 1667
    
    Warning: mysql_connect(): Access denied for user 'epiz_27666533'@'192.168.2.192' (using password: YES) in /home/vol9_5/epizy.com/epiz_27666533/htdocs/wp-includes/wp-db.php on line 1667
    Access denied for user 'epiz_27666533'@'192.168.2.192' (using password: YES)
    
    Error establishing a database connection
    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at sql210.epizy.com. This could mean your host’s database server is down.
    
    Are you sure you have the correct username and password?
    Are you sure you have typed the correct hostname?
    Are you sure the database server is running?
    If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.
    

    I checked the code on the lines specified, but I don’t know what it’s supposed to look like, so I don’t know what needs to be fixed. I am a newbie, sorry if this is something simple. Please help!

    line 1635 from wp-db.php:

    
    if ( WP_DEBUG ) {
    				mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags );
    
    line 1667: 
    
    	$this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
    

    Thanks!
    Amy

    • This topic was modified 4 years, 2 months ago by Yui.
    • This topic was modified 4 years, 2 months ago by Yui. Reason: please use CODE button for code formatting

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    >> : Access denied for user ‘epiz_27666533’@’192.168.2.192’ (using password: YES) in /home/vol9_5/epizy.com/epiz_27666533/htdocs/wp-includes/wp-db.php on line 1635 <<

    Verifiy that the user name, password, *and* db_host are correct. Most hosts use “localhost” instead of an IP address, so check with your host about that.

    Did you create the user “epiz_27666533” (with a password) when you set up the database?

    Also, ask your host to install the mysqli library for PHP (usually, php-mysqlnd, or something like that).

    Moderator Yui

    (@fierevere)

    永子

    the error message is almost self-explantory,

    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at sql210.epizy.com. This could mean your host’s database server is down.

    Are you sure you have the correct username and password?
    Are you sure you have typed the correct hostname?
    Are you sure the database server is running?

    double check that you provide correct database info in wp-config.php file.
    db server hostname, username for database, database name
    If unsure – ask your webhosting support at epizy.com


    It is recommended to use modern version of PHP (7.2 at least), you seem to have an old PHP version 5.6 (or so), this may cause problems in future.

    Thread Starter amys25

    (@amys25)

    @sterndata
    Thanks for the reply! I have double checked the username and password. They are correct. My host (infintyfree.net) provided a URL for db_host not localhost or an IP address. And that is correct.

    The username and password were autogenerated by host when I set up the database.

    Not sure how to ask my host to install the mysqli library for PHP. I’m using free hosting right now until the site is finished.

    Thread Starter amys25

    (@amys25)

    @fierevere
    Thank you! All entries are correct in wp-config.php

    I just downloaded and installed WP to create this localhost site in Nov. how did I end up with old version of PHP? Can I update that somehow?

    If I login to localhost site admin and upgrade? I still have the site running just fine on my localhost. Used a copy of the files and export of the database to migrate to host.

    Can you tell I am new to this? Sorry. Thanks for helping.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error Establishing Database Connection’ is closed to new replies.