Create MySQL Database and User for OCNSSF
- Login to the server or machine which has permission to access the SQL nodes of NDB cluster.
- Connect to the SQL nodes of NDB cluster one by one.
- Login to the MySQL prompt using root permission or user, who has
                    permission to create users with permissions as mentioned below. Example:
                        mysql -h 127.0.0.1 -uroot -p
- Check whether OCNSSF network function user already exists. If not
                    exists, create an OCNSSF network function user by executing following
                        queries:
                        - Execute$ SELECT User FROM mysql.user;to list the users.
- If user does not exist, create the new user by executing
                                $ CREATE USER '<OCNSSF User Name>'@'%' IDENTIFIED BY '<OCNSSF Password>';Example: $ CREATE USER 'nssfusr'@'%' IDENTIFIED BY 'nssfpasswd';
 
- Execute
- Check OCNSSF network function database already exists. If does not
                    exist, create an OCNSSF network function database and provide permissions to
                    OCNSSF user name created in the previous step:
                        - Execute $ show databases;to check if database exists.
- If database does not exists, execute $ CREATE DATABASE IF NOT EXISTS <OCNSSF Database> CHARACTER SET utf8;for Database creation.Example: $ CREATE DATABASE IF NOT EXISTS nssfdb CHARACTER SET utf8;
- Granting permission to user:
                              $ GRANT SELECT,INSERT,CREATE,ALTER,DROP,LOCK TABLES,CREATE TEMPORARY TABLES, DELETE,UPDATE,EXECUTE ON <OCNSSF Database>.* TO '<OCNSSF User Name>'@'%';
 
- Execute