cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution

Database connection error , mysqls

Hi guys,
i have my website for many years but this week someone called me and siad your website is down.
i do not know what happened
the error is:
Database connection error (1): The MySQL adapter 'mysqli' is not available.Database connection error (1): The MySQL adapter 'mysqli' is not available.

www.hitit-group.com

any ideas?

20 REPLIES 20
Helper VI
Helper VI

Re: Database connection error , mysqls

Hello @electroqute

 

Try this:

-go to your hosting account

-go to cPanel and search for "Select PHP version" and click on it

-find mysqli and enable it and click save.

 

http://i.imgur.com/4aer1Wf.jpg

 

Good luck.

🙂

***Signature: -> Do not assume anything! If you want help, explain your problem. If my post helped you, give it a Kudo. If you have the solution, mark the topic as Solved.

Re: Database connection error , mysqls

the mysqli was also enable...
what can i do now?

the error changed, now it says:
Database connection error (3): Could not connect to databaseDatabase connection error (3): Could not connect to database

Helper VI
Helper VI

Re: Database connection error , mysqls

Hello @electroqute

 

Taking in to consideration the fact that you have not told us anything about your site

- the address of the site

- how and with what technology it is build

- what hosting plan that you are using

...it's a bit difficult to make an assumption about how can you solve the errors you have...

 

🙂

***Signature: -> Do not assume anything! If you want help, explain your problem. If my post helped you, give it a Kudo. If you have the solution, mark the topic as Solved.

Re: Database connection error , mysqls

oh yes...
www.hitit-group.com

joomla 
cpanel north america

Helper VI
Helper VI
Solution

Re: Database connection error , mysqls

Now we can talk @electroqute 🙂

 

First things first: with the first reply I've just solved you an error, don't I deserve a Kudos for that post? 🙂

 

The error code 3 means that Joomla can connect to the MySQL server using the username and password from the database settings, but is unable to select the database. In other words, the database name could be wrong or the user does not have access to that particular database.

 

You will have to go to your hosting account, access the cPanel interface, go to "MySQL® Databases" section and create a new user for your database.

After that you will have to edit your configuration.php file to remove the old user and add the new one.

 

I hope this will help you.

Good luck.

🙂

***Signature: -> Do not assume anything! If you want help, explain your problem. If my post helped you, give it a Kudo. If you have the solution, mark the topic as Solved.
New

MySQL PHP Connection

Hi All,

 

I am trying to connect to MySQL database loacted on a droplet (digital ocean) via my web host godaddy. I can connect to this database no problems through localhost via XAMPP (v5.6.3) but when I run it through godaddy I receive the error message: Fatal Error: Call to underfined function mysqli_conn() in /home/ald0/public_html/test1.php on line 4.  

 

 

Could anyone please help? Alex. 

 

Re: Database connection error , mysqls

thanks Adrian, you saved my day big thanks. i had the same problem now it fixed

PHP Mysqli connection error suddenly

I had a portfolio PHP website up and running today on my godaddy server and it's decided to suddenly stop working for some reason (I haven't touched any files!) I'm not getting any errors on my web page but I am getting the following message on my error log:

 

Just to confirm, YES the database name, password and user is 100% correct as it was working earlier today and I have not touched any files (Just needed to make this clear as I've had someone on another forum tell me it's probably because I changed something) 🙂 

 

[20-Feb-2017 10:05:26 UTC] PHP Warning:  mysqli::mysqli(): (28000/1045😞 Access denied for user 'sophiekitchen'@'localhost' (using password: YES) in /home/*/public_html//includes/connection.php on line 17
[20-Feb-2017 10:05:26 UTC] PHP Warning:  mysqli::query(): Couldn't fetch mysqli in /home/*/public_html//includes/connection.php on line 30
[20-Feb-2017 10:05:26 UTC] PHP Fatal error:  Call to a member function fetch_assoc() on null in /home/*/public_html//includes/connection.php on line 35

Could it be that it's discovered something it's not happy with while reading through the code this evening as earlier today it was all working 100% fine?

 

I had this hosted on my school server and never had this issue and I can't seem to understand why this was working earlier and is now not working!

 

Has anyone else had this issue with go daddy where it just stopped working/read differently?

 

Here's my connection.php code:

 

<?php//define constantsdefine("DB_SERVER", "localhost");define("DB_USER", "kcuser");define("DB_PASSWORD", "kcpassword");define("DB_NAME", "kcollective");
class Connection {
    //attributes
    private $mysqli;
    public function __construct() {        $this->mysqli = new mysqli(DB_SERVER, DB_USER, DB_PASSWORD, DB_NAME);
    }
    //Close connection
    public function close() {        $this->mysqli->close();
    }
    //execute the passed in query and return result
    public function query($sql) {
        //execute query
        //echo $sql;        $result = $this->mysqli->query($sql);
        return $result;
    }
    // fetch a row from result_set as an associative array
    public function fetch($resultSet) {
        return $resultSet->fetch_assoc();
    }
    public function getInsertId() {
        return $this->mysqli->insert_id;
    }
    //input filtering 
    public function escape($value){
        return $this->mysqli->real_escape_string($value);
    }
}
?>

I would really appreciate any help!

Thank you in advance!

Anonymous
Not applicable

Re: PHP Mysqli connection error suddenly

Hi @sophiechan32,

What is your domain? If you don't want to make this public, please pm me. I will have a quick look. 

New

Plesk hosting mysqli extension was not found during installation of WordPress

Hi all,

 

I'm getting really upset as I'm not able to complete what I believed to be a simple task: Install WordPress.

 

I'm on a Deluxe Windows Hosting with Plesk plan, where I have a couple of domains. For one of them I'm able to install WordPress on the other I get the following error:

 

 Error: Unable to install the app on website xxxxx.com because hosting settings of this website do not meet the installation requirements. These requirements are listed below. Try installing the application on another website or contact your hosting provider to resolve this issue.
Requirements
PHP extension       The 'mysqli' extension was not found.
 

I checked and based on my limited knowledge and access via Plesk; both domains seems to have the same configuration. 

 

Any direction would be appreciated.

 

Cheers

Re: Database connection error , mysqls

Dear Godaddy team,

 

I have a similar problem.

My web is www.steinadlercapital.es
I have the same database connection error, but when I go to MySQL I can not accet to it. And this error show up on the databases page :

 

Error while connecting to MySQL: (XID hqr9yp) Database Connect Error: Access denied for user 'root'@'localhost' (using password: YES) Error while connecting to MySQL: (XID hqr9yp) Database Connect Error: Access denied for user 'root'@'localhost' (using password: YES) at /usr/local/cpanel/Cpanel/Mysql.pm line 173.

 

I appreciate any clue on how to solve this. I can see that the content is still on the Cpanel.

 

I did it in wordpress from the Godaddy CMS apps

Thanks and best regards,
Antonio

Database connection error (2): Could not connect to MySQL

My website is having a whole host of problems starting with the fact that Go Daddy informed me I needed to upgrade Joomla. Did that but received errors (can't get to those errors at the moment). Did a back up on my site using Akeeba back up and proceeded to try to upgrade. After failed upgrade several tabs on my page are no longer showing (404 errors). For that reason I was planning to restore my page until I could get some additional help. In doing so I went to the hosting manager and then to the ftp users and had to change the password because this site was built by someone who is no longer here. Now I get this when trying to access my administrator site:

 

Database connection error (2): Could not connect to MySQL.

 

Any help is greatly appreciated!

my site is: www.thelondonsanctuary.com

 

 

Re: Database connection error , mysqls

@Adrian8 
my site in down again
http://www.hitit-group.com/
This website is temporarily unavailable, please try again later.

what should i do now?

Error establishing a database connection

My website http://www.peterphun.com is down. I tried restoring from a backup and no luck. Any help is appreciated.

 

Highlighted
Anonymous
Not applicable

Re: Error establishing a database connection

Hi @peterphun,

 

Did it by chance go down after the backup or before? If after, was the backup prior to any changes?

No connection

Hi Guys  

 

I have Plesk hosting (windows ) with GoDaddy, I've created a database and I successfully connected remotely with it.

 

I have created simple PHP to access a table at the database, but when I tried to access it, it gave the message below :

PHP Warning:  mysql_connect(): No connection could be made because the target machine actively refused it.
 in G:\PleskVhosts\arabtribe.com\alarayf.arabtribe.com\mhmh556\GetTree.php on line 12

 

here is the link

 

http://alarayf.arabtribe.com/mhmh556/GetTree.php

Note:

 my PHP was working fine on cpanel  server, but with Plesk not luck!

New

Database connection error

Hi,

 

I have a problem connecting to database, I checked DB host, user and password and its all good. Here is a link to my website:

http://borderchoice.com/

 

Any help?

Re: Database connection error , mysqls

I am receiving the following Error Message:

"There was an error connecting to the database.

Error message: could not find driver"

The GoDaddy package include Linux with cPanel. I have mysqli, mysqlnd, pdo, pdo_mysql, pdo_sqlite and other modules enabled with PHP current version 7.1.

Here is my database.php code:

 

<?php
$dsn = "MySQL:host=11.62.0.35;dbname=newdatabase";
$username = "memyselfi";
$password = "pa55w0rd";
$options = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION); try {
    $db = new PDO($dsn, $username, $password, $options);
} catch (PDOException $e) {
    $error_message = $e->getMessage();
    include 'DatabaseError.php';    exit;
}
?>

 

 

*************************************************

Here is my DatabaseError.php code:

 

...
<main>
<h1>Database Error</h1>
<p>There was an error connecting to the database.</p>
<p>Error message: <?php echo $error_message; ?></p>
</main>
...

 Thanks,

New

Re: Database connection error , mysqls

Error establishing a database connection

i am angry with this **bleep** error i also upgrade my hosting panel and any thing is okay why go-daddy not fix my pblm i have lost hundred of dollars my visitor going disturbmy site is blogger4zero.com 

how can i fix this **bleep** error 

Error establishing a database connection

 

Re: Database connection error , mysqls

I update the php version but still has same problem.I currently used laravel 5.8. other versions are good but this version could not connect the database.