DB Function error 1146

Joomla version 1.0 is end-of-life and are no longer supported. Please use Joomla 3.x instead.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
digmarketing
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Thu Oct 01, 2009 7:17 pm

Re: DB Function error 1146

Post by digmarketing » Wed Mar 31, 2010 11:35 pm

I had this same issue. I found out that it was only because I had forgotten to inter my table info from the old site into the new site. As soon as I imported the MySQL file into the database the site showed up perfectly. Seems silly but that was all I forgot and the error was gone.

jairobg
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat May 22, 2010 12:28 am

Re: DB Function error 1146

Post by jairobg » Sat May 22, 2010 12:32 am

I move my joomla to godaddy hosting and now show the error 1146.

I check the prefix and is ok 'jos_' (in configuration file and database).
I check the database user and is ok.

I import the database using SQL code, any sugestion?

stevedknight
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sat Sep 06, 2008 9:21 am

Re: DB Function error 1146

Post by stevedknight » Wed Sep 15, 2010 8:19 pm

i have just had the same problem when moving sites from one hosting provider to another - i have successfully fixed the problem as when i re-imported the database into the new server it took the capitals out of my table prefix - changed the prefix to be in the same case in the configuration.php file and all works well

walkys
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Sep 22, 2010 1:53 am

Re: DB Function error 1146

Post by walkys » Wed Sep 22, 2010 2:11 am

here,s wha i,ve done

1 download the confing.php on my desktop
2 Deleted the file configuration.php in CPanel ;/public_html
As my change been done in Joomla back end: changed the ('jos_') to something else let say (walt_)
P.S - Once the change been done even if you use the Cpanel and change the 'walt_' to 'jos_' it,s not going to work because you might have an error ....
3 Used Dreamweaver to Edit the Php file back ans change the name back to 'jos_'
4 upload the file back to ;/public_html
var $dbprefix = 'jos_';
and it works..... i didnt change anything thing in my database or create any new table

cneal4
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun Oct 24, 2010 11:39 pm

Re: DB Function error 1146

Post by cneal4 » Wed Oct 27, 2010 5:43 pm

Thanks guys changing the configuration.php var $dbprefix = 'jos_'; to the name in my sql database worked for me.


Good luck this joomla thing is quite frustrating when you first start.

americanclassic
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Mar 29, 2011 8:27 am

Re: DB Function error 1146

Post by americanclassic » Wed Mar 30, 2011 10:30 pm

chopnaldo wrote:
While Changing from CB support to JomSocial support on a messenger based module I started to receive this error... Any advice would be appreciated...
I had the exact same thing while moving from cb to jomsocial somebody know more about this issue? I'm a bit of a newbie so you gys got help me out step by step

jtablesession::Store Failed
DB function failed with error number 1146
Table 'DB452082.jos_users_visitsession' doesn't exist SQL=INSERT INTO `jos_users_visitsession` ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id` ) VALUES ( 'lm3jqcki2m3pd2b7punfpmhg63','1261088982','','0','1','0' )

So what can i do now in my phpmyadmin which table exactly do i have to edit??
I'm getting a similar error with the plugins:


500 - An error has occurred.
DB function failed with error number 1146
Table 'LLHS_jo151.jos_plugins' doesn't exist SQL=INSERT INTO `jos_plugins`(`name`, `element`, `folder`, `access`, `ordering`, `published`, `iscore`, `client_id`, `params` ) VALUES('User - Jomsocial User', 'jomsocialuser', 'user', '0', '0', '1', '0', '0', '' )


if you found any way to fix it, please let me know! :)
I've never worked with joomla before, I only installed it because I wanted to create a small social network for my club members--I'm not too familiar with PHP.

User avatar
sonnyharrison1
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Mon Apr 04, 2011 4:43 pm

Re: DB Function error 1146

Post by sonnyharrison1 » Tue Apr 05, 2011 3:06 pm

I was able to fix the problem as stated by configuration.php var $dbprefix = 'jos_'; to the name in my sql database as well. No problems post config switch.

pepes
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Apr 26, 2011 10:03 am

Re: DB Function error 1146

Post by pepes » Tue Apr 26, 2011 1:05 pm

Hi me too I get DB Function error 1146 but is not the same error code that

Code: Select all

Table 'host_ac.tmp' doesn't exist SQL=SELECT b.`id` as _comment_last_id, b.`date` as _comment_date, count( b.`comment` ) as _comment_count, b.`comment` as _comment_last , b.`post_by` as _comment_last_by, c.`like` as _likes, a.*, TO_DAYS('2011-04-14 08:33:09') - TO_DAYS( DATE_ADD(a.`created`, INTERVAL 0 HOUR ) ) as _daydiff FROM `ac_community_activities` as a LEFT JOIN tmp as b ON a.`comment_id` = b.`contentid` AND a.`comment_type` = b.`type` LEFT JOIN `ac_community_likes` AS c ON a.`like_id` = c.`uid` AND a.`like_type` = c.`element` WHERE `archived`=0 GROUP BY a.`id` ORDER BY a.`created` DESC LIMIT 160
Anyone can help me?

Deep Si
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Jun 08, 2009 9:53 pm

Re: DB Function error 1146

Post by Deep Si » Sun May 08, 2011 1:21 pm

This error can also be generated as a result of a situation where tables have not been copied into the joomla database properly. So the table suffix might be correct, but some of the information is or tables are missing.

Examples of such situations might be a faulty migrations, restorations from backups or database copying from one host to another.

SoftCorpse
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Mon Apr 20, 2009 4:26 pm

Re: DB Function error 1146

Post by SoftCorpse » Thu May 31, 2012 1:20 pm

hi, I installed joomla with no prefix and am getting the following error:

jos_session' doesn't exist SQL=INSERT INTO `jos_session` (`session_id`, `client_id`, `time`) VALUES ('71fb22b2cd545a57eeb33f4e46fd7583', 0, '1338469886')

Am I not able to install joomla without a prefix?

Deep Si
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Jun 08, 2009 9:53 pm

Re: DB Function error 1146

Post by Deep Si » Thu May 31, 2012 5:38 pm

You possibly can 'successfully' install with no prefix at all. Much depends on how bulletproof the installation program is. If you manage to do that it probably won't work.

By default, the prefix is jos_

You can utilise your own prefix, however some custom extensions are poorly designed and assume jos_ for table names regardless, so they may fail to work in my own experience. I won't 'list' the names in order to protect the guilty.

Utilising your own unique prefix for the joomla! table names on your installation is considered a good security measure.

If you deleted jos_ from the prefix field, but did not type an alternative one then the installation process might have continued successfully to the end. However, the probable result will be a website that doesn't work.

It sounds like you may have table names like :- banner, category, components, session.

Joomla! probably won't be expecting that.

It wants names like jos_session or me_session. where me_ is an example of a custom table name prefix.

So
  1. check what the table names are.
  2. check the file configuration.php in the root directory for a setting:- var $dbprefix = '';

To rectify the situation you can either start a fresh installation or alternatively you might possibly:-
  1. rename ALL the joomla tables to have a prefix e.g. jos_session
  2. edit the configuration.php file line of text to state var $dbprefix = 'jos_'; so that it matches the table name prefixes.
That may avoid you having to perform a fresh install.

SoftCorpse
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Mon Apr 20, 2009 4:26 pm

Re: DB Function error 1146

Post by SoftCorpse » Thu May 31, 2012 6:43 pm

hehe, yea i get what you're saying. thanks for the reply!
guess i prefix will have to be used then, i was trying to find where it was hardcoded, but a major pain to do that, i will just settle for a custom prefix instead.

gsovis
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Apr 23, 2010 10:08 am

Re: DB Function error 1146

Post by gsovis » Mon Oct 07, 2013 10:06 am

I got the same error, but on the page tab I see "Error: 1146 Table 'nihss.nihss_tags' doesn't exist SQL=SELECT a.id as value, a.title as text.......". Reading earlier posts on this error I changed the prefix to jos_. Then the page did not load. I removed it. Now I get "Error displaying the error page:Application instantiation Error'. Please help me.

shawnlesky
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Jul 22, 2007 8:03 pm

Re: DB Function error 1146

Post by shawnlesky » Mon Jun 15, 2015 7:09 pm

I'm getting a DIFFERENT 1146 error I'd like to know how to fix; it's similar so I thought I'd post it here too.

Table '339331_12082013.dbl_users' doesn't exist SQL=SELECT id, password FROM dbl_users WHERE username='editedmyadminnameforsecurity purposes'

monlike
Joomla! Intern
Joomla! Intern
Posts: 71
Joined: Fri Jun 06, 2014 10:57 am
Location: sweden

Re: DB Function error 1146

Post by monlike » Tue Jun 16, 2015 6:50 am

do you change this ?
var $dbprefix = 'jos_';

if yes
It sounds like the sql isn't being fully copied over to your server. You can simply download the sql dumps from the downloads area and import them into the database via phpmyadmin. The sql dumps contain the same data as the site shapers just in sql form.

shawnlesky
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Jul 22, 2007 8:03 pm

Re: DB Function error 1146

Post by shawnlesky » Tue Jun 16, 2015 1:07 pm

I believe I changed that prefix to "dbl" instead of "jos", yes. However, I'm not quite sure how to go about taking your advice thereafter. I'm a novice when it comes to directly messing with the database. I have limited experience in there. I only touch it when I absolutely have to. I equate it to playing with a land mine, haha.

mviallon
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Oct 06, 2015 12:18 pm

Re: DB Function error 1146

Post by mviallon » Tue Oct 06, 2015 12:26 pm

Hello, i have this same error when I want to crate a menu item which is a translation of another one.
I have created the original menu in English and want to create the same in Spanish. When I select of which item it is the translation of, if gives me this:
No valid database connection: DB function failed with error number 1146
Table 'bohealth.jos_Menu' doesn't exist SQL=SELECT `id` AS id,`title` FROM `jos_Menu` AS c WHERE c.client_id = 0 AND c.lft > 0 AND (c.language="*" OR c.language='en-GB')

The same happens for articles.
Any idea?

Many thanks!


Locked

Return to “Installation - 1.0.x”