Download PDF
Download page Create Database User for Controller.
Create Database User for Controller
During installation, AppDynamics must create additional databases and users in the Aurora database for the AppDynamics Controller application to interact with the Aurora database server.
To create the Aurora database:
- Create the Aurora database using
admin
as the primary username. After the Aurora database instance is created successfully, log in to the ec2 instance as
admin
:mysql -u admin -h <rds-aurora-endpoint> -P 3388 -p
CODETo create a new
'root'
user, enter:CREATE USER 'root'@'%' IDENTIFIED BY 'controller';
CODETo check for the grants of the primary username (
admin
), enter:mysql> SHOW GRANTS FOR admin;
CODEResulting output:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Grants for admin@% ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, LOAD FROM S3, SELECT INTO S3, INVOKE LAMBDA ON *.* TO 'admin'@'%' WITH GRANT OPTION ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 1 row in set (0.00 sec)
CODEApply the grants (listed in the output) for the new
root
user that you created in Step 1. Theroot
user will have the same grants as theadmin
user.mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, LOAD FROM S3, SELECT INTO S3, INVOKE LAMBDA ON *.* TO 'root'@'%' WITH GRANT OPTION
CODEResulting output:
Query OK, 0 rows affected (0.01 sec)
CODEOnce the
root
user has the same privileges as the primary usernameadmin
, verify that you can log in to the database asroot
, and then continue with the installation.
- If you do not have users "root@x.x.x.x" and "root@ip-x-x-x-x.ec2.internal", ignore these users and continue to work with the
root@%
. If you have users "root@x.x.x.x" and "root@ip-x-x-x-x.ec2.internal", then instead of using the previous
GRANT
command, use thisGRANT
command:mysql> GRANT ALL ON `%`.* TO 'root'@'ip-x-x-x-x.ec2.internal' identified by 'controller' WITH GRANT OPTION; mysql> GRANT ALL ON `%`.* TO 'root'@'x.x.x.x' identified by 'controller' WITH GRANT OPTION; mysql> GRANT RELOAD ON *.* TO 'root'@'ip-x-x-x-x.ec2.internal' identified by 'controller' WITH GRANT OPTION; mysql> GRANT RELOAD ON *.* TO 'root'@'x.x.x.x' identified by 'controller' WITH GRANT OPTION;
CODE
- If you do not have users "root@x.x.x.x" and "root@ip-x-x-x-x.ec2.internal", ignore these users and continue to work with the
After installation, you can revoke the primary-level privileges from the Aurora root user without interfering with the Controller. However, primary-level privileges for Aurora root user are required prior to upgrading the Controller.