|
Search:     Advanced search
Browse by category:
Glossary

Database function failed with error 1054

Add comment
Votes: 0
Comments: 0
Posted: 22 Mar, 2008
by: Pope L.
Updated: 02 Aug, 2008
by: Pope L.
Problem:
You are running an old version of Mambo and it suddenly stops working when your host updates MySQL.

You get an error similar to this:
 " DB function failed with error number 1054
Unknown column 'c.access' in 'on clause' SQL=SELECT c.*, g.name AS groupname, cc.name, v.name AS author FROM mos_content AS c, mos_categories AS cc, mos_sections AS s LEFT JOIN mos_groups AS g ON g.id = c.access LEFT JOIN mos_users AS v ON v.id = c.created_by WHERE c.state = -1 AND c.catid=cc.id AND cc.section =s.id AND s.scope='content' ORDER BY c.catid, c.ordering LIMIT 0,10"

Reason:

You are running an old version of Mambo. Your host has upgraded your server to MySQL5.

Extended Reason:

Old versions of Mambo were written for PHP/MySQL4. When MySQL5 was
released there were changes to the way MySQL does database
optimisation. See here: http://dev.mysql.com/doc/refman/5.0/...imization.html

This means that JOIN conditions must be preceded by the table name that
the JOIN refers to. This was not a requirement in MySQL4 and as a
result you will get "UNKNOWN COLUMN" errors.

How to Fix:

Upgrade Mambo.
The latest (and final) release of the Mambo 4.5 branch is 4.5.6. If you
need to keep using the 4.5 branch for 3rd party extension compatibility
then Mambo 4.5.6 is the version you should be using.
Unless there is a compelling reason to stay on the 4.5 branch, you should be using Mambo 4.6.3 or later.
 
NOTE:

This problem was fixed in Mambo two years ago. However, there
are still 3rd party extensions around that are not compatible with
MySQL5. If you are using any Mambo version later than 4.5.3 and you
still get this error message have a look at what extension is
generating the error. You will need to either upgrade the extension (if
a later version is available) or replace it with another one that works
with MySQL5.
Others in this Category
document How secure is Mambo?
document Blocking direct access to scripts in your wrapper
document How to install templates on your Mambo site
document How to move your Mambo site
document How to change the template name
document Troubleshooting the WYSIWYG editor
document Lost your admin password?
document Popups not working?
document Incorrect Itemid's
document CAPTCHA not working
document Working with META tags
document Blank or 'White' Pages
document How to turn off MySQL Strict Mode
document FAQ: "This Category is currently empty"
document How to find your version of PHP & other useful information
document What to do when you get a site is temporarily unavailable error
document session save path issues
document Changing/Creating your own favicon
document FAQ: Checked In/ Checked Out
document How to use Mambo Modules
document How to determine Absolute Path

RSS