MyBB Community Forums
Attachmentdatabase issues - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: Attachmentdatabase issues (/thread-213444.html)

Pages: 1 2


Attachmentdatabase issues - ESForum - 2017-10-08

My hosts were giving me hassle about bandwidth issues and while I was looking at solutions I messed up my attachment database. I thought I had figured it out and fixed it but now no one can add attachments, option works but the attachment simple doesnt show up.

Could someone maybe have a look if I supplied admin access? Matt helped me out before


RE: Attachmentdatabase issues - Wires - 2017-10-08

What do you mean you've messed up the attachment database? Did you delete the table or alter the structure or something?


RE: Attachmentdatabase issues - ESForum - 2017-10-09

(2017-10-08, 04:07 PM)Wires Wrote: What do you mean you've messed up the attachment database? Did you delete the table or alter the structure or something?

Yeah, I meant to empty it and dropped it instead. Created a new database and it seemed to work but now, nope.


RE: Attachmentdatabase issues - Wires - 2017-10-09

Try the following for the latest version of MyBB:

DROP TABLE IF EXISTS `mybb_attachments`;
CREATE TABLE `mybb_attachments` (
  `aid` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `pid` int(10) unsigned NOT NULL DEFAULT '0',
  `posthash` varchar(50) NOT NULL DEFAULT '',
  `uid` int(10) unsigned NOT NULL DEFAULT '0',
  `filename` varchar(120) NOT NULL DEFAULT '',
  `filetype` varchar(120) NOT NULL DEFAULT '',
  `filesize` int(10) unsigned NOT NULL DEFAULT '0',
  `attachname` varchar(120) NOT NULL DEFAULT '',
  `downloads` int(10) unsigned NOT NULL DEFAULT '0',
  `dateuploaded` int(10) unsigned NOT NULL DEFAULT '0',
  `visible` tinyint(1) NOT NULL DEFAULT '0',
  `thumbnail` varchar(120) NOT NULL DEFAULT '',
  PRIMARY KEY (`aid`),
  KEY `pid` (`pid`,`visible`),
  KEY `uid` (`uid`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;



RE: Attachmentdatabase issues - ESForum - 2017-10-10

Im sorry, Am I running this somewhere or using the values to create a new database via phpmyadmin?


RE: Attachmentdatabase issues - Wires - 2017-10-10

(2017-10-10, 02:27 PM)ESForum Wrote: Im sorry, Am I running this somewhere or using the values to create a new database via phpmyadmin?

Run the above as a query in your current database via PhpMyAdmin.


RE: Attachmentdatabase issues - ESForum - 2017-10-13

ran that I think but no difference

In my orphanat attachments it says "Not in attachments table" as the reason for being orphaned


RE: Attachmentdatabase issues - broatcast - 2017-10-16

This only create a new table for your attachments but not link to the old one... this will be hard work to restore this manualy if you don't have backups.


RE: Attachmentdatabase issues - ESForum - 2017-10-20

I dont have anything in there, I dont have any attachments so creating a new tables fine once poeple can start adding attachments again afterwards


RE: Attachmentdatabase issues - broatcast - 2017-10-20

Then you are lucky Wink... dont forget to make constantly backups.. specialy before you try something out or change something or install something.... ever ever ever make a backup befor.