donghm

Untitled

Jul 17th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. (venv) donghm@donghm:~/git/pgscm$ sudo docker ps
  2. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
  3. a509a1906fc1 mariadb "docker-entrypoint..." About a minute ago Up About a minute 0.0.0.0:3306->3306/tcp mariadb_pgscm
  4. (venv) donghm@donghm:~/git/pgscm$ sudo docker exec -it mariadb_pgscm bash
  5. root@a509a1906fc1:/# mysql -uroot -pdong
  6. Welcome to the MariaDB monitor. Commands end with ; or \g.
  7. Your MariaDB connection id is 8
  8. Server version: 10.2.7-MariaDB-10.2.7+maria~jessie mariadb.org binary distribution
  9.  
  10. Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
  11.  
  12. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  13.  
  14. MariaDB [(none)]> CREATE DATABASE pgscm;
  15. Query OK, 1 row affected (0.00 sec)
  16.  
  17. MariaDB [(none)]> GRANT ALL PRIVILEGES ON pgscm.* TO 'root'@'localhost' \
  18. -> IDENTIFIED BY 'pgscm';
  19. Query OK, 0 rows affected (0.00 sec)
  20.  
  21. MariaDB [(none)]> GRANT ALL PRIVILEGES ON pgscm.* TO 'root'@'%' \
  22. -> IDENTIFIED BY 'pgscm';
  23. Query OK, 0 rows affected (0.00 sec)
  24.  
  25. MariaDB [(none)]> exit;
  26. Bye
  27. root@a509a1906fc1:/# exit
  28. exit
  29. (venv) donghm@donghm:~/git/pgscm$ ls
  30. adminlte babel.cfg data-dev.sqlite LICENSE MANIFEST.in note.txt __pycache__ README.rst setup.cfg test-requirements.txt tools
  31. app config.py doc manage.py migrations pgscm quick_start.md requirements.txt setup.py tests tox.ini
  32. (venv) donghm@donghm:~/git/pgscm$ rm -f data-dev.sqlite
  33. (venv) donghm@donghm:~/git/pgscm$ python3 manage.py db upgrade
  34. INFO [alembic.runtime.migration] Context impl MySQLImpl.
  35. INFO [alembic.runtime.migration] Will assume non-transactional DDL.
  36. INFO [alembic.runtime.migration] Running upgrade -> 38c4e85512a9, initial migration
  37. INFO [alembic.runtime.migration] Running upgrade 38c4e85512a9 -> 456a945560f6, login support
  38. INFO [alembic.runtime.migration] Running upgrade 456a945560f6 -> 56502d362ab5, trackable user info
  39. INFO [alembic.runtime.migration] Running upgrade 56502d362ab5 -> b91f6260d520, empty message
  40. Revision ID: b91f6260d520
  41. Revises: 56502d362ab5
  42. Create Date: 2017-07-16 18:17:32.791453
  43. (venv) donghm@donghm:~/git/pgscm$
Add Comment
Please, Sign In to add comment