• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Can't connect to the target database - upgrade 2.5.9 to 3.0

Status
Not open for further replies.

conex

Chevereto Member
Hi
Thank you for new release Rodolfo.
I have php 5.4 and have bellow issues
I save files config and definitions, uploaded all files without /images folder.
I input URL to browser - site redirect to install - for now is OK, but I set the same database, password, user, database, host - ALL is OK for 100% and I see:
Can't connect to the target database. The server replied with this:
SQLSTATE[28000] [1045] Access denied for user 'xxxxx_xxxx'@'127.0.0.1' (using password: YES)

Please fix your MySQL info.

What is happend? what is wrong?
All data (user, database, password and host) is OK
Please help

EDIT:
On fresh install also database could't connect :(
 

Attachments

  • FireShotChevereto 3_0_0' - imghdd_com_install_php.png
    FireShotChevereto 3_0_0' - imghdd_com_install_php.png
    63.8 KB · Views: 18
Last edited:
That is not a Chevereto error, mysql server is saying that the given credentials are wrong.
 
Well i actually have the same issue. All provided data are correct.

Maybe there is a incompatibility issue or you both are just using incorrect MySQL values. Take note that instead of "localhost" the system will always use 127.0.0.1, maybe your database users are not being bind to 127.0.0.1 as they do for localhost. Is the only thing in which I can think right now.

Note that we use 127.0.0.1 because is several times faster than using localhost.
 
I have the same problem. Upgrading from the last version to 3.0.0. I have my config.php file on the screen and cut/paste exactly the same info and it does not work. I created a new user in the SQL and tried that, no luck. I don't understand the comment about users not binding to SQL!! Everything connected fine until I tried to upgrade to 3.0.0.

I cannot add a DB user with a "number" in SQL, so now what?

Can't connect to the target database. The server replied with this:
SQLSTATE[HY000] [1045] Access denied for user 'image30'@'127.0.0.1' (using password: YES)
Please fix your MySQL info.

Hosting is GoDaddy - Linux hosting with cPanel

ALSO. I wrote a simple php file to connect to the database using the same credentials and display a field from the database. It WORKED no problem. Therefore I would say that my SQL connection is correct using the localhost, database, user and pass as before. Something in the new install does not seem to be working correctly. :(
 
Last edited:
Edit lib\G\classes\class.db.php

Change this:
PHP:
$pdo_connect = $this->driver . ':host='. ($this->host == 'localhost' ? '127.0.0.1' : $this->host) .';dbname=' . $this->name;

To this:
PHP:
$pdo_connect = $this->driver . ':host='. $this->host .';dbname=' . $this->name;

Save and upload and tell me if the connection works or not.
 
That worked! THANKS! GREAT SUPPORT! A+ Thanks Rodolfo!
Yes, I will remove that function from the Framework. It seems that sadly some servers doesn't bind localhost to 127.0.0.1 in terms of the users with permissions.
 
Status
Not open for further replies.
Back
Top