Skip to content

Instantly share code, notes, and snippets.

@anhtran
Created September 27, 2021 14:51
Show Gist options
  • Save anhtran/ec81d68399156630476477a94e602673 to your computer and use it in GitHub Desktop.
Save anhtran/ec81d68399156630476477a94e602673 to your computer and use it in GitHub Desktop.
Setup mysql 8 for Ghost blog
mysqldump -u root -p my_blog_prod > db_backup.sql
mysql -u my_blog_user -p my_blog_prod < db_backup.sql
CREATE DATABASE my_blog_prod CHARACTER SET utf8 COLLATE utf8_general_ci;
show databases;
CREATE USER 'my_blog_user'@'localhost' IDENTIFIED BY 'myPassword';
SET GLOBAL validate_password.policy = 0;
GRANT ALL PRIVILEGES ON my_blog_prod.* TO 'my_blog_user'@'localhost';
ALTER USER 'my_blog_user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'myPassword';
FLUSH PRIVILEGES;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment