- check if mysql is running using:
service mysql status - start mysql if stopped using:
service mysql start - into the mysql shell with:
mysql - create a new database:
create database blog_database - create a user:
create user 'blog_admin'@'localhost' identified by '1numeric1lower1UPPER1$pecial' - grant access to the
blog_databasedatabase to theblog_adminuser:grant all on blog_database.* to 'blog_admin'@'localhost'
- into the grails command line:
grails - run the app:
run-app - open the link:
http://localhost:8080/post/index - to access the database, goto:
localhost:8080/dbconsoleand add the above mentionedurl,usernameandpassword