Created
September 27, 2021 14:51
-
-
Save anhtran/ec81d68399156630476477a94e602673 to your computer and use it in GitHub Desktop.
Setup mysql 8 for Ghost blog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysqldump -u root -p my_blog_prod > db_backup.sql | |
mysql -u my_blog_user -p my_blog_prod < db_backup.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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