1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

One user, multiple MySQL databases

Discussion in 'Plesk for Linux - 8.x and Older' started by avorio, Apr 13, 2005.

  1. avorio

    avorio Guest

  2. hardweb

    hardweb Guest

    It 's possible, but you have to execute a query in the mysql database as admin. It's not possible to create it in the Plesk interface. I am not sure how many people require this, as it might be a little confusing for regular users.
  3. avorio

    avorio Guest

    Ok, but how will Plesk handle this "manual" modification?
  4. kineda

    kineda Guest

    Can you please explain how to execute this query since we're not able to do it in Plesk?

  5. ChipMonk

    ChipMonk Guest


    I think many admins will like this feature.

    It actually confuse for users who come from CP or ensim a bit, there a user can create many database.

    even i was confused in start, cuz first i have to make a database, then add a user to it, and i was doing reverse on other HM softwares.
  6. rolli

    rolli Guest

    I have got the same problem, is there inbetween another way or do i have to edit the Database - if so, witch querie i have to use ?

    Thanks for your help,

  7. acidbox

    acidbox Guest

  8. wheaticus

    wheaticus Guest

    I totally agree with you all, especially acidbox's workflow description; I just assumed that it would be like that because it is a seemingly common situation to have a couple databases that a single user would be assigned to.

    Funny enuff with my cheaper shared hostings which utilizes Vdeck and cPanel on other sites, they all haven't any problems with this type of functionality.

    I've tried to create another db from within phpMyAdmin with no luck either. I guess I'll give SSH a try.
  9. blank

    blank Guest

    Unbelievable that this still has not been implemented?
    So what is the query may you tell us?
  10. chfriley

    chfriley Guest


    I agree, this is a missing feature. I just moved from a 4 year old server with cPanel to a new server with Plesk, there are a few things I liked better about cPanel including this, but in general I am happy with the swtich.

    So, how do you do it?

    I tried something like this to create the user in the database in Plesk 8.2.0 with MySQL v 14.12 Distrib 5.0.22 on a current CentOS Linux distro.

    It would be nice if it was a simple drop down selection, but this did work for me:

    (note, you need to replace 'name_of_new_database','user_name' with the right values for you). All of this would be at the command line:

    mysql -u admin -p
    <type password>
    use mysql;***********
    select * from db;**
    INSERT INTO db VALUES('localhost','name_of_new_database','user_name','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');

    Then you need to let Plesk know it is there:
    use psa;
    *** select * from data_bases;

    //In what is printed, look for the new database you want to use and its ID number. e.g. 9.

    select * from db_users;
    //In what is printed, look for the login you want to use and its account_ID number. e.g. 18.

    INSERT into db_users VALUES('','<LOGIN_NAME_GOES_HERE>','18','9');

    //May not be needed, I didn't need to flush or restart.
    flush privileges;

    That should do it.
  11. chfriley

    chfriley Guest

    After posting that I think you can also do it via phpmyadmin, but I don't think it would be easier than typing the commands at the command line:

    If you go to Plesk > Server > Database Servers > Local MS SQL server -> Databases
    and click DB WebAdmin then it will open PhpMyAdmin which lets you look at all the databases.

    Then you can select the database you want, and add a user there and then in the PSA database.

    I didn't go through the steps though, if I do, I will post it here.
  12. mikestanton

    mikestanton Guest

    Too Right

    Thank you CentaurAtlas for your valuable tip - I haven't tried your suggestion yet, but if it fixes this [serious] deficiency in Plesk and simplifies database admin so that the phpMyAdmin module can be called directly off Plesk to administer all databases for that user, then this is exactly what is required. Actually, I find the concept of Plesk binding a database to a domain to be quite ridiculous also. How do these people think databases, users and domains have a relationship in the real world? Databases should be set up under clients with a common user if required, thus making sharing databases between domains of the same client on the same VPS more intuitive.