January 2018
Intermediate to advanced
446 pages
12h 57m
English
For example, if you want to rename the audit_log table audit_log_archive_2018, you can execute the following:
mysql> USE prod;Database changedmysql> RENAME TABLE audit_log TO audit_log_archive_2018;Query OK, 0 rows affected (0.07 sec)
If you want to move the table from one database to an other, you can use dot notation to specify the database name. For example, if you want to move the audit_log table from the database named prod to the database named archive, execute the following:
mysql> USE prodReading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -Amysql> SHOW TABLES;+------------------------+| Tables_in_prod |+------------------------+| audit_log_archive_2018 ...