Create MySQL Database
NOTE: If you are logged in as a non-root user, you will need to pre-pend the commands with
- Install MySQL:
apt-get install mysql-server- during the MySQL installation, you may be prompted to set the root password - make a note of what you set this to.
- IMPORTANT: Modify
max_connectionsline and set the value to
max_connections = 100000). Additionally, you should add the parameter
mysqld.cnfto prevent excessive logging.
- Restart MySQL service
systemctl restart mysqlto apply the above settings
- Add non-root database user:
- Connect to database as root
mysql -u root -p(enter root password if you set one).
- Create a new user: at
CREATE USER 'mynewuser'@'%' IDENTIFIED BY 'goodPassword';where
mynewuseris your dbadmin and
goodPasswordis your secure password.
- If you are successful, you will see
Query OK, 0 rows affected (0.00 sec)
- Apply privileges to the new user:
GRANT ALL PRIVILEGES ON * . * TO 'mynewuser'@'%';
- Reload the privileges to make sure the new ones are in place:
- Connect with the new user: type
quitto log out the root user, then
mysql -u mynewuser -p
- Create database:
CREATE DATABASE cluster;
The database will be populated by the stream manager when that is running.