Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: PeterL62 on October 23, 2015, 03:33:11 AM

Title: Database error
Post by: PeterL62 on October 23, 2015, 03:33:11 AM
hello everyone,

i am struggling with a database error : #1146 - Table 'ace.smf_attachments' doesn't exist
I can export the DB but i cannot import it elsewhere; means that i can not move to another hoster!
I was reading here: http://www.simplemachines.org/community/index.php?topic=232048.0  but this does not work for me.
Is someone here that could solve this problem for me at a reasonable charge

Thank you!
PeterL
Title: Re: Database error
Post by: Illori on October 23, 2015, 05:18:10 AM
can you verify in your database vis phpmyadmin or similar, that the table actually exists?

why are you trying to import the database somewhere else? in what way are you trying to import the database?
Title: Re: Database error
Post by: PeterL62 on October 24, 2015, 07:43:03 AM
Hello Illori,

as far as i can see it does not exist.
In fact i am using SMF 1.1.21 and would like t upgrade to 2.0.11
We also want to another hoster.

PeterL
Title: Re: Database error
Post by: Illori on October 24, 2015, 08:59:51 AM
do you have a database backup that includes that table? does your host if you do not? your install will not work without all database tables in place.
Title: Re: Database error
Post by: PeterL62 on October 28, 2015, 03:30:12 AM
Hello Illori,

completely overlooked :-[
I can see this:


--
-- Tabel structuur voor tabel `smf_attachments`
--

CREATE TABLE `smf_attachments` (
  `ID_ATTACH` int(10) unsigned NOT NULL auto_increment,
  `ID_THUMB` int(10) unsigned NOT NULL default '0',
  `ID_MSG` int(10) unsigned NOT NULL default '0',
  `ID_MEMBER` mediumint(8) unsigned NOT NULL default '0',
  `attachmentType` tinyint(3) unsigned NOT NULL default '0',
  `filename` tinytext NOT NULL,
  `size` int(10) unsigned NOT NULL default '0',
  `downloads` mediumint(8) unsigned NOT NULL default '0',
  `width` mediumint(8) unsigned NOT NULL default '0',
  `height` mediumint(8) unsigned NOT NULL default '0',
  `file_hash` varchar(40) NOT NULL default '',
  PRIMARY KEY  (`ID_ATTACH`),
  UNIQUE KEY `ID_MEMBER` (`ID_MEMBER`,`ID_ATTACH`),
  KEY `ID_MSG` (`ID_MSG`)
) ENGINE=MyISAM AUTO_INCREMENT=67 DEFAULT CHARSET=utf8 AUTO_INCREMENT=67 ;

--
-- Gegevens worden uitgevoerd voor tabel `smf_attachments`
--

PeterL
Title: Re: Database error
Post by: Sir Osis of Liver on October 28, 2015, 01:43:19 PM
There appears to be a problem with the table prefix.   Your forum is looking for ace.smf_attachments, the database is working with smf_attachments.  When you view the db in phpmyadmin, what is the prefix for all tables?
Title: Re: Database error
Post by: Illori on October 28, 2015, 01:50:23 PM
Quoteace.smf_attachments

the ace. part is the name of the database table that is being used. not part of the prefix.
Title: Re: Database error
Post by: Sir Osis of Liver on October 28, 2015, 02:03:33 PM
Really?  That doesn't make sense.  Prefix, by definition, precedes table name.  I've never seen it any other way.
Title: Re: Database error
Post by: Illori on October 28, 2015, 02:05:28 PM
i have seen error messages with the database name in it before the prefix before.
Title: Re: Database error
Post by: Sir Osis of Liver on October 28, 2015, 02:14:42 PM
So it's not the table name, but database name added on before table prefix?  There's a 2.0 thread that seems to show a similar error.
Title: Re: Database error
Post by: Illori on October 28, 2015, 02:32:43 PM
right, dbname.table the name of the table includes the prefix.
Title: Re: Database error
Post by: PeterL62 on October 29, 2015, 12:14:45 PM
interesting discussion however i have no idea where this is all about;
Ik bedoel, wat kan ik doen om het probleem op te lossen ??

Thanks both of you
Peter
Title: Re: Database error
Post by: Kindred on October 29, 2015, 12:18:50 PM
Did you actually restore ALL tables?  if the attachments table does not exist -- then there is a chance that other tables also do not exist  -- basically, it seems that your restoration did not actually restore all tables.
Title: Re: Database error
Post by: PeterL62 on October 31, 2015, 06:37:35 AM
Where can i restore ALL tables; in phpMyAdmin??

peterL
Title: Re: Database error
Post by: Kindred on October 31, 2015, 06:44:40 AM
well, how did you restore the database, in the first place?

but yes...   usually you should use phpmyadmin