Milvus Metadata Management (1) How to View Metadata


by Yihua Mo


Milvus Metadata Management (1)

How to View Metadata

Author: Yihua Mo

Date: 2019-12-24

We introduced some information about metadata in Managing Data in Massive-Scale Vector Search Engine. This article mainly shows how to view the metadata of Milvus.

Milvus supports metadata storage in SQLite or MySQL. There’s a parameter backend_url (in the configuration file server_config.yaml) by which you can specify if to use SQLite or MySQL to manage your metadata.


If SQLite is used, a meta.sqlite file will be generated in the data directory (defined in the primary_path of the configuration file server_config.yaml) after Milvus is started. To view the file, you only need to install a SQLite client.

Install SQLite3 from the command line:

sudo apt-get install sqlite3

Then enter the Milvus data directory, and open the meta file using SQLite3:

sqlite3 meta.sqlite

Now, you’ve already entered the SQLite client command line. Just use a few commands to see what is in the metadata.

To make the printed results typeset easier for humans to read:

.mode column
.header on

To query Tables and TableFiles using SQL statements (case-insensitive):

SELECT \* FROM TableFiles



If you are using MySQL, you need to specify the address of the MySQL service in the backend_url of the configuration file server_config.yaml.

For example, the following settings indicate that the MySQL service is deployed locally, with port ‘3306’, user name ‘root’, password ‘123456’, and database name ‘milvus’:


   backend_url: mysql://root:123456@

First of all, install MySQL client:

sudo apt-get install default-mysql-client

After Milvus is started, two tables (Tables and TableFiles) will be created in the MySQL service specified by backend_url.

Use the following command to connect to MySQL service:

mysql -h127.0.0.1 -uroot -p123456 -Dmilvus

Now, you can use SQL statements to query metadata information: