villazones.blogg.se

Dont have privilege acces to create new database hostbuddy
Dont have privilege acces to create new database hostbuddy






When a new database created only some accounts are add by default. My question is: what must I do to ensure that my create_db_user account has sufficient privileges to do whatever it wants to dynamically created databases? Or, what must I do to ensure that once a database is created, that it is included under the scope of the global user?ĮDIT: I have admin-level cPanel and WHM access.Įvery database has different and separate permission rules. $create_db_user->query(" GRANT ALL PRIVILEGES ON `.* TO " ' DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ' $stmt = ' CREATE DATABASE IF NOT EXISTS '.

#DONT HAVE PRIVILEGE ACCES TO CREATE NEW DATABASE HOSTBUDDY CODE#

The exact code flow is as follows: $create_db_user->query(" SET SQL_MODE = 'NO_AUTO_VALUE_ON_ZERO' ") So, on the surface at least, it appears that my global user account has enough privileges to create a database, but not enough to interact with it. SQLSTATE: Syntax error or access violation: 1044 Access denied for user to database 'myprefix_new_db' #0 When, however, it then tries to grant SIUD privileges to the standard account for that newly created database, the following exception is thrown: It appears to do so without any problems (at least no exceptions are thrown at that point). The global user executes a SQL statement that creates a new database: myprefix_new_db. I have another database user account standard_user to which I grant SELECT, INSERT, UPDATE, DELETE privileges. GRANT ALL PRIVILEGES ON 'myprefix\_%'.* TO WITH GRANT OPTION I have a database user create_db_user to which I have granted all privileges on databases with a certain prefix:






Dont have privilege acces to create new database hostbuddy