MySQL 5.7 Reference Manual
v
3.6.8 Calculating Visits Per Day ...................................................................................... 295
3.6.9 Using AUTO_INCREMENT ..................................................................................... 296
3.7 Using MySQL with Apache ............................................................................................... 298
4 MySQL Programs ........................................................................................................................ 301
4.1 Overview of MySQL Programs .......................................................................................... 302
4.2 Using MySQL Programs ................................................................................................... 306
4.2.1 Invoking MySQL Programs ..................................................................................... 306
4.2.2 Connecting to the MySQL Server ........................................................................... 307
4.2.3 Specifying Program Options ................................................................................... 311
4.2.4 Using Options on the Command Line ..................................................................... 312
4.2.5 Program Option Modifiers ....................................................................................... 313
4.2.6 Using Option Files ................................................................................................. 314
4.2.7 Command-Line Options that Affect Option-File Handling .......................................... 319
4.2.8 Using Options to Set Program Variables ................................................................. 320
4.2.9 Option Defaults, Options Expecting Values, and the = Sign ...................................... 321
4.2.10 Setting Environment Variables .............................................................................. 325
4.3 MySQL Server and Server-Startup Programs ..................................................................... 326
4.3.1 mysqld — The MySQL Server ............................................................................... 326
4.3.2 mysqld_safe — MySQL Server Startup Script ...................................................... 326
4.3.3 mysql.server — MySQL Server Startup Script .................................................... 333
4.3.4 mysqld_multi — Manage Multiple MySQL Servers ............................................... 335
4.4 MySQL Installation-Related Programs ................................................................................ 339
4.4.1 comp_err — Compile MySQL Error Message File .................................................. 339
4.4.2 mysql_install_db — Initialize MySQL Data Directory ......................................... 340
4.4.3 mysql_plugin — Configure MySQL Server Plugins .............................................. 351
4.4.4 mysql_secure_installation — Improve MySQL Installation Security ................ 353
4.4.5 mysql_ssl_rsa_setup — Create SSL/RSA Files ................................................. 356
4.4.6 mysql_tzinfo_to_sql — Load the Time Zone Tables ......................................... 359
4.4.7 mysql_upgrade — Check and Upgrade MySQL Tables ......................................... 359
4.5 MySQL Client Programs ................................................................................................... 367
4.5.1 mysql — The MySQL Command-Line Tool ............................................................ 367
4.5.2 mysqladmin — Client for Administering a MySQL Server ....................................... 394
4.5.3 mysqlcheck — A Table Maintenance Program ...................................................... 403
4.5.4 mysqldump — A Database Backup Program .......................................................... 411
4.5.5 mysqlimport — A Data Import Program ............................................................... 433
4.5.6 mysqlpump — A Database Backup Program .......................................................... 440
4.5.7 mysqlsh — The MySQL Shell ............................................................................... 456
4.5.8 mysqlshow — Display Database, Table, and Column Information ............................ 460
4.5.9 mysqlslap — Load Emulation Client ..................................................................... 466
4.6 MySQL Administrative and Utility Programs ....................................................................... 474
4.6.1 innochecksum — Offline InnoDB File Checksum Utility .......................................... 474
4.6.2 myisam_ftdump — Display Full-Text Index information .......................................... 480
4.6.3 myisamchk — MyISAM Table-Maintenance Utility .................................................. 481
4.6.4 myisamlog — Display MyISAM Log File Contents .................................................. 498
4.6.5 myisampack — Generate Compressed, Read-Only MyISAM Tables ........................ 499
4.6.6 mysql_config_editor — MySQL Configuration Utility ......................................... 505
4.6.7 mysqlbinlog — Utility for Processing Binary Log Files .......................................... 512
4.6.8 mysqldumpslow — Summarize Slow Query Log Files ............................................ 534
4.7 MySQL Program Development Utilities .............................................................................. 536
4.7.1 mysql_config — Display Options for Compiling Clients ........................................ 537
4.7.2 my_print_defaults — Display Options from Option Files .................................... 538
4.7.3 resolve_stack_dump — Resolve Numeric Stack Trace Dump to Symbols ............. 540
4.8 Miscellaneous Programs ................................................................................................... 540
4.8.1 lz4_decompress — Decompress mysqlpump LZ4-Compressed Output .................. 540