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