MyBB Community Forums

Full Version: Error 0 after restoring backup
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi there  Shy

In a shared hosting environment, I backuped via CPanel the home-directory and the MySQL-database.

After complete reset of the shared hosting account, I restored both files via CPanel.

When I go to www.domain.com/index.php, it shows:


MyBB has experienced an internal SQL error and cannot continue.

SQL Error:0 -Query:[READ] Unable to select database


In the CPanel phpmyadmin and Mysqldatabases the database is shown correctly.

inc/config.php:

$config['database']['type'] = 'mysqli';

$config['database']['database'] = 'Name as shown in CPanel -Mysqldatabases  ';

$config['database']['table_prefix'] = 'same prefix as above _';



$config['database']['hostname'] = 'localhost';

$config['database']['username'] = 'generated new user with all privileges';
$config['database']['password'] = 'password from above';


maybe there is a better/correct way to restore a backup?


any hints?
You've probably restored it fine, but the name of the database is just wrong. Check with your host that you're using the right name.
checked it several times  Huh


I also tried after deleting everything to install a new forum with new database und imported the old one with phpmyadmin, however import works, but i can't see any old posts or structure in the forum  Huh
Still sounds like it's not the right database then if you're importing it but not seeing any of it.
after import, I can see 74 imported tables, so looks like everything ok (have only 1 database)

but in the forum, nothing  Huh
Not sure what else I can suggest other than checking with your host.
when I have a fresh and working installation of mybb and want to import an old database via phpmyadmin, do I have to "drop tables" first and how is it done?
It depends on whether the backup includes queries to drop tables, but to drop them, you just need to select them all in phpMyAdmin, and choose to drop them from the dropdown near the bottom of the page.
Exist more tables in your database after importing it? If yes then you use another prefix, that's the reason why nothing change after importing the data.
How does it work if the new database has another, not changeable, prefix?
Pages: 1 2