blog ...http://www.xuxihai.top
- mysql
- nodejs
mysqldump -u root -p blog_dev >/tmp/blog_dev.sql
1.create database
create database
2.restore database
mysql -u root -p blog_dev </tmp/blog_dev.sql
CREATE USER 'blog_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON blog_dev.* To 'blog_user'@'localhost';
FLUSH PRIVILEGES;
SET FOREIGN_KEY_CHECKS = 0;
select host,user,password from mysql.user;
update mysql.user set host = '%' where mysql.user = 'root';