Jump to:

4952 Posts in 14480 Topics by 1491 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Database created, user has permissions to that database , yet unable to install using database

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

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

Page: 1
Go to End
Author Topic: 2294 Views
  • Devin
    Avatar
    Community Member
    9 Posts

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

    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

  • Devin
    Avatar
    Community Member
    9 Posts
  • Willr
    Avatar
    Forum Moderator
    5490 Posts

    Re: Database created, user has permissions to that database , yet unable to install using database Link to this post

    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

  • Devin
    Avatar
    Community Member
    9 Posts

    Re: Database created, user has permissions to that database , yet unable to install using database Link to this post

    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
  • Willr
    Avatar
    Forum Moderator
    5490 Posts

    Re: Database created, user has permissions to that database , yet unable to install using database Link to this post

    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)

  • biapar
    Avatar
    Forum Moderator
    435 Posts

    Re: Database created, user has permissions to that database , yet unable to install using database Link to this post

    Have the user permession to logon on localhost Mysql service?

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