Support

Pre-sales

#38225 issues with SQL during Angie

Posted in ‘Pre-sales and Account Questions’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by nicholas on Friday, 23 December 2022 08:10 CST

dslinkert

HiI've inherited a number of Joomla sites and already moved some successfully to my default hosting using akeeba and kickstart.

 

The latest site I need to move is not finishing the last step in ANGIE it can't connect to the database. I've already double checked the database name, user and password, upgraded to the latest version of akeeba free but nothing seems to work. 

Wil it make a difference with the pro backup version? the sites really only change once or twice a year and I don't really need it but I need this resolved.


see error log

 

Akeeba Backup Site Restoration Script v.8.2.3  Previous Skip Restoration Next No idea what you are supposed to do? Don't panic!  Read the documentation page
  • Pre-installation  
  • Database Restoration  
  • Site Setup  
  • Finished
 Show / hide help Restoration of site's main database Connection information Database type  MySQLi (preferred) MySQL (PDO driver)  Database server host name  User name  Password  Database name  Database table name prefix Advanced options With existing tables    Drop   Backup   Drop Same Prefix   Drop All   Select which tables to restore   Suppress foreign key checks   No auto value on zero   Use REPLACE instead of INSERT   Force UTF-8 collation on database   Force UTF-8 collation on tables   Allow UTF8MB4 auto-detection   Stop on CREATE error   Stop on other error  Fine tuning Do not change these settings unless you are requested to do so by our support or you REALLY know what you are doing.  Maximum execution time  Throttle time (msec) 

Copyright ©2006 – 2022 Akeeba Ltd. All rights reserved.
ANGIE is Free Software distributed under the GNU GPL version 3 or any later version published by the FSF.

      Database restoration An error occurred while restoring the database. The error message can be found below. Click on the × button at the top right of this dialog message to close it and return to the database restoration page.  Wrong database connection information

We were unable to connect to your database server using the server host name, username and password you provided.

The error received was:

Cannot connect to the database: one or more of the database host name, user name and password you have provided is incorrect.

Unable to connect to the Database: Could not connect to MySQL.

How to fix this errorShow / Hide
  • Check your database server host name. Remember that localhost and 127.0.0.1 have different meanings when connecting to a database.
  • Check your database name and database username. Most hosts prefix the database name with your hosting account username. If unsure, ask your host.
  • Check your password. Case matters: ABC, abc and Abc are three different passwords.
  • If you are copying or moving your site make sure to enter the database connection information for the new site.
  • If you do not have a database yet, you'll need to create one. Most hosts do not allow this restoration script to create a new database for security reasons.
  • If you created a new database make sure you have also created a database user and assigned the user to the database, giving it all privileges to the database.
Debug informationShow / Hide

Please include this information in your support request if you need further assistance. Do tell us which troubleshooting steps you've already tried.

Cannot connect to the database: one or more of the database host name, user name and password you have provided is incorrect.

/home/pdurlinger/domains/durlinger.nl/public_html/installation/framework/database/restore/mysqli.php:84

I checked on my hosting and there is no sql database listed, their default prefix would be pdulinger_, the prefix from the old hosting is oit16_, neither work.

#0 /home/pdurlinger/domains/durlinger.nl/public_html/installation/framework/database/restore/mysqli.php(46): ADatabaseRestoreMysqli->getDatabase()
#1 /home/pdurlinger/domains/durlinger.nl/public_html/installation/framework/database/restore.php(294): ADatabaseRestoreMysqli->__construct('site.sql', Array, Object(AContainer))
#2 /home/pdurlinger/domains/durlinger.nl/public_html/installation/angie/controllers/dbrestore.php(57): ADatabaseRestore::getInstance('site.sql', Array, Object(AContainer))
#3 /home/pdurlinger/domains/durlinger.nl/public_html/installation/framework/controller/controller.php(510): AngieControllerDbrestore->start()
#4 /home/pdurlinger/domains/durlinger.nl/public_html/installation/framework/dispatcher/dispatcher.php(263): AController->execute('start')
#5 /home/pdurlinger/domains/durlinger.nl/public_html/installation/framework/application/application.php(176): ADispatcher->dispatch()
#6 /home/pdurlinger/domains/durlinger.nl/public_html/installation/index.php(129): AApplication->dispatch()
#7 /home/pdurlinger/domains/durlinger.nl/public_html/installation/index.php(244): mainLoop()
#8 {main}
Unable to connect to the Database: Could not connect to MySQL.

/home/pdurlinger/domains/durlinger.nl/public_html/installation/framework/database/restore.php:828

#0 /home/pdurlinger/domains/durlinger.nl/public_html/installation/framework/database/restore/mysqli.php(75): ADatabaseRestore->getDatabase(false)
#1 /home/pdurlinger/domains/durlinger.nl/public_html/installation/framework/database/restore/mysqli.php(46): ADatabaseRestoreMysqli->getDatabase()
#2 /home/pdurlinger/domains/durlinger.nl/public_html/installation/framework/database/restore.php(294): ADatabaseRestoreMysqli->__construct('site.sql', Array, Object(AContainer))
#3 /home/pdurlinger/domains/durlinger.nl/public_html/installation/angie/controllers/dbrestore.php(57): ADatabaseRestore::getInstance('site.sql', Array, Object(AContainer))
#4 /home/pdurlinger/domains/durlinger.nl/public_html/installation/framework/controller/controller.php(510): AngieControllerDbrestore->start()
#5 /home/pdurlinger/domains/durlinger.nl/public_html/installation/framework/dispatcher/dispatcher.php(263): AController->execute('start')
#6 /home/pdurlinger/domains/durlinger.nl/public_html/installation/framework/application/application.php(176): ADispatcher->dispatch()
#7 /home/pdurlinger/domains/durlinger.nl/public_html/installation/index.php(129): AApplication->dispatch()
#8 /home/pdurlinger/domains/durlinger.nl/public_html/installation/index.php(244): mainLoop()
#9 {main}

nicholas
Akeeba Staff
Manager
 

The message already includes the information you need to solve this problem:

  • Check your database server host name. Remember that localhost and 127.0.0.1 have different meanings when connecting to a database.
  • Check your database name and database username. Most hosts prefix the database name with your hosting account username. If unsure, ask your host.
  • Check your password. Case matters: ABC, abc and Abc are three different passwords.
  • If you are copying or moving your site make sure to enter the database connection information for the new site.
  • If you do not have a database yet, you'll need to create one. Most hosts do not allow this restoration script to create a new database for security reasons.
  • If you created a new database make sure you have also created a database user and assigned the user to the database, giving it all privileges to the database.

It goes without saying that you MUST first enable MySQL support for the PHP version you are using i.e. the mysqlnd, pdo-mysql, or mysqli PHP extensions. If you don't know what that means, please ask your host.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

dslinkert

yes I tried and checked all that none of it seems to be wrong

 

I created an sql database with a different prefix than the original one and then entered those new details into the Angie interface but with similar or identical responses, so no luck

I then manually deleted everything upgraded akeeba on the old hosting took a new backup, cleared all files from the new hosting and rerun kickstart with the new backup files with exactly the same result.

 

it looka like the database is not created by ANGIE where with other sites I did moving to the same hosting this was never an issue

nicholas
Akeeba Staff
Manager

This list has been compiled out of hundreds of tickets I have replied to over the past 17 years. It covers 100% of all issues over these last 17 years. There have been zero cases since 2016 (when I stared keeping score) that someone who complained that these points do not apply to them has been right. In every single case it was one of these points, after all.

You don't have to believe me. If you were to try and install a new Joomla site you'd see that you have the same problem. Go ahead! Do that. See that the problem is with you, not with the software. Then come back to the list and check every item CAREFULLY.

PS: You said “it looka like the database is not created by ANGIE where with other sites I did moving to the same hosting this was never an issue”. Now read again the penultimate bullet point. You did not, in fact, follow all of the instructions carefully. You skimmed through the list and you've missed something obvious.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

dslinkert

I am sure  there is something I missed, after spending now over 6 hours on this problem I have learned more about the problem but not so much that I am able to solve it my last resort is to open a ticket. 

Obviously you are the expert and deal with these problems on a daily basis over many years. However repeating the same information in the tone you just wrote is not helpful to me so I'm still as stuck as before. I did not "skim" over your instructions I might not fully understand them though

As I already tried creating a database  (different prefix) with user and password (user also gets automatic prefix) and tried those settings in angie , it resulted in the same it would not finish, I do not remember if the error message was 100% identical.

 

So after reading your instructions again I am now at a loss what to try next

 

nicholas
Akeeba Staff
Manager

Let me tell you the red flags I have seen in our short interaction and why I think that you're not in the right frame of mind to receive help (and also why I am very annoyed).

First, I did tell you to check that MySQL support is enabled for PHP on your host. You replied seconds later that you have followed all the instructions. No, you have not! This was NOT part of the instructions and there's not a cat's chance in hell that you received my reply, went to your host's control panel, logged in, figure out which PHP version you are using, found the PHP configuration page, selected the right PHP version, verified the extensions selected from a list of 100+ extensions, came back to our site, and replied to me. The time between my reply and your reply was barely enough for you to compose your reply. A reply you kept on editing.

Second, you said “it looka like the database is not created by ANGIE where with other sites I did moving to the same hosting this was never an issue”. As I told you, the penultimate bullet point you had to check literally tells you that this is the case! You essentially told me you skimped through the instructions. And yet, you are convinced you didn't. I beg to differ, using your own words as the proof.

Third, I am pretty sure that the instructions you did read you didn't understand and didn't think it necessary to ask for clarifications. For example, the bullet point reads “Most hosts prefix the database name with your hosting account username. If unsure, ask your host”. So, what did you do? You only read the word "prefix" and assumed it talk about the Prefix you configure in the database settings, even though this doesn't stand grammatically or logically. You didn't ask your host, as you were told. So, no, you did not follow the instructions, you definitely didn't read the carefully, and I can tell. And yet, you are convinced that the instructions are useless.

Before you ask for help you must be willing to receive help.

If you come to me convinced that I am wrong I cannot help you.

As I said in my previous reply, start by trying to install Joomla from scratch.

I insist that you do. One thing I was taught as a Mechanical Engineer is that if you do not diagnose and get over the Dunning-Kruger effect you will never be able to solve any problem. What I asked you to do is pretty much what I do too when I catch myself thinking that the problem lies on an unfamiliar piece of software, not on how I am trying to use it. If my secondary test with a familiar piece of software confirms that the problem didn't lie with the software I am unfamiliar with I am far more likely to work diligently into figuring out what is the obvious point I missed the first several times I tried.

After doing that, you're ready to receive help.

The second thing to do is what I have already said twice: You need the mysqlnd, pdo-mysql, or mysqli PHP extensions to be enabled in the PHP configuration of the PHP version you are using on this site. If you don't know what that means, please ask your host.

There is a reason I am telling you to start by doing this.I am observing that cPanel on a few live hosts comes with a default PHP configuration on PHP 8 which doesn't have MySQL enabled by default. This part is NOT in the instructions you saw on your screen, or our documentation. This is a new thing I am observing, I am not sure how widespread it is, which is why I told you to check. 

If this doesn't help, then your problem is definitely one of the already mentioned issues. Do read https://www.akeeba.com/documentation/akeeba-backup-joomla/abidatabase.html very carefully. This is the expanded version of the instructions above. Read that page carefully, even if it sounds boring; don't skimp over it.

If you still cannot figure it out, you must contact your host. The have full access to your server and configuration, they can help you find the database connection information. That's why the instructions tell you to contact your host if all else fails. Your host will come back with a reply which will make it very clear which of the aforementioned bullet points you missed.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!