Skip to main content

Sample Procedure for Creating an Appropriate Database Schema and User

The following is a sample procedure that the database administrator can use to create a Code Insight database schema and the database user who will install Code Insight. Additionally, at installation, this same user is automatically identified to Code Insight (in core.db.properties) as the user Code Insight will use internally to manage the database. At a minimum, this user requires the following permissions: ALTER, DROP, CREATE, DELETE, INDEX, INSERT, and UPDATE.

To create a database schema and user, do the following:

  1. At the command line, log into MySQL as the root user:

    mysql -u root -p 
  2. Type the MySQL root password, and press Enter.

  3. To create a database and user, type the following command, replacing the username (codeinsight_user) with the user you want to create, and replace codeInsight%1234 with the user's password:

    CREATE DATABASE codeinsight; 
    CREATE USER codeinsight_user IDENTIFIED BY 'codeInsight%1234';
    GRANT ALL ON codeinsight.* TO 'codeinsight_user'@'%';
  4. Provide the database schema and user credentials to the person who will install Code Insight.