SiT! Bugs - SiT!
View Issue Details
0000538SiT!setup/configpublic2009-03-02 18:482013-02-09 19:29
modir 
paulh 
normalminoralways
resolvedfixed 
3.45 
3.90beta1Current GIT 
0000538: setup.php crashes if db user does not have ALTER privilege
I just wanted to upgrade to 3.45. I did everything as described here: http://sitracker.org/wiki/ReleaseNotes [^]

But I had a little problem. When I was running the DB upgrade script I got about 15 messages that the db user does not have ALTER privileges. My problem now is that I can not run the script again because setup.php thinks this version is already 3.45. But it is not (fully).
So I have the following ideas:

1) Check first if the user has the necessary privileges. Else give an error message before you do the upgrade.

2) If anything fails give the possibility to correct something and the let the administrator retry the failed commands.

3) Write in your documentation what privileges the db user exactly needs.
No tags attached.
has duplicate 0001603closed  Setup page should have the possibility to use root user who creates the db user and grants access 
Issue History
2009-03-02 18:48modirNew Issue
2009-03-04 15:35ivanNote Added: 0000688
2009-03-04 16:28modirNote Added: 0000694
2009-03-04 17:04ivanNote Added: 0000697
2009-03-04 17:04ivanStatusnew => confirmed
2009-03-04 17:04ivanTarget Version => 3.50
2009-07-25 14:06ivanStatusconfirmed => assigned
2009-07-25 14:06ivanAssigned To => ivan
2009-07-25 14:46ivanNote Added: 0001397
2009-07-25 14:46ivanTarget Version3.50 => 3.60
2009-08-21 14:28kieranTarget Version3.60 => 4.0
2011-02-14 13:25ivanTarget Version4.0 => 3.90beta1
2011-06-16 09:40ivanRelationship addedhas duplicate 0001603
2013-01-05 12:17paulhAssigned Toivan => paulh
2013-01-06 12:24paulhNote Added: 0004640
2013-02-09 19:29paulhNote Added: 0004698
2013-02-09 19:29paulhStatusassigned => resolved
2013-02-09 19:29paulhResolutionopen => fixed
2013-02-09 19:29paulhFixed in Version => Current GIT

Notes
(0000688)
ivan   
2009-03-04 15:35   
You can correct this problem by dropping your database and running setup again,

or if this is an upgrade you can alter the 'system' table manually and change the version number to the version you are upgrading from and then run setup again.

You're right though, we should try better. We should probably ask for a root or admin MySQL user during setup to create the schema with.
(0000694)
modir   
2009-03-04 16:28   
Thanks, But I could solve the problem in a different way. I was looking at setup-schema.php (or whatever the exact name of the file was) and I copied the ALTER statements out and ran them with my root account.

It is working fine now. I just wanted to let you know and help you making the installation process more fool prove.
(0000697)
ivan   
2009-03-04 17:04   
Yeah, thanks for logging it, it definitely is something we should look at for the next release.

Keep the good ideas coming... :-)
(0001397)
ivan   
2009-07-25 14:46   
Setup doesn't crash any more, but it doesn't offer the ability to install using different db credentials than the ones you intend to run as. We should look at that for a future release, but for now the workaround is to install using credential suitable for schema creation and then to manually edit your config file to use lesser credentials if required.
(0004640)
paulh   
2013-01-06 12:24   
4e25f83 now checks the permissions and informs the user what is missing
(0004698)
paulh   
2013-02-09 19:29   
documentation no updated as well.