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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Database created, user has permissions to that database , yet unable to install using database


Go to End


6 Posts   4725 Views

Avatar
Devin

Community Member, 9 Posts

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.

----USER INFO----
User: cs22db
Create new database: No Privileges
Global Privileges: USAGE
Local Privileges to DB c2ssdb: ALLPRIVILES
----CONFIG----
Virtual Machine - I've allocated 1x 2.8Ghz core with 1GB Ram and 40GB HD
Ubuntu 9.04 (server with all updates)
Apache/2.2.11 (Ubuntu)
PHP/5.2.6-3ubuntu4.2 with Suhosin-Patch
mod_ssl/2.2.11
OpenSSL/0.9.8g
MySQL client version: 5.0.75
PHP extension: mysqli

Avatar
Devin

Community Member, 9 Posts

16 September 2009 at 3:08am

Any ideas?

Avatar
Willr

Forum Moderator, 5523 Posts

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

Avatar
Devin

Community Member, 9 Posts

18 September 2009 at 6:50am

Edited: 18/09/2009 7:07am

Hi Will,

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?

Thanks!

Attached Files
Avatar
Willr

Forum Moderator, 5523 Posts

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)

Avatar
biapar

Forum Moderator, 435 Posts

18 September 2009 at 9:57pm

Have the user permession to logon on localhost Mysql service?