控制台登录服务器
登录mysql:
mysql -uroot -p
屏显:
[root@VM_0_10_centos ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 182
Server version: 5.5.62 Source distribution
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
显示所有数据库:
mysql> show databases;
屏显:
+--------------------+
| Database |
+--------------------+
| pro |
| reseed |
+--------------------+
进入reseed数据库:
mysql> use reseed
显示当前数据库所有表
mysql> show tables;
屏显:
+------------------+
| Tables_in_reseed |
+------------------+
| error_torrents |
| historys |
| sites |
| torrent_pieces |
| torrent_records |
| torrent_search |
| torrents |
| totp |
| users |
+------------------+
9 rows in set (0.02 sec)
转换前为了解决警告:ERROR 2006 (HY000): MySQL server has gone away,可以执行:set global max_allowed_packet=1024*1024*16;
转换存储引擎:
ALTER TABLE torrent_records ENGINE=INNODB;
ALTER TABLE torrent_pieces ENGINE=INNODB;
ALTER TABLE torrents ENGINE=INNODB;
ALTER TABLE torrent_search ENGINE=INNODB;
屏显:
mysql> ALTER TABLE torrent_records ENGINE=INNODB;
Query OK, 2306734 rows affected (5 min 28.94 sec)
Records: 2306734 Duplicates: 0 Warnings: 0
mysql> ALTER TABLE torrent_pieces ENGINE=INNODB;
Current database: reseed
Query OK, 1551854 rows affected (1 min 43.50 sec)
Records: 1551854 Duplicates: 0 Warnings: 0
mysql> ALTER TABLE torrents ENGINE=INNODB;
版权属于:大卫科技Blog
本文链接:https://www.iyuu.cn/archives/359/
转载时须注明出处