Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Problem with "db/build?flush=1"


Reply

4 Posts   1708 Views

Avatar
Bruce

24 March 2008 at 7:00pm Community Member, 29 Posts

Hi,
I have a basic site working on a hosted machine
(and can run "db/build?flush=1" okay)
however, when I add the blog module to the base directory
and run the database re-build, I see that it is wanting to modify a bunch of tables, but at the end, I see
"ERROR:
Error
The website server has not been able to respond to your request."
And the stuff fails to load.
It's not the blog module as it happens with the forum module as well.
Removing the blog directory makes the db rebuild work fine, but then obviously, it's not changing things.
I suspected the mysql perissions were not right, but the site-admin says that the statement for privileges is:
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON `ss_xxxxxxxxxx`.* to
'ss_xxxxxxxxx'@'localhost' IDENTIFIED BY 'xxxxxxxxxx' ;

Is there a need to write to the local file system, as we have noticed that the default install gets the permissions too tight (in particular I not that the themes directory is too locked down).
Does mysite or sapphire directory need writing to?
Attached is the source of the html with the error.
Can anyone help?
//Bruce

Avatar
Grayzag (aka ajshort)

25 March 2008 at 8:53am 29 Posts

Hi there -

if you put the line:
"Director::set_environment_type('dev');"
in your mysite/_config.php file then it will give you a specific error message rather than just a generic error - hopefully telling you whats wrong.

Avatar
Bruce

29 March 2008 at 1:38pm Community Member, 29 Posts

Thanks ...
That at least showed me that there seems to be an SQL privileges issue:
FATAL ERROR: DATABASE ERROR: Couldn't run query: ALTER TABLE `Widget` CHANGE `ClassName` `ClassName` enum('Widget','ArchiveWidget','BlogManagementWidget','RSSWidget','TagCloudWidget') character set utf8 collate utf8_general_ci default 'Widget' | ALTER command denied to user 'ss_xxxxxxxxx'@'localhost' for table 'Widget'

That error is somewhat at odds with the mysql query:
show grants for ss_xxxxxxxxx@localhost;
--------------------------------------------------------------+
| GRANT SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES ON *.* TO 'ss_xxxxxxxxx'@'localhost' IDENTIFIED BY PASSWORD '527395e541ab4dd3' |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON `ss_xxxxxxx`.* TO 'ss_xxxxxxxxx'@'localhost' |
+------------------------

digging further ....

Avatar
Bruce

29 March 2008 at 2:15pm Community Member, 29 Posts

RESOLVED:
The silverstripe user account did not have ALTER privileges on the database tables!
I got the db admin to add that and away we went ...
(Not sure how that was not there in the first place )
//BWS