MyBB Community Forums

Full Version: Taking the Users?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
I am currently re-installing MyBB after a major problem with it, in the hope that this will recover the problem. I want to add my users back onto the current database, and also the threads. Is there anyway of doing this, be aware that I have now got different forums, and will only put the threads I see necessary back onto the system, by hand.

Alex
Im sure this can be done by exporting the database then importing it, unless you deleted/overwrited it.

You will need PHPMYADMIN i think Confused
In phpmyadmin go to the threads table, select the threads you want, change their fid to 1, then export them.
When you import those threads all of them will appear under the forum with fid 1 then you can move them manually using MyBB moderation tool to any other forum you want.

Also from phpmyadmin you need to export the following
  • mybb_posts
  • mybb_threadsread
  • polls
  • pollvotes
  • attachments

Those also you import them to the newly installed mybb db, prefferably the tables on the new db should be empty before you insert those to.
thanks zaher,

when I use the import feature to put the users into the new forum, I get the MySQL error:
#1136 - Column count doesn't match value count at row 1

Do I need to delete my account (halotree) and then completely dump the data in, or what is the problem?
Alex
Run them as query.
When you export do export them as file, rather let them be displayed on screen. Copy only the entries, without the table structure, and run them as a sql query in phpmyadmin, however without the line of the uid 1

example Wrote:INSERT INTO mybb_users VALUES (2, 'user2', 'fbf08e7c64d04354354354913dc', 'ROJ4SB2y', 'l439uA6hZZdWXKaHyaw6Wy1r7fpJIdh5CcfSfb3d4OOsekQzgD', '[email protected]', 3, 'images/avatars/mysql.png', '', 'gallery', 4, '', 0, '', 1171810059, 1172521143, 1172163573, 1172163571, '', '0', '', '', '', '', '', 'yes', 'no', 'yes', 'no', 'yes', 'yes', '', 'yes', 'linear', 'yes', 'yes', 'yes', 'yes', 0, 0, 0, '', '', '', 'no', '', '', 0, 'no', 0, '0', '', '1**Inbox$%%$2**Sent Items$%%$3**Drafts$%%$4**Trash Can', '', 0, 0, '', '', 6851, 1, 0, 0, 0);
INSERT INTO mybb_users VALUES (3, 'user1', '5da3fc0355b5435453798e72cde0f855', 'DQX9t4vs', 'gfkkAETyzhDcZHwXxq48z5uixXNxx5GbQwoglAeZ4Ewbm7FMrX', '[email protected]', 0, '', '', '', 5, '', 0, '', 1171967582, 1172221967, 1172221967, 0, '', '0', '', '', '', '', '', 'yes', 'no', 'no', 'no', 'yes', 'yes', '', 'yes', 'linear', 'yes', 'yes', 'yes', 'yes', 0, 0, 0, '', '', '+10', 'no', '', '', 0, 'no', 0, '0', '', '', '', 0, 0, '127.0.0.1', '', 208, 1, 0, 0, 0);

Pay attention to the table prefix.
example Wrote:INSERT INTO mybb_users VALUES (2, 'user2', 'fbf08e7c64d04354354354913dc', 'ROJ4SB2y', 'l439uA6hZZdWXKaHyaw6Wy1r7fpJIdh5CcfSfb3d4OOsekQzgD', '[email protected]', 3, 'images/avatars/mysql.png', '', 'gallery', 4, '', 0, '', 1171810059, 1172521143, 1172163573, 1172163571, '', '0', '', '', '', '', '', 'yes', 'no', 'yes', 'no', 'yes', 'yes', '', 'yes', 'linear', 'yes', 'yes', 'yes', 'yes', 0, 0, 0, '', '', '', 'no', '', '', 0, 'no', 0, '0', '', '1**Inbox$%%$2**Sent Items$%%$3**Drafts$%%$4**Trash Can', '', 0, 0, '', '', 6851, 1, 0, 0, 0);
INSERT INTO mybb_users VALUES (3, 'user1', '5da3fc0355b5435453798e72cde0f855', 'DQX9t4vs', 'gfkkAETyzhDcZHwXxq48z5uixXNxx5GbQwoglAeZ4Ewbm7FMrX', '[email protected]', 0, '', '', '', 5, '', 0, '', 1171967582, 1172221967, 1172221967, 0, '', '0', '', '', '', '', '', 'yes', 'no', 'no', 'no', 'yes', 'yes', '', 'yes', 'linear', 'yes', 'yes', 'yes', 'yes', 0, 0, 0, '', '', '+10', 'no', '', '', 0, 'no', 0, '0', '', '', '', 0, 0, '127.0.0.1', '', 208, 1, 0, 0, 0);

where is the UID?
Should I do this:

example Wrote:INSERT INTO mybb_users VALUES ('user2', 'fbf08e7c64d04354354354913dc', 'ROJ4SB2y', 'l439uA6hZZdWXKaHyaw6Wy1r7fpJIdh5CcfSfb3d4OOsekQzgD', '[email protected]', 3, 'images/avatars/mysql.png', '', 'gallery', 4, '', 0, '', 1171810059, 1172521143, 1172163573, 1172163571, '', '0', '', '', '', '', '', 'yes', 'no', 'yes', 'no', 'yes', 'yes', '', 'yes', 'linear', 'yes', 'yes', 'yes', 'yes', 0, 0, 0, '', '', '', 'no', '', '', 0, 'no', 0, '0', '', '1**Inbox$%%$2**Sent Items$%%$3**Drafts$%%$4**Trash Can', '', 0, 0, '', '', 6851, 1, 0, 0, 0);
INSERT INTO mybb_users VALUES (3, 'user1', '5da3fc0355b5435453798e72cde0f855', 'DQX9t4vs', 'gfkkAETyzhDcZHwXxq48z5uixXNxx5GbQwoglAeZ4Ewbm7FMrX', '[email protected]', 0, '', '', '', 5, '', 0, '', 1171967582, 1172221967, 1172221967, 0, '', '0', '', '', '', '', '', 'yes', 'no', 'no', 'no', 'yes', 'yes', '', 'yes', 'linear', 'yes', 'yes', 'yes', 'yes', 0, 0, 0, '', '', '+10', 'no', '', '', 0, 'no', 0, '0', '', '', '', 0, 0, '127.0.0.1', '', 208, 1, 0, 0, 0);
No i meant don't import your-self , your accont on the other forum. start from the second user and so on.
SQL query:

INSERT INTO mybb_users
VALUES ( 2, '*******', 'fd5b54979265486215628d05a2288b0e27', 'TdnFtNdZ', 'fItJqISXDcgWErvMAEW1AFfhdghfsdfDdFggTEsrydXqikGUlln', '***@***', 4, 100, '', '', '', 2, '', 0, '', 1167067727, 1172712008, 1171412577, 1167370321, '', '0', '', '', '', '', '<img>', 'yes', 'no', 'no', 'no', 'yes', 'yes', '', 'yes', 'linear', 'yes', 'yes', 'yes', 'yes', 0, 0, 0, '', '', '+10', 'no', '', '', 0, 'no', 0, '0', '', '1**Inbox$%%$2**Sent Items$%%$3**Drafts$%%$4**Trash Can', '', 0, 0, '71.37.72.155', '', 2663, 1, 2, 0, 0 ) ;

MySQL said: Documentation
#1136 - Column count doesn't match value count at row 1
Should I just delete the Mybb_users database and import it from fresh?
Alex
There is a difference between the query and the columns of the table.

Plese make sure that you haven't altered the MyBB_users table in the old database, because then they will have different columns. (If you have, then it is better to remove the table and create it according to the old one)

While exporting make sure you are exporting all columns, and can you select Complete inserts under data, and show us an example of the queries you will get. Also try to import after that.