Adding users to a database

Started by Juancer1123, March 10, 2021, 08:08:13 AM

Previous topic - Next topic

Juancer1123

In the same line of my previuos ticket, I need to associate an user to a database. I'm trying the corresponding way usermysql->add. The user is created but is not asociated to the database, also when that details is sent.
I can login in phpmyadmin but no database is able to use.
Thanks

studio4host

probably the easiest way is to do it from the user panel or if from admin than using phpmyadmin as root to be able to add custom permissions per user.
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Juancer1123

Hi @studio4host, no, that's not the easiest way to do it, because We have an API which should do this process from the external development. I need to create about 10 databases per day from the API and after that, you said that I need to go trhought phpmyadmin to assing those database to a new user, that's not the easier way.

In this case, the documentation of the API is telling me that I can create an User and assign it to a database from the API and is not working.

If you tell me where is located the code, I can modify the sentence and after provide you the possible solution, but i need to solve this problem as soon as possible please.

josemnunez

Hello

why do you say this doesn't work? You can place here the error that it shows you or the script you are using!

Juancer1123

Script:
https://ibb.co/YdVXKPP

Result in browser:
https://ibb.co/2MCM1Dz

Result in CWP:
https://ibb.co/nqpjjWy

And the user is not created in the user list.

Juancer1123

Quote from: josemnunez on March 12, 2021, 09:40:29 PM
Hello

why do you say this doesn't work? You can place here the error that it shows you or the script you are using!

Script:
https://ibb.co/YdVXKPP

Result in browser:
https://ibb.co/2MCM1Dz

Result in CWP:
https://ibb.co/nqpjjWy

And the user is not created in the user list.