xbmc/xbmc — comment on commit 5ecc52506b8d068b11cf5a28341e2c7fde727be6
File:  line 0
By mrskin:

@firnsy:

Here's the privileges that my xbmc user has:

GRANT USAGE ON *.* TO 'xbmc'@'%' IDENTIFIED BY PASSWORD 'xxx';
GRANT CREATE ON `mysql`.* TO 'xbmc'@'%';
GRANT ALL PRIVILEGES ON `xbmc_video`.* TO 'xbmc'@'%';
GRANT ALL PRIVILEGES ON `xbmc_music`.* TO 'xbmc'@'%';

If I connect as the user 'xbmc' and try to create a database, it errors: ERROR 1044 (42000): Access denied for user 'xbmc'@'%' to database 'test3'
If I then, as a user with the grant option, grant privileges to test3.* to xbmc@%, it works fine and the database is created successfully.

That is to say, at least on mysql 5.1, if you have a user whose only privilege is CREATE on mysql.* and usage on *.*, it won't be able to create databases. This is because you need the CREATE privilege for the database/table you want to create, not the mysql privilege table. Giving the user create on mysql.* just allows it to create tables in the mysql privilege database.

Perhaps you can review what permissions your xbmc user has again. Right now I'm still having trouble seeing how this works without giving xbmc nearly all privileges on all databases.