"Unknown database 'tpcc'" Displayed When TPC-C Is Used to Load Data
Symptom
"Unknown database 'tpcc'" is displayed when TPC-C is used to load data.

Key Process and Cause Analysis
If the specified database does not exist, the message "Unknown database 'tpcc'" is displayed when TPC-C is used to load data.
Conclusion and Solution
Create a database before using it. In this case, create database tpcc.
- Create a database tpcc in MySQL.
mysql -uroot -p123456 -vvv -n < sql/example/mysql/create_database.sql
In the preceding command, 123456 is the password for logging in to MySQL. Change it to the actual one.
- Create a database table in MySQL.
mysql -uroot -p123456 -vvv -n < sql/example/mysql/create_table.sql
In the preceding command, 123456 is the password for logging in to MySQL. Change it to the actual one.
- Run the data loading command again.
Parent topic: MySQL