Query Failed error?

Having trouble installing serendipity?
Post Reply
elvisanderson
Regular
Posts: 15
Joined: Wed Jan 25, 2006 5:14 pm

Query Failed error?

Post by elvisanderson »

Hi All,

My blog was running very well for the past few years. We didn't make any changes, and then we suddenly got a query failed error. Number 145 apparently.

Any help would be greatly appreciated...

Here is what I get when we try to go to our blog:
(http://www.adventurecanada.com/blog/index.php)


Query failed:

SELECT
ep_sticky.value AS orderkey,

e.id,
e.title,
e.timestamp,
e.comments,
e.exflag,
e.authorid,
e.trackbacks,
e.isdraft,
e.allow_comments,
e.last_modified,

a.realname AS author,
a.username AS loginname,
a.email
, e.body, e.extended

FROM
serendipity_entries AS e
LEFT JOIN serendipity_authors a
ON e.authorid = a.authorid
LEFT JOIN serendipity_entrycat ec
ON e.id = ec.entryid
LEFT JOIN serendipity_category c
ON ec.categoryid = c.categoryid
LEFT OUTER JOIN serendipity_entryproperties ep_access
ON (e.id = ep_access.entryid AND ep_access.property = 'ep_access')
LEFT JOIN serendipity_entryproperties ep_sticky
ON (e.id = ep_sticky.entryid AND ep_sticky.property = 'ep_is_sticky') LEFT JOIN serendipity_authorgroups AS acl_a
ON acl_a.authorid = 1
LEFT JOIN serendipity_access AS acl_acc
ON ( acl_acc.artifact_mode = 'read'
AND acl_acc.artifact_type = 'category'
AND acl_acc.artifact_id = c.categoryid
)
WHERE isdraft = 'false' AND (( (c.category_left BETWEEN 7 AND 8) OR (c.category_left BETWEEN 11 AND 12))) AND e.timestamp <= 1229368500 AND (ep_access.property IS NULL OR ep_access.value = 'member' OR ep_access.value = 'public' OR (ep_access.value = 'private' AND e.authorid = 1)) AND (
c.categoryid IS NULL
OR ( acl_acc.groupid = acl_a.groupid OR acl_acc.groupid = 0)
OR ( acl_acc.artifact_id IS NULL

)
)
GROUP BY e.id
ORDER BY orderkey DESC, timestamp DESC
LIMIT 10

/ Can't open file: 'serendipity_entries.MYI' (errno: 145)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Query Failed error?

Post by garvinhicking »

Hi!

It seesm your mysql server crashed. Maybe you can try to repair the tables, else you might want to contact the provider if he can fix the data file.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
rhacer
Regular
Posts: 17
Joined: Sun Sep 25, 2005 10:23 am

Re: Query Failed error?

Post by rhacer »

elvisanderson wrote:Hi All,

My blog was running very well for the past few years. We didn't make any changes, and then we suddenly got a query failed error. Number 145 apparently.

Any help would be greatly appreciated...

Here is what I get when we try to go to our blog:
(http://www.adventurecanada.com/blog/index.php)


Query failed:

SELECT
ep_sticky.value AS orderkey,

e.id,
e.title,
e.timestamp,
e.comments,
e.exflag,
e.authorid,
e.trackbacks,
e.isdraft,
e.allow_comments,
e.last_modified,

a.realname AS author,
a.username AS loginname,
a.email
, e.body, e.extended

FROM
serendipity_entries AS e
LEFT JOIN serendipity_authors a
ON e.authorid = a.authorid
LEFT JOIN serendipity_entrycat ec
ON e.id = ec.entryid
LEFT JOIN serendipity_category c
ON ec.categoryid = c.categoryid
LEFT OUTER JOIN serendipity_entryproperties ep_access
ON (e.id = ep_access.entryid AND ep_access.property = 'ep_access')
LEFT JOIN serendipity_entryproperties ep_sticky
ON (e.id = ep_sticky.entryid AND ep_sticky.property = 'ep_is_sticky') LEFT JOIN serendipity_authorgroups AS acl_a
ON acl_a.authorid = 1
LEFT JOIN serendipity_access AS acl_acc
ON ( acl_acc.artifact_mode = 'read'
AND acl_acc.artifact_type = 'category'
AND acl_acc.artifact_id = c.categoryid
)
WHERE isdraft = 'false' AND (( (c.category_left BETWEEN 7 AND 8) OR (c.category_left BETWEEN 11 AND 12))) AND e.timestamp <= 1229368500 AND (ep_access.property IS NULL OR ep_access.value = 'member' OR ep_access.value = 'public' OR (ep_access.value = 'private' AND e.authorid = 1)) AND (
c.categoryid IS NULL
OR ( acl_acc.groupid = acl_a.groupid OR acl_acc.groupid = 0)
OR ( acl_acc.artifact_id IS NULL

)
)
GROUP BY e.id
ORDER BY orderkey DESC, timestamp DESC
LIMIT 10

/ Can't open file: 'serendipity_entries.MYI' (errno: 145)
I have a very similar issue. Though mine has been brought about by migrating hosts. I exported my old schema, imported it at the new location, but the new host didn't allow me to use the same db names or user names. So I created a new DB name, and a new user name and updated the config file.

Now when I connect to my blog page I get and almost identical error message except the last line is...

"/ No database selected"

you can see the problem here...

http://66.147.240.152/~craigela/standingfast/index.php

Any help would be much appreciated.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Query Failed error?

Post by garvinhicking »

Hi Craig!

did you change your serendipity_config_local.inc.php and entered the new database names?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
rhacer
Regular
Posts: 17
Joined: Sun Sep 25, 2005 10:23 am

Re: Query Failed error?

Post by rhacer »

garvinhicking wrote:Hi Craig!

did you change your serendipity_config_local.inc.php and entered the new database names?

Regards,
Garvin
Yes I did. Prior to doing that all I got was PHP errors in the MySQL module.

Here is the file, sans user name and password

Code: Select all

<?php
        /*
          Serendipity configuration file
          Written on Sun, 31 Aug 2008 11:07:22 -0700
        */

        $serendipity['versionInstalled']  = '1.3.1';
        $serendipity['dbName']            = 'craigela_tjgserendipity';
        $serendipity['dbPrefix']          = 'serendipity_';
        $serendipity['dbHost']            = 'localhost';
        $serendipity['dbUser']            = 'xxxxxxxxx';
        $serendipity['dbPass']            = 'xxxxxxxxx';
        $serendipity['dbType']            = 'mysql';
        $serendipity['dbPersistent']      = false;

        // End of Serendipity configuration file
        // You can place your own special variables after here:

?>
The new database only has one user, and I cut and pasted both the username and password to make sure I was getting them correct.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Query Failed error?

Post by garvinhicking »

Hi!

Hm, when you get "no db selected" that usually means that your DB user "xxxxxx" has no Mysql privilege to access the database called "craigela_tjgserendipity". Make sure your mysql user has all privileges on that table!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
elvisanderson
Regular
Posts: 15
Joined: Wed Jan 25, 2006 5:14 pm

Post by elvisanderson »

Hi, I did a repair on the MySQL table and all is well again! Thanks!
rhacer
Regular
Posts: 17
Joined: Sun Sep 25, 2005 10:23 am

Re: Query Failed error?

Post by rhacer »

garvinhicking wrote:Hi!

Hm, when you get "no db selected" that usually means that your DB user "xxxxxx" has no Mysql privilege to access the database called "craigela_tjgserendipity". Make sure your mysql user has all privileges on that table!

Regards,
Garvin
That did the trick! Thanks. I'd created the user and assigned it to the database, but the user had no permissions in that DB.

Now on to the next problem!
Post Reply