The following script creates a MySQL database & a user who will be assigned as a privileged user to the db.
We used the following credentials for this example –
Database name: mysite_db
Database user: mysite_user
Database password: mypassword
## create db & user mysql -u root -e "create database mysite_db DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;" mysql -u root -e "grant all privileges on mysite_db.* to mysite_user IDENTIFIED BY 'mypassword' ;"
Leave a Reply