mysqlslap: Error when connecting to server: 1049 Unknown database ‘mysqlslap’

mysqlslap: Error when connecting to server: 1049 Unknown database ‘mysqlslap’

While running the following command, we are getting the error:

C:\Program Files\MariaDB 10.6\bin>mysqlslap --host=localhost --user=root --password=password --verbose --concurrency=100 --query="call splitfunction('a,b,c,d,e,f',',')"
mysqlslap: Error when connecting to server: 1049 Unknown database 'mysqlslap'
mysqlslap: Error when connecting to server: 1049 Unknown database 'mysqlslap'
mysqlslap: Error when connecting to server: 1049 Unknown database 'mysqlslap'
mysqlslap: Error when connecting to server: 1049 Unknown database 'mysqlslap'

Solution: We need to add the –create-schema for using the particular schema for the query.

mysqlslap --host=localhost --user=root --password=password --port=3307 --verbose --concurrency=100 --query="call splitfunction('a,b,c,d,e,f',',')" --create-schema=classicmodels

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.