Score:0

Joomla 4 MySQL Not Fully Initialized Issue

sa flag

I am getting this error when trying to run my Joomla site:

Access denied for user 'testuser'@'localhost' (using password: YES)

Now, heres the thing. I just moved a Joomla 4 site from one VPS to this new one. The old mysql version was 5.7. The new version is 8.0 Also on my last VPS php was version 8.0 The new version is 8.1

I created a database n the new VPS and logged in through putty/console and installed the database through mysql SOURCE.

That cause the above problem so I tried importing the database through phpmyadmin. There were no issues with the import.

The top of the webpage also read: mysqli object is not fully initialized

So not sure what the problem could be.

Any ideas appreciated. Im not sure what Im missing. I also installed a letsencryps ssl but that doesnt seem to be working either.

Thanks.

END NOTE: I just tried with the root user and the site works fine. So its the GRANT permission that stops the site opening when using a testuser. Any ideas how to get around that or give the testuser full GRANT permissions?

Thanks

here are some of the errors that are also produced:

Error: mysqli object is not fully initialized

at /var/www/public_html/mywebsitedomain.com/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:137 at mysqli->prepare() (/var/www/public_html/mywebsitedomain.com/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:137) at Joomla\Database\Mysqli\MysqliStatement->__construct() (/var/www/public_html/mywebsitedomain.com/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:1089) at Joomla\Database\Mysqli\MysqliDriver->prepareStatement() (/var/www/public_html/mywebsitedomain.com/libraries/vendor/joomla/database/src/DatabaseDriver.php:1900) at Joomla\Database\DatabaseDriver->setQuery() (/var/www/public_html/mywebsitedomain.com/libraries/src/Menu/SiteMenu.php:166) at Joomla\CMS\Menu\SiteMenu->Joomla\CMS\Menu{closure}() (/var/www/public_html/mywebsitedomain.com/libraries/src/Cache/Controller/CallbackController.php:51) at Joomla\CMS\Cache\Controller\CallbackController->get() (/var/www/public_html/mywebsitedomain.com/libraries/src/Menu/SiteMenu.php:179) at Joomla\CMS\Menu\SiteMenu->load() (/var/www/public_html/mywebsitedomain.com/libraries/src/Menu/AbstractMenu.php:333) at Joomla\CMS\Menu\AbstractMenu->getMenu() (/var/www/public_html/mywebsitedomain.com/libraries/src/Menu/AbstractMenu.php:164) at Joomla\CMS\Menu\AbstractMenu->getItem() (/var/www/public_html/mywebsitedomain.com/libraries/src/Application/SiteApplication.php:422) at Joomla\CMS\Application\SiteApplication->getTemplate() (/var/www/public_html/mywebsitedomain.com/libraries/src/Error/Renderer/HtmlRenderer.php:50) at Joomla\CMS\Error\Renderer\HtmlRenderer->render() (/var/www/public_html/mywebsitedomain.com/libraries/src/Exception/ExceptionHandler.php:121) at Joomla\CMS\Exception\ExceptionHandler::render() (/var/www/public_html/mywebsitedomain.com/libraries/src/Exception/ExceptionHandler.php:72) at Joomla\CMS\Exception\ExceptionHandler::handleException() (/var/www/public_html/mywebsitedomain.com/libraries/src/Application/CMSApplication.php:322) at Joomla\CMS\Application\CMSApplication->execute() (/var/www/public_html/mywebsitedomain.com/includes/app.php:61) at require_once('/var/www/public_html/mywebsitedomain.com/includes/app.php') (/var/www/public_html/mywebsitedomain.com/index.php:32)

[1/2] mysqli_sql_exception mysqli_sql_exception: Access denied for user 'TheDrumCoach'@'localhost' (using password: YES)

at /var/www/public_html/mywebsitedomain.com/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:310 at mysqli->real_connect() (/var/www/public_html/mywebsitedomain.com/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:310) at Joomla\Database\Mysqli\MysqliDriver->connect() (/var/www/public_html/mywebsitedomain.com/libraries/vendor/joomla/session/src/Handler/DatabaseHandler.php:233) at Joomla\Session\Handler\DatabaseHandler->open() at session_start() (/var/www/public_html/mywebsitedomain.com/libraries/vendor/joomla/session/src/Storage/NativeStorage.php:478) at Joomla\Session\Storage\NativeStorage->start() (/var/www/public_html/mywebsitedomain.com/libraries/src/Session/Storage/JoomlaStorage.php:295) at Joomla\CMS\Session\Storage\JoomlaStorage->start() (/var/www/public_html/mywebsitedomain.com/libraries/vendor/joomla/session/src/Session.php:406) at Joomla\Session\Session->start() (/var/www/public_html/mywebsitedomain.com/libraries/vendor/joomla/session/src/Session.php:333) at Joomla\Session\Session->has() (/var/www/public_html/mywebsitedomain.com/libraries/src/Session/Session.php:194) at Joomla\CMS\Session\Session->get() (/var/www/public_html/mywebsitedomain.com/libraries/src/Factory.php:374) at Joomla\CMS\Factory::getUser() (/var/www/public_html/mywebsitedomain.com/libraries/src/Application/SiteApplication.php:562) at Joomla\CMS\Application\SiteApplication->initialiseApp() (/var/www/public_html/mywebsitedomain.com/libraries/src/Application/SiteApplication.php:226) at Joomla\CMS\Application\SiteApplication->doExecute() (/var/www/public_html/mywebsitedomain.com/libraries/src/Application/CMSApplication.php:293) at Joomla\CMS\Application\CMSApplication->execute() (/var/www/public_html/mywebsitedomain.com/includes/app.php:61) at require_once('/var/www/public_html/mywebsitedomain.com/includes/app.php') (/var/www/public_html/mywebsitedomain.com/index.php:32)

Score:0
in flag

If the goal is to have testuser operate with the same level of permissions as root, then you can do this from inside MySQL:

GRANT ALL PRIVILEGES ON `joomladb`.* TO `testuser`@`localhost`

Note: Be sure to replace joomladb with the actual name of the database.

Your error log shows a different account name failing so, if multiple accounts need full access to this database, be sure to run it once for each account.

sa flag
Thanks, That worked. But I believe I ttried that previously. I must have gotten the password smixed up because I also changed the password and it now works fine. Thanks.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.