2

Joomla 3.9.11

Working on localhost, today I decided to rename my database from dbtest to dbnew. I did this using HeidiSQL > rename db

When I visit my site I now see the following error;

Warning: session_start(): Failed to read session data: user (path: C:\xampp\tmp) in C:\xampp\htdocs\mysite\libraries\joomla\session\handler\native.php on line 260 Error: Failed to start application: Failed to start the session

I opened configuration.php and replaced all instances of dbtest with 'dbnew' but same thing.

I've also emptied the db sessions table, tried a different browser and restarted apache / mysql.

If I revert the name back to dbtest and change my configuration.php accordingly all works as expected. SO, what am I doing wrong, how can I change my db name correctly?

Any advice?

3

Found the answer.

When I renamed the database I also had to re-assign the database user to this database.

0

First check your session handler in configuration.php and try to set it to 'none'.

$session_handler = 'none';

That should work in most cases and you might get some information on the true causes of the failure.

In my case, the $session_handler was set to 'database' and I had an error in my database setup. If this applies to you as well, check your database setup carefully again (host, db, user & password).

1
  • Welcome to JSE and thank you for contributing. Please take our tour.
    – mickmackusa
    Jul 16 '20 at 21:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.