The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to allow privileges for a user to create random-named database in Cpane

Discussion in 'Database Discussions' started by tfliam, Apr 11, 2012.

  1. tfliam

    tfliam Registered

    Joined:
    Mar 31, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    How to allow privileges for a user to create random-named database in Cpanel (Silverstripe)?

    I'm trying to setup automated testing on Silverstripe! in CPanel. When I ran any of the test in url (for my case it is DOMAIN/dev/tests/AggregateTest), it says

    Fatal error: Couldn't run query: CREATE DATABASE tmpdb2605857 Access denied for user 'todaytes_root'@'localhost' to database 'tmpdb2605857' in /home/todaytes/public_html/sapphire/core/model/MySQLDatabase.php on line 525

    Silverstripe will create a random-named database every time the test executed and destroy it after the test finished.

    From the "databases" menu in cPanel, I am only allowed to add database and user manually with some prefix name for it (in my case, all my database and user start with todaytes_). How do I configure cPanel/WHM to give permission to the user so that Silverstripe Automated Test could work fine?
     
  2. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    38
    Re: How to allow privileges for a user to create random-named database in C

    Normal cPanel users do not have an access to create databases with randam names. cPanel will always add prefix of cPanel username in database name. This is the way it works.

    You should have MySQL root username and password in order to create random names.
     
Loading...

Share This Page