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.
Jules242
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Tue Sep 18, 2007 9:19 pm

DB Function error 1146

Post by Jules242 » Tue Apr 08, 2008 10:18 pm

Hello,

I need to transfer a functional joomla installation that is here:

http://qotsa.julianc.com

to another server. Because I am transferring to an IP for now, a joomla cloner script wasn't working right. I decided to do it manually, and got the working sql file from cpanel back as well as phpmyadmin afterwards to double check.

Once the joomla files were upload, the config file updated to match the sql info, I started getting this:

http://66.29.20.98/~thefade/

Code: Select all

DB function failed with error number 1146
Table 'thefade_joom13.jos_session' doesn't exist SQL=SELECT session_id FROM jos_session WHERE session_id = '092d5926226c80011d04bf20201fe8e0'
SQL =

SELECT session_id
 FROM jos_session
 WHERE session_id = '092d5926226c80011d04bf20201fe8e0'
Each time I refresh a different WHERE session_id = is shown. If the SQL works fine on the other server, and I've doubled checked, tried a repair, and done it over a few times, what could this be? Thanks for any help :)

User avatar
k4lch
Joomla! Hero
Joomla! Hero
Posts: 2799
Joined: Sat Dec 31, 2005 1:58 am
Contact:

Re: DB Function error 1146

Post by k4lch » Fri Apr 11, 2008 9:29 pm

check the db user is the same and database is the same.
you can go thru phpmyadmin and empty the session table
Loyd Headrick
http://wx4lh.info

pwdsoft
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Mon Apr 28, 2008 6:16 pm
Contact:

Re: DB Function error 1146

Post by pwdsoft » Mon Apr 28, 2008 6:48 pm

DB function failed with error number 1146

You have recieved this error because your database is not using jos_ as its prefix , if you let us know what your database prefix is we will change the code to suit your needs or if you are happy to edit code yourself .
Last edited by pe7er on Wed Apr 30, 2008 9:52 pm, edited 1 time in total.
Reason: URL removed, self promotion is not allowed
Thanks
pwdsoft
Website Design Development and Promotion
http://www.php-web-development.com

xerive
Joomla! Intern
Joomla! Intern
Posts: 55
Joined: Wed Jun 21, 2006 11:03 pm
Contact:

Re: DB Function error 1146

Post by xerive » Wed Apr 30, 2008 11:33 am

did you fix the error?

If you are having problems with installation we know some people that can help / will install for you.

Jules242
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Tue Sep 18, 2007 9:19 pm

Re: DB Function error 1146

Post by Jules242 » Wed Apr 30, 2008 12:14 pm

pwdsoft wrote:DB function failed with error number 1146
You have recieved this error because your database is not using jos_ as its prefix , if you let us know what your database prefix is we will change the code to suit your needs or if you are happy to edit code yourself .
How can I change the prefix?

pwdsoft
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Mon Apr 28, 2008 6:16 pm
Contact:

Re: DB Function error 1146

Post by pwdsoft » Wed Apr 30, 2008 5:17 pm

To Change prefix Go to your database and check correct prefix (common starting charcters of tablename). Put that prefix in your configuration file of joomla.
Last edited by pe7er on Wed Apr 30, 2008 9:52 pm, edited 1 time in total.
Reason: URL removed, self promotion is not allowed
Thanks
pwdsoft
Website Design Development and Promotion
http://www.php-web-development.com

lcipir
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu May 22, 2008 5:50 pm

Re: DB Function error 1146

Post by lcipir » Thu May 22, 2008 5:53 pm

$mosConfig_dbprefix = 'jos_';

is this the line your talking about in configuration file? If so, I'm having the same issue and my pre-fixes seem to match.

tabatha3m
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Jun 05, 2008 7:39 am

Re: DB Function error 1146

Post by tabatha3m » Thu Jun 05, 2008 7:43 am

I had the same error but pertaining to joomlat.bak_bb2_log. Joomlat is my database name and bak_ is the prefix for my tables. It turned out that the "bb2" was the Bad Behavior bot. I went into the settings for this bot and turned off the "verbose" setting and now I no longer see that mess at the top of my site.

Just wanted to let folks know what worked for me. If you can track down what piece is causing that and check the settings, it may be something similar.

connectivityanywhere
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Sat Jun 30, 2007 11:19 am

Re: DB Function error 1146

Post by connectivityanywhere » Sat Nov 08, 2008 12:12 pm

I am having the exact same problem, I checked my prefix in cpanel and it is rockandm_

In my config file it was jos_

I tried changing it and leaving it, adding the jos prefix to my username and that time it did at least tell me can not connect to the db.

I am at the end of my teather... can ANYONE please shed some light.

Ta

tabatha3m
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Jun 05, 2008 7:39 am

Re: DB Function error 1146

Post by tabatha3m » Wed Nov 12, 2008 7:32 am

Connectivityanywhere:

Can you paste the text from your error into a reply here? I think it might not be the prefix that's the problem. If you changed it or ensured the prefix was correct and this error is still getting thrown up, then maybe a component, mod or bot is causing the problem. That's what I explained in my post above. What text comes after the prefix in your error? If you can figure out what that is and disable it or change the settings (as in my case, where I turned off the verbose error reporting for the Bad Behavior bot) then your problem might be solved.

Cheers,
T.

akfirsttry
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Fri Feb 06, 2009 5:58 am
Contact:

Re: DB Function error 1146

Post by akfirsttry » Fri Feb 06, 2009 6:05 am

ok i just made a huge mistake by trying to change the prefix for the tables from the admin section and now i am getting the same error.

Code: Select all

jtablesession::store failed
DB function failed with error number 1146
Table 'joomla.computec_session' doesn't exist SQL=INSERT INTO `computec_session` ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id` ) VALUES ( '201a5cfd70ec046807563293d1ed8878','1233899163','','0','1','1' )

what should i do ..can someone help? Not able to open admin as well as the site.

tabatha3m
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Jun 05, 2008 7:39 am

Re: DB Function error 1146

Post by tabatha3m » Wed Feb 11, 2009 10:52 am

Why don't you log into the site where you're hosted - you should be able to get to your sql tables from there and fix the prefixes back to whatever they were. If that doesn't fix it then it's beyond me, I'm afraid.

User avatar
k4lch
Joomla! Hero
Joomla! Hero
Posts: 2799
Joined: Sat Dec 31, 2005 1:58 am
Contact:

Re: DB Function error 1146

Post by k4lch » Wed Feb 11, 2009 2:06 pm

log in to host control panel locate the configuration.php open it look for
this if 1.5 var $dbprefix = ' '; if 1.0
$mosConfig_dbprefix = ' ';

inside the ' ' change to match the prefix of your database then save it.
try to get into site now if prefix is correct then should be able to log in
Loyd Headrick
http://wx4lh.info

akfirsttry
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Fri Feb 06, 2009 5:58 am
Contact:

Re: DB Function error 1146

Post by akfirsttry » Thu Feb 12, 2009 8:38 am

thanks that fixed it :)

thedmob
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Sat Oct 11, 2008 2:13 pm

Re: DB Function error 1146

Post by thedmob » Fri Feb 27, 2009 9:19 am

Urgent! We're having problem when we try to access our frontpage from our Joomla Beckend. Kindly help us below is the error we're getting... and when i go to PHPmyadmin i don't see this table jos_content in the Database.
---- Error -----


DB function failed with error number 1146
Table 'sthelen1_sent.jos_content' doesn't exist SQL=SELECT c.*, g.name AS groupname, cc.title as name, s.title AS sect_name, u.name AS editor, f.ordering AS fpordering, v.name AS author FROM jos_content AS c LEFT JOIN jos_categories AS cc ON cc.id = c.catid LEFT JOIN jos_sections AS s ON s.id = cc.section AND s.scope="content" INNER JOIN jos_content_frontpage AS f ON f.content_id = c.id INNER JOIN jos_groups AS g ON g.id = c.access LEFT JOIN jos_users AS u ON u.id = c.checked_out LEFT JOIN jos_users AS v ON v.id = c.created_by WHERE c.state >= 0 ORDER BY fpordering , fpordering LIMIT 0, 20

founder
Joomla! Intern
Joomla! Intern
Posts: 86
Joined: Sat Dec 01, 2007 3:25 am

Re: DB Function error 1146

Post by founder » Fri Mar 20, 2009 5:53 am

dear hero,

my dbprefix is properly specified as
var $dbprefix = 'jos_';

and indeed, JSAS has a warning not to change this

but I still get the 1146 error message and the gibberish about
Table 'xxx.jos_session' doesn't exist

indeed, if you look at the list of db tables for this xxx database, you see there are no tables whatsoever -- on the other hand this is exactly the same situation that pertains with another site in a similar stage of development for which I get no such message!

indeed, the second site has been constructed by copying the files from the first site and making a few changes, yet for the first one everything works fine and for the second one I get the 1146 error message

ideas? oh yee who actually know the innards of joomla

User avatar
k4lch
Joomla! Hero
Joomla! Hero
Posts: 2799
Joined: Sat Dec 31, 2005 1:58 am
Contact:

Re: DB Function error 1146

Post by k4lch » Fri Mar 20, 2009 1:22 pm

did you create or import a database for the second site?
Loyd Headrick
http://wx4lh.info

founder
Joomla! Intern
Joomla! Intern
Posts: 86
Joined: Sat Dec 01, 2007 3:25 am

Re: DB Function error 1146

Post by founder » Sat Mar 21, 2009 8:57 pm

I created it, then imported the structure only from the previous one

founder
Joomla! Intern
Joomla! Intern
Posts: 86
Joined: Sat Dec 01, 2007 3:25 am

Re: DB Function error 1146

Post by founder » Sat Mar 21, 2009 9:00 pm

further thought to throw a monkeywrench (or a spanner, if you prefer) into all this: I have yet another site under development where all I did was create a new db, without importing anything -- in fact that db has no tables in it -- but for that site I have had no problems so far and do not get the 1146 message

founder
Joomla! Intern
Joomla! Intern
Posts: 86
Joined: Sat Dec 01, 2007 3:25 am

Re: DB Function error 1146

Post by founder » Sat Mar 21, 2009 10:06 pm

maybe it's not a monkeywrench, or even a spanner . . . a little more looking and it appears that although that third database was created by me (in the name of the site under development), the system (ie, JSAS) is not using it . . . instead it is using a database it itself creates when it installs joomla . . . these default databases are named some version of %mysql% and they do have the tables . . .

I suppose the same is true of my second site, and although I created a database for it and then imported tables into it, this is not being used either

so, to get back to the original issue, perhaps something went wrong when the default database was created for the second site -- and that's why I get the 1146 message

munts
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Mon Aug 04, 2008 9:44 pm

Re: DB Function error 1146

Post by munts » Fri Mar 27, 2009 12:27 pm

I am having the same issue. When I go into the MyPHPAdmin I do not even see a table called Session. Should I manually create one?

founder
Joomla! Intern
Joomla! Intern
Posts: 86
Joined: Sat Dec 01, 2007 3:25 am

Re: DB Function error 1146

Post by founder » Sun Mar 29, 2009 4:49 am

I think, now, the best way to deal with the 1146 message is just to start over

delete/uninstall what you have created and then recreate/reinstall what you want

when the new one comes up be sure to rename the configuration file so its name is:
configuration.php . . . otherwise you will get an error message

munts
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Mon Aug 04, 2008 9:44 pm

Re: DB Function error 1146

Post by munts » Sun Mar 29, 2009 3:48 pm

Thanks. However, I have a live site right now. If I do this what effect will this have on my site? If we are talking about a temporary downtime, then I am ok, but if I have to rebuild, then need to think about it more.

founder
Joomla! Intern
Joomla! Intern
Posts: 86
Joined: Sat Dec 01, 2007 3:25 am

Re: DB Function error 1146

Post by founder » Mon Mar 30, 2009 5:49 am

my experience is with localhost, so you will have to decide for yourself about what to do with a live site

I have discovered one thing about JSAS which is key here (and everywhere): when you Create A New Site, you get a popup which tells you you have to delete the installation folder when you are done

Don't believe it

Don't believe it, not because it is wrong, but because it is ambiguous (and ambiguity is a bedfellow of JSAS).

Do not delete the installation file right after it has been created! In fact, you have to access your site through localhost first -- so that you will be led through a series of screens which create username/password that you will later need to access your site's backend (ie, accessing yoursite/administrator with a username and password)

only after all that do you delete the installation folder

should you delete it before this you will never be able to login successfully to
yoursite/administrator

erikw493
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Apr 29, 2009 4:33 pm

Re: DB Function error 1146

Post by erikw493 » Wed Apr 29, 2009 4:44 pm

I had a similar 1146 error when installing AlfContact component. The problem for me was that the Joomla installer had not created the necessary tables in MySQL. I unzipped the AlfContact package and found the SQL install script, then opened in notepad and changed relative table names to absolute in 4 places. I then copied and pasted into phpmyadmin and ran without issues. Component works great now.

So before getting frustrated, be sure to check to make sure the table being requested actually exists in your DB. If it doesn't you may be able to fix easily in a similar way. I hope this helps someone else!

GNETZedd
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Aug 04, 2009 8:01 am

Re: DB Function error 1146

Post by GNETZedd » Tue Aug 04, 2009 9:41 am

While Changing from CB support to JomSocial support on a messenger based module I started to receive this error... Any advice would be appreciated...

DB function failed with error number 1146
Table 'gnrmgr_jo151.jos_community_connection' doesn't exist SQL=SELECT DISTINCT c.avatar, m.connect_from , s.username , s.session_id, u.name FROM jos_community_connection m, jos_community_users c, jos_session s, jos_users u WHERE m.connect_to = '70' AND u.id = s.userid and m.connect_from = s.userid and c.userid = s.useridDB function failed with error number 1146
Table 'gnrmgr_jo151.jos_community_users' doesn't exist SQL=SELECT avatar FROM jos_community_users WHERE userid = 70

katandmouse
Joomla! Intern
Joomla! Intern
Posts: 69
Joined: Mon Oct 29, 2007 4:20 pm

Re: DB Function error 1146

Post by katandmouse » Thu Oct 01, 2009 7:02 pm

I get this EVERY TIME I try to install Joomla manually now on many different servers. The only way I've been able to figure out how to get around the problem is to use Fantastico if it is available and have it install it. Problem is, not all my clients have Fantastico available to them. I've had to go so far as to move their sites to get around the problem.

Can the Joomla folks please fix this? I see lots of people struggling with it.

luis23045
Joomla! Explorer
Joomla! Explorer
Posts: 459
Joined: Mon Mar 09, 2009 9:54 am
Location: Dallas, TX
Contact:

Re: DB Function error 1146

Post by luis23045 » Mon Oct 05, 2009 5:43 am

There should be a good tutorial available or a video tutorial for this. We do all of our transfers manually and all of them are like a breeze. Of course at the beginning we were challenged because we were using different database prefixes. One time when we installed a website with a different prefix that we called soley instead of jos_, it cause problems in when trying to export, because we were trying to install it with jos_ database prefix instead of a soley database prefix. Be always sure you change the prefix database.

We always use linux server. They are more easier to use.
http://cmsteachings.com - Joomla Tips & Tutorials
http://ubrainmedia.com - My Joomla Company
My Joomla Advice is my personal experience. It does not means I am right or wrong. It just means that I work with Joomla in my own way and it works for me.

chopnaldo
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Dec 17, 2009 6:38 pm

Re: DB Function error 1146

Post by chopnaldo » Thu Dec 17, 2009 10:31 pm

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??

JJL
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Mar 03, 2010 11:15 pm

Re: DB Function error 1146

Post by JJL » Wed Mar 03, 2010 11:39 pm

I have the same issue, I am getting the 1146 error message, however I tried to change in the configuration.php file the var $dbprefix = 'jos_ '; but I received the following error message "Cannot save configuration.php.", Can you kindly help me with this error message?


Locked

Return to “Installation - 1.0.x”