• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

One user, multiple MySQL databases

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.
 
Originally posted by hardweb
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.
Ok, but how will Plesk handle this "manual" modification?
 
Originally posted by hardweb
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.

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

Thanks
 
I am not sure how many people require this, as it might be a little confusing for regular users. [/B]


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

Rolli
 
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.
 
How?

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.
 
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.
 
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.
 
Back
Top