Use the database access client to connect to the database server as the
rootuser:$ mysql -u root -pCreate the
ec2apidatabase:CREATE DATABASE ec2api;
Grant proper access to the
ec2apidatabase:GRANT ALL PRIVILEGES ON ec2api.* TO 'ec2api'@'localhost' \ IDENTIFIED BY 'EC2-API_DBPASS'; GRANT ALL PRIVILEGES ON ec2api.* TO 'ec2api'@'%' \ IDENTIFIED BY 'EC2-API_DBPASS';
Replace
EC2-API_DBPASSwith a suitable password.Exit the database access client.
exit;