ClickHouse® is an open-source, high performance columnar OLAP database management system for real-time analytics using SQL.
Docker is a software platform allowing developers to build, test, and deploy applications quickly. Docker packages software into container, a standardized unit abstracting the underlying operating system.
Enable SQL-driven access control and account management for the default user#
By default, the ClickHouse server provides the default user account which is not allowed using SQL-driven access control and account management but has all the rights and permissions. To enable it, we need to edit a server configuration file.
Run
which copies it to your current directory (don't miss the last dot) on your local machine. Then use whatever editor you want to edit the file locally.
In users.xml, add <access_management>1</access_management>.
After the change, the file structure should be something like
Note that this is unsafe and you should change it back to <access_management>0</access_management> after finishing your work.
You've just started a ClickHouse server using docker, connected to it, created a user, a database, a table, and executed some queries against it. You've also learned how to connect to ClickHouse server using MySQL client.
If you like this tutorial, you might also be interested in our product Bytebase, an open source, web-based schema change management tool, which helps you manage ClickHouse database, supporting SQL review, version control, backup and restore and etc...
At Bytebase, we believe in the power of collaboration and open communication, and we have a number of communities that you can join to connect with other like-minded.