MyBB Community Forums

Full Version: New Host - MyBB SQL Error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2

MikeInToshx

Hey guys,

Not sure what is causing the error because I uploaded my database via phpmyadmin and changed these settings from config.php:

$config['hostname'] = ' ';
$config['username'] = ' ';
$config['password'] = ' ';
$config['database'] = ' ';
$config['table_prefix'] = 'mybb_';


Getting this error:

SQL Error:
1146 - Table 'computer_mybb.datacache' doesn't exist
Query:
SELECT title,cache FROM datacache


Though I'm not sure if the table prefix is causing it or something else...

Cheers
Quote:I uploaded my database via phpmyadmin and changed these settings from config.php:
[...]
$config['table_prefix'] = 'mybb_';

Do you mean you changed the table prefix or that you assigned the same prefix as in your database backup?

MikeInToshx

Well I tried removing the prefix line, and tried using these:

$config['table_prefix'] = 'mybb_';
$config['table_prefix'] = 'computer_';

I'm sure the database name, user and pass is correct, 100%.
Either the table prefix is incorrect or the table doesn't exist in the database.

MikeInToshx

Table mybb_datacache does excist, just checked in phpmyadmin.
Quote:SQL Error:
1146 - Table 'computer_mybb.datacache' doesn't exist
Query:
SELECT title,cache FROM datacache

Looks like to me you have the prefix appended to the database name rather than prepended to the table name. So 'computer_mybb.datacache' should actually be, '{databasename}.mybb_{tablename}'

MikeInToshx

Soo how do I fix it? No idea what u mean o.0
(2014-03-10, 03:17 PM)MikeInToshx Wrote: [ -> ]Soo how do I fix it? No idea what u mean o.0

this:

(2014-03-10, 03:00 PM)Nathan Malcolm Wrote: [ -> ]Either the table prefix is incorrect or the table doesn't exist in the database.

Make sure both are correct and your problems should go away.

MikeInToshx

Yeah well If only I knew WHAT to fix.. lol. Doesn't realy answer my question Sad

I have to remove the "mybb_" prefix off my database that I downloaded from my forum??
(2014-03-10, 03:27 PM)MikeInToshx Wrote: [ -> ]Yeah well If only I knew WHAT to fix.. lol. Doesn't realy answer my question Sad

I have to remove the "mybb_" prefix off my database that I downloaded from my forum??

Okay let me be more plain:
  • Look at the database and see what it is named
  • Go to your configuration file and check the the name is exactly right (the prefix has nothing to do with the database name, copy it exactly)
  • Check the prefix of all the tables in your database.
  • In your configuration file, check that the prefix is exactly the same as what is prepended to your table names
Pages: 1 2