MindsDB and MySQL CLI
MindsDB provides a powerful MySQL API that allows users to connect to it using the MySQL Command Line Client.
Please note that connecting to MindsDB’s MySQL API is the same as connecting to a MySQL database. Find more information on MySQL CLI here.
If you installed MindsDB locally, use the below command to run its MySQL API:
If you installed MindsDB locally, use the below command to run its MySQL API:
How to Connect
To connect MindsDB in MySQL, use the mysql
client program:
Here are the commands that allow you to connect to either a local MindsDB installation or a MindsDB Cloud instance.
On execution, we get:
Example
In this example, we connect to the MindsDB Cloud instance, as below.
On execution, we get:
What’s Next?
Now that you are all set, we recommend you check out our Use Cases section, where you’ll find various examples of regression, classification, time series, and NLP predictions with MindsDB.
To learn more about MindsDB itself, follow the guide on MindsDB database structure. Also, don’t miss out on the remaining pages from the MindsDB SQL section, as they explain a common SQL syntax with examples.
Have fun!