MyBB Community Forums

Full Version: MySQL Error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was switching servers, and so I naturally had to transfer the database.

I got the SQL file of the previous SQL database and tried importing it via phpMyAdmin. I got this error:
[attachment=12238]

How to fix this?

MySQL Version: 5.0.67-community
PHP Version: 5.2.8

EDIT: Later when I tried to do it via GZIP compressed, it said 70 queries were successful, but when I checked, only mybb_adminlog was in there.

I am using MyBB 1.4.4, but that isn't related to the problem because it's not only with mybb_. It is with several others, too.
Open the file: ..install/resources/mysql_db_tables.php on line 12 check this:
Quote:$tables[] = "CREATE TABLE likebb_adminlog (
(2009-01-02, 08:24 AM)Giangy94 Wrote: [ -> ]Open the file: ..install/resources/mysql_db_tables.php on line 12 check this:
Quote:$tables[] = "CREATE TABLE likebb_adminlog (

Why?? They're importing a backup, no files are being used.

PHPMyAdmin aren't really in the scope of MyBB support, but if you can post the line of code it's showing in the error, plus the lines areound it, we might be able to see if there's soemthing wrong with it.
Though I am importing a backup, I exported it through the MyBB Control Panel. It also wouldn't work exporting via phpMyAdmin or phpMiniAdmin.

Here is the beginning of my SQL file.
-- MyBB Database Backup
-- Generated: 01st January 2009 at 23:49
-- -------------------------------------

CREATE TABLE `mybb_adminlog` (
  `uid` int(10) unsigned NOT NULL default '0',
  `ipaddress` varchar(50) NOT NULL default '',
  `dateline` bigint(30) NOT NULL default '0',
  `module` varchar(50) NOT NULL default '',
  `action` varchar(50) NOT NULL default '',
  `data` text NOT NULL,
  KEY `module` (`module`,`action`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO mybb_adminlog (uid,ipaddress,dateline,module,action,data) VALUES ('1','76.105.111.214','1220585113','config/settings','change','a:0:{}');
INSERT INTO mybb_adminlog (uid,ipaddress,dateline,module,action,data) VALUES ('1','76.105.111.214','1220647695','config/plugins','activate','a:2:{i:0;s:7:\"akismet\";i:1;b:1;}');
INSERT INTO mybb_adminlog (uid,ipaddress,dateline,module,action,data) VALUES ('1','76.105.111.214','1220647719','config/settings','change','a:0:{}');
INSERT INTO mybb_adminlog (uid,ipaddress,dateline,module,action,data) VALUES ('1','76.105.111.214','1220647807','user/groups','edit','a:2:{i:0;s:1:\"3\";i:1;s:17:\"Global Moderators\";}');
INSERT INTO mybb_adminlog (uid,ipaddress,dateline,module,action,data) VALUES ('1','76.105.111.214','1220647840','user/titles','delete','a:3:{i:0;s:1:\"1\";i:1;s:6:\"Newbie\";i:2;s:1:\"0\";}');
INSERT INTO mybb_adminlog (uid,ipaddress,dateline,module,action,data)
Then, although I don't know much about this, it might be some sort of encoding issue.

I installed a forum and made a backup of it, for the purpose of giving it to people to save having to run the installation script, it was just an SQL file of a database as it is straight after installation. I can upload it fine to an empty database and so can some other people, but some people can't and experience a similar error to what you have, and apparently there was an encoding issue.
It has also been happening to my other tables. There does seem to be a problem. Can you explain to me the encoding issue and how to fix it?
I seriously need immediate help. How do you fix the encoding problem???