Configuring Metadata Stores in MySQL
Once you install a MySQL database, you must configure it for Schema Registry and SMM.
- Launch the MySQL monitor:
mysql -u root -p
-
Create the database for the Schema Registry and the SMM metastore:
create database registry; create database streamsmsgmgr;
-
Create Schema Registry and SMM user accounts, replacing the final
IDENTIFIED BY
string with your password:CREATE USER 'registry'@'%' IDENTIFIED BY 'R12$%34qw'; CREATE USER 'streamsmsgmgr'@'%' IDENTIFIED BY 'R12$%34qw';
- Assign privileges to the user account:
GRANT ALL PRIVILEGES ON registry.* TO 'registry'@'%' WITH GRANT OPTION ; GRANT ALL PRIVILEGES ON streamsmsgmgr.* TO 'streamsmsgmgr'@'%' WITH GRANT OPTION ;
If you cannot grant all privileges, grant the following privileges that SMM and Schema Registry require at a minimum:- CREATE/ALTER/DROP TABLE
- CREATE/ALTER/DROP INDEX
- CREATE/ALTER/DROP SEQUENCE
- CREATE/ALTER/DROP PROCEDURE
For example:grant create session to streamsmsgmgr; grant create table to streamsmsgmgr; grant create sequence to streamsmsgmgr;
- Commit the operation:
commit;