Fulltext index for search ...

Having trouble installing serendipity?
Post Reply
Lux
Regular
Posts: 764
Joined: Fri Aug 12, 2005 4:36 pm
Location: Grüt, Zürich, Switzerland
Contact:

Fulltext index for search ...

Post by Lux »

Hi,

we get an error in our fresh installed (version 0.8.5) dog blog:

Code: Select all

CREATE FULLTEXT INDEX entry_idx on serendipity_entries (title,body,extended)
Because I am not the admin of my providers database system, I did:

Code: Select all

ALTER TABLE `serendipity_entries` ADD FULLTEXT (
`title` ,
`body` ,
`extended` 
);
I hope, that is the same.

Greetings

Dirk
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Fulltext index for search ...

Post by garvinhicking »

Yes, the ALTER TABLE command should basically do the same. :)

Best 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/
Lux
Regular
Posts: 764
Joined: Fri Aug 12, 2005 4:36 pm
Location: Grüt, Zürich, Switzerland
Contact:

Re: Fulltext index for search ...

Post by Lux »

garvinhicking wrote:Yes, the ALTER TABLE command should basically do the same. :)
Maybe you put the ALTER TABLE statement into the error message. Because you need no administrator priviledge to do that.

Dirk
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Fulltext index for search ...

Post by garvinhicking »

It has nothing to do with administrator privilege, only with MySQL privileges.

Each action (SELECT, CREATE, DELETE, INSERT, INDEX, UPDATE, GRANT, ..) has its own privilege for MySQL. Usually those privileges apart from GRANT are all set for a MySQL user account.

In your case, your mysql user is missing the "INDEX" privilege. However this is a very common privilege that very seldom is not set for user accounts. It makes to sense to disallow INDEX privileges usually, because setting an index can only make things better and not worse.

Serendipity thus uses CREATE INDEX on several occasions, not only in the given message -- and on most of all MySQL setups (and 100% of setups I have personally seen) the INDEX privilege is given for the user.

So you should better contact your sysadmin and ask him, why your mysql user has no INDEX privilege, and that this is quite common...

Or what error message are you getting when you want to execute the "CREATE FULLTEXT..." query?

Best 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/
Lux
Regular
Posts: 764
Joined: Fri Aug 12, 2005 4:36 pm
Location: Grüt, Zürich, Switzerland
Contact:

Re: Fulltext index for search ...

Post by Lux »

garvinhicking wrote:Or what error message are you getting when you want to execute the "CREATE FULLTEXT..." query?
#1142 - INDEX command denied to user: 'xxx' for table 'serendipity_entries'

Alter Table works.

Dirk
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Fulltext index for search ...

Post by garvinhicking »

Lux wrote:
garvinhicking wrote:Or what error message are you getting when you want to execute the "CREATE FULLTEXT..." query?
#1142 - INDEX command denied to user: 'xxx' for table 'serendipity_entries'
Okay, then all applies to you what I've written. Contact your sysadmin and ask him for a single reason why your user XXX has no "INDEX" privilege. This does not make sense at all.

It's like giving you an FTP account that can only write files and not download files.

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/
Lux
Regular
Posts: 764
Joined: Fri Aug 12, 2005 4:36 pm
Location: Grüt, Zürich, Switzerland
Contact:

Re: Fulltext index for search ...

Post by Lux »

garvinhicking wrote:Okay, then all applies to you what I've written. Contact your sysadmin and ask him for a single reason why your user XXX has no "INDEX" privilege. This does not make sense at all.
I will do!

Regards and thanks for your support

Dirk
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Fulltext index for search ...

Post by garvinhicking »

Great -- and please report back here, I would really like to know the reasoning of a sysadmin behind not allowing this, but allowing ALTER TABLE. :)

Best 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/
Lux
Regular
Posts: 764
Joined: Fri Aug 12, 2005 4:36 pm
Location: Grüt, Zürich, Switzerland
Contact:

Re: Fulltext index for search ...

Post by Lux »

garvinhicking wrote:Great -- and please report back here, I would really like to know the reasoning of a sysadmin behind not allowing this, but allowing ALTER TABLE. :)
It was a configuration error of the provider.

Regards

Dirk
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Fulltext index for search ...

Post by garvinhicking »

Thanks for this feedback. Great to know that there really is no reason why it shouldn't be allowed. :-)

Best 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/
Post Reply