MyBB Community Forums

Full Version: Recuperar pelo SQL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Olá. Podem me ajudar?
Eu exportei o sql do forum. 
Deletei o antigo, e instalei novamente o MyBB 1.8.27.

Entrei no Cpanel e fiz o upload do sql. Como eu recupero meus posts?
como faz para aparecer eles todos novamente?

obrigado
You have to import the exported database into the instance created when you re-installed MyBB.  I do something similar when importing live data into my test system.  I have "drop table if exist" instruction with my backup sql - so just do it from the command line.  Your situation might be (probably is) quite different.  Wink

Will leave it to someone else to take it from there, since I don't use phpmyadmin to restore backups.

Since you asked pretty well the same question here, might be a good idea to understand what you're trying to achieve.

You say you "deleted the old one, and installed MyBB 1.8.27 again".  Guessing that means the database, but not entirely clear.  If so, how did you delete the database?  What did do you with the existing MyBB files?  If overwritten, not a bad thing - but I'd watch out for misbehaving plugins etc.  Dealing with those might be one of your first orders of business.  As @Existus points out in the link above, restoring the database brings back everything - not just the posts.

Importing a database is typically done via phpmyadmin or the MySQL command line - likely via SSH.  The former tool wouldn't require uploading anything via cpanel, but command line would.  In general terms - the target database has to exist but be empty - i.e. - no tables.  Unless - as I mention in my previous reply - your backup SQL has a drop tables directive.  Otherwise you have to do it manually.  A MyBB database backup WOULD NOT have this.  YMMV on a cpanel backup from your host.

To check, open the exported sql file with a text editor.  Should see something like this at the first table:

DROP TABLE IF EXISTS

So asking what to do with the sql file depends on a number of factors you've not made exactly clear. Wink