Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Problem with "db/build?flush=1"

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

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

Page: 1
Go to End
Author Topic: 1682 Views
  • Bruce
    Avatar
    Community Member
    29 Posts

    Problem with "db/build?flush=1" Link to this post

    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

  • Re: Problem with "db/build?flush=1" Link to this post

    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.

  • Bruce
    Avatar
    Community Member
    29 Posts

    Re: Problem with "db/build?flush=1" Link to this post

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

  • Bruce
    Avatar
    Community Member
    29 Posts

    Re: Problem with "db/build?flush=1" Link to this post

    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

    1682 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.