mysqlslap
mysqlslap [options]database
This utility is used to emulate a load of multiple clients on the server to check the timing of the system. It’s available as of version 5.1.4 of MySQL.
--auto-generate-sql,
-aIf you do not want to use or have a file containing SQL statements for testing the server, nor do you want to manually supply SQL statements from the command line, you can use this option to instruct the utility to automatically generate SQL to emulate a client load.
--compress, -CThis option compresses data passed between the utility and the server, if compression is supported.
--concurrency=number,
-c numberUse this option to specify the number of clients to simulate.
--create=valueThis option is used to specify a file or string to use for creating a table for use in testing.
--create-schema=valueThis option is used to specify a file or string containing a table schema to use for creating a table for use in testing.
--csv[=filename]This option returns data in a comma-separated value format. It will export the data to the standard output, unless a filename is given. Then it will save the information to that file.
--debug[=options],
-# [options]This option logs debugging information. The set of options
used by default is 'd:t:o,logname'. See Table 16-1 at the end of the list of the
mysqldump utility options earlier in this
chapter for an explanation of these flags and others that may be
used.
--debug-checkThis option writes debugging information to the log when the utility ends. It’s available as of version 5.1.21 of MySQL.
--debug-info, -TThis option writes debugging information and CPU and memory usage information to the log after the utility ends.
--delimiter=string,
-F stringUse this option to specify the delimiter used in the SQL file given.
--engine=engine,
-e engineUse this option to specify the storage engine to use for the test table.
--host=host,
-h hostThis option specifies the host on which to connect to the server.
--help, -?This option displays help information about the utility.
--iterations=number,
-i numberThis option is used to specify the number of times to run the client load emulation tests.
--number-char-cols=number,
-x numberWhen specifying --auto-generate-sql, use
this option to specify the number of VARCHAR
columns to use.
--number-int-cols=number,
-y numberWhen specifying --auto-generate-sql, use
this option to specify the number of INT
columns to use.
--number-of-queries=numberThis option is used to specify the number of queries for each client.
--only-printThis option instructs the utility not to run the tests on the server, but to display only what would have been done based on the options given.
--password=password,
-p passwordThis option provides the password of the user logging into the server.
--port=portThis option specifies the port on which to connect to the server. The default is 3306.
--preserve-schemaThis option preserves the schema used when the utility was run.
--protocol=protocolThis specifies the protocol to use when connecting to the
server. The choices are TCP,
SOCKET, PIPE, and
MEMORY.
--query=value,
-q valueThis option is used to give the string or to specify the
file to use that contains the SELECT statement
for querying the server for testing.
--silent, -sThis option displays no messages.
--socket=filename,
-S filenameThis option provides the name of the server’s socket file for Unix-type systems or the named pipe for Windows systems.
--sslThis option specifies that secure SSL connections should be
used. It requires the server to have SSL enabled. If this option
is enabled on the utility by default, use --skip-ssl to disable it.
--ssl-ca=pem_fileThis option specifies the name of the file (i.e., the pem file) containing a list of trusted SSL CAs.
--ssl-capath=pathThis option specifies the path to the trusted certificates file (i.e., the pem file).
--ssl-cert=filenameThis option specifies the name of the SSL certificate file to use for SSL connections.
--ssl-cipher=ciphersThis option gives a list of ciphers that may be used for SSL encryption
--ssl-key=filenameThis option specifies the SSL key file to use for secure connections.
--ssl-verify-server-certThis option verifies the client’s certificate against the server’s certificate for the client at startup. It is available as of version 5.1.11 of MySQL.
--use-threadsOn Unix-type systems, the mysqlap utility
uses fork(). This option will instruct
the server to use pthread() instead. On
Windows systems threads are used by default.
--user=user,
-u userThis option provides the username for logging into the server.
--verboseThis option displays more information from the utility.
--versionThis option returns the version of the utility.