MySQL details:
MySQL username: root
MySQL password: z
To run MySQL query without login, the command is:
mysql -u root -pz -e "mysql-query-here"
So, if I want to create database with name db1
, it will become:
mysql -u root -pz -e "CREATE DATABASE db1 CHARACTER SET utf8 COLLATE utf8_bin"
Now, I want to run this query for database db1
INSERT INTO `role_permission` VALUES (1,'create about_us content','node')
I dont know how to make it works. I've tried many combinations without luck.
You can use the same command, but after adding the DB name like:
You can just add a
use db1
command to the string you pass to mysql.Also, did you create your
role_permissions
table e.g.