Is your feature request related to a problem? Please describe.
No related problem ?
Describe the solution you'd like
I need to share a database to multiple servers, but the backend is not made for that as
you can see below. We can't add the same database to another server_id, so this feature may need a refactor.

Just to stay organized, it could be great to add this feature.
If I am reading this right you want to share on DB across multiple servers?
Pretty sure you can already do that. It just doesn't show up in each server as available.
@parkervcp I want to display it on the panel for each servers, i think that I can already use them on different server.
I am looking for a feature allowing us to assign a database for multiple servers. Just to stay organized.
Tell me if my explanation is not clear.
I'd imagine that is the feature there looking for.(Just a mock up)

Yes, the database prefix should be editable and linked to multiple servers.
Also, a possibility to create "sub users" with less permission to this database ?
So create a users management interface ?
You can already share databases with multiple servers, as you already noted. Showing it for multiple servers is a pretty big change, and most people probably won't even use it. This panel is mainly for game server management, and not a tool to manage databases.
As this is probably a pretty rare use case I'd reject this.
@schrej It's not about sharing database ... it's about management !
We should be able to assign a database to multiple servers. Better UX, it's all. 馃槃
I got 10 minecraft servers but 4 of them, are connecting to the same database, so where should I create the database ? How can I keep in my mind that the database is s5 or s4 ? It's unclear.
It would be better UX, I agree. But in my opinion it's not worth the effort. I don't think many people are sharing databases between servers.
We can keep this issue for now and see if it gets any upvotes, or people requesting the same thing.
@schrej I think that people will not use database management inside Pterodactyl if this feature is not developed (less chance they use this). People that have at least 2 servers generally link their servers with the database, so they will not respond to this GitHub issue.
And it's not only for people like me that have multiple servers, it's to put a name of each database, each user, etc... to stay organized !
This panel is used by lots of people, no one has requested this feature before you. It didn't even get a lot of likes. So it certainly isn't "everyone".
This feature is mostly directed towards hosting providers that want to provide customers with databases anyways. If you just use the panel for your own servers, and if you have a more complicated setup with shared databases, just mange the databases externally. At least that would be my suggestion.
It would be a nice feature, Maybe 0.8 but i'm not sure if it's worth the effort. Would also pose some issues in the security implementation at least the way i proposed it in the screenshot.
Let me bump this issue. I also think it would be a nice feature
Instead of the text input, I would rather suggest something like a select box showing all databases bound to the DBMS host
Something like this (mock-up):

this is something i wouldnt mind seeing, for those of us with bungee networks it would make things much easier, imo databases should be by account not by server, though hosts should be able to ofc make them the same
this is something i wouldnt mind seeing, for those of us with bungee networks it would make things much easier, imo databases should be by account not by server, though hosts should be able to ofc make them the same
The problem is database hosts are supposed to be linked to a node, meaning if you have multiple servers not on the same node, the database shouldn't be linked.
Another idea would be to have a tab to display all the databases across all servers a user has access to, that way a user can more easily see all their databases in a centralized place instead of having databases "link" to another server.
However, this should probably be done alongside #1980.
Actually an Idea that came to me from @tekexplorer comment. How about Not linking a database to a server but to a user. So it simply does not get deleted unless the user is. That would also allow having a single database page instead of multiple for each server.
That's what I was thinking!
Actually an Idea that came to me from @TekExplorer comment. How about Not linking a database to a server but to a user. So it simply does not get deleted unless the user is. That would also allow having a single database page instead of multiple for each server.
What do you do with different servers across different nodes? How would you limit a user's databases when it is specified on individual servers? As I said we could have a databases page where it lists all the databases across all of a user's servers.
Why does it have to be coupled? There IS a hostname option that specifies where the database assigned to a node is.
Just make the databases not care what node it is (or vice versa)
Databases have a hostname for a reason
What do you do with different servers across different nodes? How would you limit a user's databases when it is specified on individual servers? As I said we could have a databases page where it lists all the databases across all of a user's servers.
Just detach the database from the server completely. It is after all it's own service. Allow the user to pick what server they choose for the database, on what node. and that's it.
No need to mix databases with servers
Why does it have to be coupled? There IS a hostname option that specifies where the database assigned to a node is.
Just make the databases not care what node it is (or vice versa)
Databases have a hostname for a reason
Databases should be linked to a server, that is the easiest way to manage quotas and the more simple option. Why wouldn't having a databases page on the client ui that shows all of the client's databases across all of the servers they own work? You could even add a way to create databases for a specific server there instead of having to go to every individual server to do so.
The reason for this is having multiple database hosts and dealing with quotas. How would we limit the amount of databases a user can create without having it link to a server? You could say have a user database limit but how would WHMCS or whatever manage this easily? Also with database hosts being linked to nodes how would we know what database host to create the database on if it isn't assigned to a server?
Make the quota based on how many databases you have access to total.
Server1: 2 databases
Server2: 1 database
You have: 3 databases available
How does this work if you have a subuser assigned to one server that should have database management permissions, and also to a second server where they have no permissions?
Make database management perms by database, like the databases themselves
Make the quota based on how many databases you have access to total.
Server1: 2 databases
Server2: 1 database
You have: 3 databases available
Not the best. I would say to make it be a sum of current db info. So
Server A - 2 schemes
Server B - 3 schemes
User gets 5 schemes
so it won't change anything in the api
Treat the database as kind of another server. Or even each schema as a server (perm wise)
So permission such as
db.see - allows the user to see the schema+password+host
db.reset - allows user to reset the db password
etc.
Only allowing the main user to create new schema. That way it won't be a pain where you end up having 100s of schema owned by sub users.
Just making it it's own sub system that would make it easier to manage.
It could be expanded further where the Primary account is not a user per say but a subscription.
That arrangement would solve it all. Where the 1st user created is the admin of the subscription. It would also make organizing easier for larger hosts as they could group servers by subscription and not just a huge sea of servers.
Then what happens if a server is deleted or suspended which makes the user go over their quota?
Also the ideas of making databases having their own permissions is basically turning databases into it's own type of service on the panel which is not what is wanted.
As I have asked before,
Why wouldn't having a databases page on the client ui that shows all of the client's databases across all of the servers they own work? You could even add a way to create databases for a specific server there instead of having to go to every individual server to do so.
This is basically exactly what is wanted except for the fact that it doesn't need a useless link to servers that don't serve any purpose other than organization.
Not to mention that if going to a server and linking a database with another only would make that database appear alongside that server and serve no purpose other than to complicate and confuse the database page on servers.
Then what happens if a server is deleted or suspended which makes the user go over their quota?
Current panel doesn't have an issue if the user is over db quota. it just doesn't allow making more and on removal it's not gonna let the user recreate it.
Also the ideas of making databases having their own permissions is basically turning databases into it's own type of service on the panel which is not what is wanted.
By all mans a database is it's own service....
Then what happens if a server is deleted or suspended which makes the user go over their quota?
Current panel doesn't have an issue if the user is over db quota. it just doesn't allow making more and on removal it's not gonna let the user recreate it.
Also the ideas of making databases having their own permissions is basically turning databases into it's own type of service on the panel which is not what is wanted.
By all mans a database is it's own service....
If the database is linked a server and the server is deleted then they cannot be over the quota? If the database is not deleted when a server is then the user would be over their quota.
Also databases are a supplementary feature alongside servers, they are designed to make it easy for users to create a database and configure servers and plugins to use it, not to be a separate entity from servers. It's a "game management panel" after all.
Your response still does not answer my question about the client ui.
I barely have the time to implement features or fix bugs as it is, the more complicated you make this feature request the more likely it is to end up like the other 4 pages of them that never get implemented.
@matthewpi's idea is by far the most straightforward and gets us an MVP out the door without putting tons of time or effort into it.
Most helpful comment
Let me bump this issue. I also think it would be a nice feature
Instead of the text input, I would rather suggest something like a select box showing all databases bound to the DBMS host
Something like this (mock-up):
