MyBB Community Forums

Full Version: SQL Error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello; I am having trouble with setting up the MySQL database for MyBB. I get the error:
MyBB has experienced an internal SQL error and cannot continue.

SQL Error:1146 - Table 'mybb.mybb_datacache' doesn't existQuery:SELECT title,cache FROM mybb_datacache
How do I fix this error? Should I post the MySQL database? If so, how. Sorry, this is my first time posting on MyBB. I apologize if I did anything wrong.
are you trying to use a old database ? is the table prefix correct ?
Quote:This occurs when you are using MySQL and the database table prefix is incorrect in inc/config.php file.
To fix this, open inc/config.php file and check the entry for $config['database']['table_prefix'].
If you do not know what needs to be here, contact your host provider.

Note: php files should be saved with utf-8 encoding without Byte Order Mark.
in general, we use editor like Notepad++ or file editor at web host panel to edit the files.
(2020-02-23, 03:06 AM).m. Wrote: [ -> ]are you trying to use a old database ? is the table prefix correct ?
Quote:This occurs when you are using MySQL and the database table prefix is incorrect in inc/config.php file.
To fix this, open inc/config.php file and check the entry for $config['database']['table_prefix'].
If you do not know what needs to be here, contact your host provider.

Note: php files should be saved with utf-8 encoding without Byte Order Mark.
in general, we use editor like Notepad++ or file editor at web host panel  to edit the files.
I'm using XAMPP and hosting it on my computer on localhost. I don't know much about MySQL, sadly, but have used XAMPP before. To answer your first question no. XAMPP decided it doesn't like my computer and I had to reinstall it and set up he table all over again because I made the poor choice of not saving the database. For your second question in the past I didn't have to change the config.php file, so I think so. Sorry, I don't know what you mean.  Confused Sad
are you installing a new MyBB forum or setting up old forum on xampp ?

can you check the database through phpMyAdmin & ensure that the table prefix tallies in config.php file
(2020-02-23, 04:09 AM).m. Wrote: [ -> ]are you installing a new MyBB forum or setting up old forum on xampp ?

can you check the database through phpMyAdmin & ensure that the table prefix tallies in config.php file
I am installing an old forum.

Also I don't see the table prefix in the config.inc.php file.
<?php
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */

/*
* Servers configuration
*/
$i = 0;

/*
* First server
*/
$i++;

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = '0000';
$cfg['Servers'][$i]['password'] = '0000';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';

/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = 'localhost:3306';
$cfg['Servers'][$i]['connect_type'] = 'tcp';

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';

/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';

/*
* End of servers configuration
*/

?>
^ please check in "config.php" named file in inc folder