Created
May 24, 2016 09:29
-
-
Save mhausenblas/7086bc6080a84cbbaf10f06d4d4722ab to your computer and use it in GitHub Desktop.
CockroachDB: set up database and user using the internal SQL client
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
core@ip-10-0-7-99 ~ $ docker run -it cockroachdb/cockroach:beta-20160512 sql --host=10.0.7.99 --port=12504 | |
# Welcome to the cockroach SQL interface. | |
# All statements must be terminated by a semicolon. | |
# To exit: CTRL + D. | |
[email protected]:12504> CREATE DATABASE bank; | |
CREATE DATABASE | |
[email protected]:12504> show databases; | |
+----------+ | |
| Database | | |
+----------+ | |
| bank | | |
| system | | |
+----------+ | |
[email protected]:12504> GRANT ALL ON DATABASE bank TO maxroach; | |
GRANT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment