General Introduction
SQL Chat is an open source SQL query and management tool designed to interact with databases through natural language. Users can perform database operations such as querying, modifying, adding and deleting through the chat interface. The tool supports a variety of databases, including MySQL, PostgreSQL, MSSQL and TiDB, providing an intuitive and convenient database management experience.
Function List
- natural language query: Database querying and manipulation using natural language through a chat interface.
- Multi-database supportCompatible with MySQL, PostgreSQL, MSSQL and TiDB databases.
- Self-hosted option: Supports self-hosting via Docker to ensure data privacy and security.
- open source project: Open source code, active community contributions, continuous updates and optimizations.
- intuitive interface: A simple and easy-to-use user interface that reduces learning costs and increases productivity.
Using Help
Installation process
- Docker Installation::
- Ensure that Docker is installed.
- Run the following command to start SQL Chat:
docker run --name sqlchat --platform linux/amd64 --env NEXTAUTH_SECRET="$ (openssl rand -hex 5)" --env OPENAI_API_KEY=<<YOUR_OPENAI_KEY>> -p 3000:3000 --hostname localhost sqlchat/sqlchat
- If you need to connect to the localhost database, use the
host.docker.internal
as the host in the database connection setup.
- Environment variable configuration::
NEXTAUTH_SECRET
: Arbitrary string for authentication.OPENAI_API_KEY
: API key obtained from OpenAI.
Usage Process
- launch an application::
- interviews
http://localhost:3000
Open the SQL Chat interface. - Log in and start interacting with the database using natural language.
- interviews
- perform a search::
- Enter a natural language query in the chat box, e.g. "Query all user data".
- SQL Chat automatically converts natural language into SQL statements and executes the query, returning results.
- data manipulation::
- Support for adding, modifying and deleting data operations through natural language.
- For example, if you enter "Add a new user with the name Zhang San and age 30", SQL Chat will generate the appropriate SQL statement and execute it.
- Customized Configuration::
- Users can customize the configuration of SQL Chat as needed, such as changing database connection settings or adjusting interface display options.
data privacy
- SQL Chat supports self-hosting, which gives users the option to deploy the application on their own servers to ensure data privacy and security.
- To connect to the database using sqlchat.ai, you need to set the
0.0.0.0
Add to the database whitelist IP to allow all connections.