/eblog

a blog write with nodejs(express+ejs(index)+angularjs(manager)+mysql)

Primary LanguageJavaScript

运行环境

  • mysql
  • nodejs

备份database

mysqldump -u root -p  blog_dev >/tmp/blog_dev.sql

恢复database

1.create database

create database

2.restore database

mysql -u root -p blog_dev </tmp/blog_dev.sql

使用指定用户管理blog_dev库

CREATE USER 'blog_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON blog_dev.* To 'blog_user'@'localhost';
FLUSH PRIVILEGES;

tips

忽略关联关系检查

SET FOREIGN_KEY_CHECKS = 0;

mysql远程访问控制

select host,user,password from mysql.user;
update mysql.user set host = '%' where mysql.user = 'root';