4938 Posts in 16827 Topics by 1490 members
Getting SilverStripe up and running on your computer and on your web server.
|Go to End|
14 September 2009 at 6:46pm
Error: I can't create new databases and the database 'c2ssdb' doesn't exist (user 'c2ssdbadmin' doesn't have CREATE DATABASE permissions.)
The issue is that the database "c2ssdb" DOES exist and the user c2ssdbadmin has full security access (to said database). I've already verified that I am using the correct username/password (logged into phpmyadmin quite successfully using this user/pass pair).
It is true that the user does not have "CREATE DATABASE" privilages - but if the database is already created, why is this an issue? What is the expected behavior?
If I resort to using the root user, there is no problem, and installation goes through just fine. For obvious reasons, this isn't really an option.
Create new database: No Privileges
Global Privileges: USAGE
Local Privileges to DB c2ssdb: ALLPRIVILES
Virtual Machine - I've allocated 1x 2.8Ghz core with 1GB Ram and 40GB HD
Ubuntu 9.04 (server with all updates)
PHP/5.2.6-3ubuntu4.2 with Suhosin-Patch
MySQL client version: 5.0.75
PHP extension: mysqli
16 September 2009 at 3:08am
16 September 2009 at 2:26pm
CREATE DATABASE" privilages - but if the database is already created
If SS is calling CREATE DATABASE then for whatever reason it cannot find a database at the name you have given it. Double check the DB name you created is the same as the one you gave SS and if thats sweet you might want try and run it as root and see if it makes a duplicate database or if its the same.
You might want to debug through install.php - line 504 - requireDatabaseOrCreatePermissions() is where it looks for an existing DB or create privileges. For some reason that could be failing
18 September 2009 at 6:50am Last edited: 18 September 2009 7:07am
Thanks for the reply. The database is indeed created (exists) and the user has full permissions to said database. Furthermore, the database being used is the one created through ISPConfig (the correct database) and no duplicate databases are created.
MySQL root user can successfully use this database with no issues. See the attached image for info about user settings on database. The settings you see (including the c2ssdbadmin user) were populated when the database was originally created using ISPConfig. So it seems to me that the c2ssdbadmin user shouldn't have any problems.
Am I missing something here? If not, should this warrant a bug ticket?
18 September 2009 at 12:41pm
The type for the database user says database-specific, so perhaps this user cannot see that database. If you do a Debug::show(mysql_select_db($database)); on line 539 of install.php perhaps you will see an error (I notice it is currently using a @ which supresses some errors which could be useful in this case)
18 September 2009 at 9:57pm
Have the user permession to logon on localhost Mysql service?
|Go to Top|