1. Acquire the SQL file for database schema setting:
    wget --no-check-certificate -q -O mysql.sql https://opensource.ncsa.illinois.edu/confluence/download/attachments/589837/mysql.sql
    
  2. Replace database name (db_name), user name (db_user) and user password (db_pass) and create a new SQL file (kisti.sql)
    sed -e "s#<at:var at:name="DB_SCHEMA" />#db_name#" -e "s#<at:var at:name="DB_USER" />#db_user#" -e "s#<at:var at:name="DB_PASS" />#db_pass#" mysql.sql > kisti.sql
    
  3. Add the following line at the file created above if you want to access the database remotely
    GRANT ALL ON db_name.* TO 'db_user'@'host_name' IDENTIFIED BY 'db_pass';
    
  4. Build the database by using the SQL file
    mysql -u root -h localhost -p < kisti.sql
    
  • No labels