This topic describes how to view the MetaDB data of OceanBase Developer Center (ODC).
Notice
MetaDB data may corrupt when being operated directly. Therefore, handle MetaDB data with caution.
The metadata of client ODC is maintained in the embedded h2database.
Go to the metadata path of client ODC.
Windows system: %USERPROFILE%\AppData\Roaming\odc\
cd %USERPROFILE%\AppData\Roaming\odc\macOS:
/Users/{user}/Library/Application Support/odccd ~/"Library/Application Support/odc"
View data files.
ls odc*.db # You can view the following two files, namely, the data files of the h2database database: #odc2.0.mv.db odc2.0.trace.db
You can use a tool such as a MySQL client or OBClient to connect to ODC MetaDB.
In the ODC Docker container, run the
env | grep DATABASE_command to view the connection information about the web ODC MetaDB.Here is the sample result:
# View the environment variables in the ODC Docker container. $env | grep DATABASE_ DATABASE_NAME=*** DATABASE_PORT=*** DATABASE_HOST=*** DATABASE_PASSWORD=*** DATABASE_USERNAME=***In the ODC Docker container, run the following command to connect to ODC MetaDB.
# Connect to ODC MetaDB by using OBClient /opt/odc/obclient/bin/obclient -h${DATABASE_HOST} -P${DATABASE_PORT} -u${DATABASE_USERNAME} -p${DATABASE_PASSWORD} -D${DATABASE_NAME}