Created
October 26, 2012 10:58
-
-
Save st4lk/3958188 to your computer and use it in GitHub Desktop.
MySQL: dump database
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
1)Создание базы для Django: | |
CREATE DATABASE database_name CHARACTER SET utf8; | |
CREATE USER 'user_name'@'localhost' IDENTIFIED BY 'user_password'; | |
GRANT ALL ON database_name.* TO 'user_name'@'localhost'; | |
2) Дамп базы | |
Сохранение: mysqldump -u имя_пользователя -p -h имя_сервера_БД имя_базы > dump.sql | |
Восстановление: mysql -u имя_пользователя -p -h имя_сервера_БД имя_базы < dump.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment