Creating a database and users

The admintools utility included in the installation provides a number of administrative functions.

The admintools utility included in the installation provides a number of administrative functions. The following steps show how to create a database and users with this utility.

  1. View the status of your cluster. It should return an empty table.

    $ admintools -t view_cluster
    
     DB | Host | State
    ----+------+-------
    
  2. Create a database called "vdb" in the home directory with the password "vertica". This command also sets the plaintext password "vertica" for both the database and dbadmin.

    $ admintools -t create_db --data_path=/home/dbadmin --catalog_path=/home/dbadmin --database=vdb --password=vertica --hosts=localhost
    
  3. Run vsql and enter "vertica" at the password prompt.

    $ vsql
    
  4. Create a user named "Mike" with the password "inventor."

    => CREATE USER Mike IDENTIFIED BY 'inventor';
    
  5. Grant the USAGE permission on the public schema.

    => GRANT USAGE ON SCHEMA PUBLIC TO Mike;
    
  6. Load sample data.