Home Database Mysql Tutorial Percona Data Recovery Tool for InnoDB工具恢复单表的案例_MySQL

Percona Data Recovery Tool for InnoDB工具恢复单表的案例_MySQL

Jun 01, 2016 pm 01:30 PM
work friend

bitsCN.com

Percona Data Recovery Tool for InnoDB工具恢复单表的案例

 

今天上班有个朋友询问我,相关Percona Data Recovery Tool for InnoDB恢复数据中的一些问题,比如说delete,没法恢复数据,原先做过类似的异常处理就,再次模拟了下相关的恢复操作流程,仅供学习使用;相关的配置工具策略网上很多,这里我就一笔带过了,不再进行详述,下面就开始梳理相关的细节问题;

 

[root@Mysql64 local]# mysql -uroot -prootWelcome to the MySQL monitor.  Commands end with ; or /g.Your MySQL connection id is 33Server version: 5.5.28-log Source distributionType 'help;' or '/h' for help. Type '/c' to clear the buffer.mysql> create database gg;ERROR 1007 (HY000): Can't create database 'gg'; database existsmysql> show databases;+--------------------+| Database           |+--------------------+| information_schema | | cacti              | | gg                 | | mysql              | | performance_schema | | temp               | | test               | +--------------------+7 rows in set (0.12 sec)mysql> use gg;Database changedmysql> show tables;Empty set (0.00 sec)mysql> create table a select * from mysql.user;Query OK, 12 rows affected (0.17 sec)Records: 12  Duplicates: 0  Warnings: 0mysql> delete from a;Query OK, 12 rows affected (0.12 sec)mysql> select * from a;Empty set (0.00 sec)mysql> [root@Mysql64 percona-data-recovery-tool-for-innodb-0.5]# ./page_parser -5 -f /usr/local/mysql/data/gg/a.ibd Opening file: /usr/local/mysql/data/gg/a.ibd:64768           ID of device containing file5836121         inode number33200           protection1               number of hard links500             user ID of owner500             group ID of owner0               device ID (if special file)98304           total size, in bytes4096            blocksize for filesystem I/O200             number of blocks allocated1377829472      time of last access1377831011      time of last modification1377831011      time of last status change98304   Size to process in bytes104857600       Disk cache size in bytes[root@Mysql64 percona-data-recovery-tool-for-innodb-0.5]#./create_defs.pl --host=localhost --user=root --password=root --db=gg --table=a  > include/table_defs.h[root@Mysql64 percona-data-recovery-tool-for-innodb-0.5]# cat include/table_defs.h                                        can_be_null: FALSE,                                        uint_min_val: 0,                                        uint_max_val: 4294967295ULL                                },                                can_be_null: FALSE                        },                        { /* char(64) */                                name: "plugin",                                type: FT_CHAR,                                min_length: 64,                                max_length: 192,                                has_limits: FALSE,                                limits: {                                        can_be_null: TRUE,                                        char_min_len: 0,                                        char_max_len: 192,                                        char_ascii_only: TRUE                                },                                can_be_null: TRUE                        },                        { /* text */                                name: "authentication_string",                                type: FT_TEXT,                                min_length: 0,                                max_length: 65535,                                has_limits: FALSE,                                limits: {                                        can_be_null: TRUE,                                        char_min_len: 0,                                        char_max_len: 65535,                                        char_ascii_only: TRUE                                },                                can_be_null: TRUE                        },                        { type: FT_NONE }                }        },};#endif[root@Mysql64 percona-data-recovery-tool-for-innodb-0.5]# [root@Mysql64 percona-data-recovery-tool-for-innodb-0.5]# ./constraints_parser -5 -D -f pages-1377849796/FIL_PAGE_INDEX/0-18/0-00000003.page LOAD DATA INFILE '/usr/local/percona-data-recovery-tool-for-innodb-0.5/dumps/default/SYS_TABLES' REPLACE INTO TABLE `SYS_TABLES` FIELDS TERMINATED BY '/t' OPTIONALLY ENCLOSED BY '"' LINES STARTING BY 'SYS_TABLES/t' (NAME, ID, N_COLS, TYPE, MIX_ID, MIX_LEN, CLUSTER_NAME, SPACE);[root@Mysql64 percona-data-recovery-tool-for-innodb-0.5]# makegcc -DHAVE_OFFSET64_T -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -Wall -O3 -g -I include -I mysql-source/include -I mysql-source/innobase/include -c tables_dict.c -o lib/tables_dict.ogcc -DHAVE_OFFSET64_T -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -Wall -O3 -g -I include -I mysql-source/include -I mysql-source/innobase/include -c print_data.c -o lib/print_data.o gcc -DHAVE_OFFSET64_T -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -Wall -O3 -g -I include -I mysql-source/include -I mysql-source/innobase/include -c check_data.c -o lib/check_data.ogcc -DHAVE_OFFSET64_T -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -Wall -O3 -g -I include -I mysql-source/include -I mysql-source/innobase/include -o constraints_parser constraints_parser.c lib/tables_dict.o lib/print_data.o lib/check_data.o lib/libut.a lib/libmystrings.agcc -DHAVE_OFFSET64_T -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -Wall -O3 -g -I include -I mysql-source/include -I mysql-source/innobase/include -static -lrt -o page_parser page_parser.c lib/tables_dict.o lib/libut.a [root@Mysql64 percona-data-recovery-tool-for-innodb-0.5]# 这里需要重新编译才可以生产,不能只变异一次,不然后期你会看不到数据都为空值的;记住这里需要进行2次make哦,不能少一次![root@Mysql64 percona-data-recovery-tool-for-innodb-0.5]# ./constraints_parser -5 -f pages-1377849796/FIL_PAGE_INDEX/0-18/0-00000003.page a       "localhost                                                   "  "root            "      "*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"      "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     ""                      00       0       0       "                                                                "      ""a       "Mysql64                                                     "  "root            "      "*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"      "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     ""                      00       0       0       "                                                                "      ""a       "127.0.0.1                                                   "  "root            "      "*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"      "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     ""                      00       0       0       "                                                                "      ""a       "::1                                                         "  "root            "      "*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"      "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     ""                      00       0       0       "                                                                "      ""a       "localhost                                                   "  "                "      "                                         "     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"      "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     ""                      00       0       0       "                                                                "      NULLa       "Mysql64                                                     "  "                "      "                                         "     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"      "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     ""                      00       0       0       "                                                                "      NULLa       "localhost                                                   "  "cacti           "      "*43DD7940383044FBDE5B177730FAD3405BC6DAD7"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"      "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     ""                      00       0       0       "                                                                "      NULLa       "192.168.155.229                                             "  "cacti           "      "*43DD7940383044FBDE5B177730FAD3405BC6DAD7"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"      "Y"     "N"     "N"     "N"     "N"     "N"     "N"     "Y"     "N"     "N"     "N"     "N"     "Y"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     ""                      00       0       0       "                                                                "      NULLa       "%                                                           "  "cacti           "      "*43DD7940383044FBDE5B177730FAD3405BC6DAD7"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"      "Y"     "Y"     "N"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     ""                      00       0       0       "                                                                "      NULLa       "127.0.0.1                                                   "  "cacti           "      "*43DD7940383044FBDE5B177730FAD3405BC6DAD7"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"      "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     ""                      00       0       0       "                                                                "      NULLa       "*.*                                                         "  "cacti           "      "                                         "     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"      "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     ""                      00       0       0       "                                                                "      NULLa       "%                                                           "  "root            "      "*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"      "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     ""                      00       0       0       "                                                                "      NULLLOAD DATA INFILE '/usr/local/percona-data-recovery-tool-for-innodb-0.5/dumps/default/a' REPLACE INTO TABLE `a` FIELDS TERMINATED BY '/t' OPTIONALLY ENCLOSED BY '"' LINES STARTING BY 'a/t' (Host, User, Password, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv, Create_view_priv, Show_view_priv, Create_routine_priv, Alter_routine_priv, Create_user_priv, Event_priv, Trigger_priv, Create_tablespace_priv, ssl_type, @var_ssl_cipher, @var_x509_issuer, @var_x509_subject, max_questions, max_updates, max_connections, max_user_connections, plugin, authentication_string)SET    ssl_cipher = UNHEX(@var_ssl_cipher),    x509_issuer = UNHEX(@var_x509_issuer),    x509_subject = UNHEX(@var_x509_subject);[root@Mysql64 percona-data-recovery-tool-for-innodb-0.5]# 结下了看到了我从ibd里面删除的数据,我要把它放到一个目录内,记住这里我需要放到含有mysql访问的目录内,原先我存放在tmp啊,data目录啊都不行,最后放在mysql权限内的目录就可以了;[root@Mysql64 percona-data-recovery-tool-for-innodb-0.5]# ./constraints_parser -5 -f pages-1377849796/FIL_PAGE_INDEX/0-18/0-00000003.page > /usr/local/mysql/data/find.sqlLOAD DATA INFILE '/usr/local/percona-data-recovery-tool-for-innodb-0.5/dumps/default/a' REPLACE INTO TABLE `a` FIELDS TERMINATED BY '/t' OPTIONALLY ENCLOSED BY '"' LINES STARTING BY 'a/t' (Host, User, Password, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv, Create_view_priv, Show_view_priv, Create_routine_priv, Alter_routine_priv, Create_user_priv, Event_priv, Trigger_priv, Create_tablespace_priv, ssl_type, @var_ssl_cipher, @var_x509_issuer, @var_x509_subject, max_questions, max_updates, max_connections, max_user_connections, plugin, authentication_string)SET    ssl_cipher = UNHEX(@var_ssl_cipher),    x509_issuer = UNHEX(@var_x509_issuer),    x509_subject = UNHEX(@var_x509_subject);[root@Mysql64 percona-data-recovery-tool-for-innodb-0.5]# 查询目录的内容是否正确;[root@Mysql64 data]# pwd/usr/local/mysql/data[root@Mysql64 data]# ll -h | grep find*-rw-r--r-- 1 root  root   3.9K 08-30 16:31 find.sql 看到是有数据的有3.9k左右大小,当然这里是测试数据量比较小(mysql.user的数据量)![root@Mysql64 data]# [root@Mysql64 data]# vi  find.sql   ---看看内容;a       "localhost                                                   "  "root            "      "*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     ""                              0       0       0       0       "                                                                "      ""a       "Mysql64                                                     "  "root            "      "*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     ""                              0       0       0       0       "                                                                "      ""a       "127.0.0.1                                                   "  "root            "      "*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     ""                              0       0       0       0       "                                                                "      ""a       "::1                                                         "  "root            "      "*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     ""                              0       0       0       0       "                                                                "      ""a       "localhost                                                   "  "                "      "                                         "     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     ""                              0       0       0       0       "                                                                "      NULLa       "Mysql64                                                     "  "                "      "                                         "     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     ""                              0       0       0       0       "                                                                "      NULLa       "localhost                                                   "  "cacti           "      "*43DD7940383044FBDE5B177730FAD3405BC6DAD7"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     ""                              0       0       0       0       "                                                                "      NULLa       "192.168.155.229                                             "  "cacti           "      "*43DD7940383044FBDE5B177730FAD3405BC6DAD7"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "Y"     "N"     "N"     "N"     "N"     "N"     "N"     "Y"     "N"     "N"     "N"     "N"     "Y"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     ""                              0       0       0       0       "                                                                "      NULLa       "%                                                           "  "cacti           "      "*43DD7940383044FBDE5B177730FAD3405BC6DAD7"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "N"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     ""                              0       0       0       0       "                                                                "      NULLa       "127.0.0.1                                                   "  "cacti           "      "*43DD7940383044FBDE5B177730FAD3405BC6DAD7"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     "N"     ""                              0       0       0       0       "                                                                "      NULLa       "*.*                                                         "  "cacti           "      "                                         "     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     ""                              0       0       0       0       "                                                                "      NULLa       "%                                                           "  "root            "      "*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     "Y"     ""                              0       0       0       0       "                                                                "      NULL~~~~~~~~~~~[root@Mysql64 data]#  下面我们需要把sql文件内的文本load到我们的库内;这里我需要提出的是load的路径,要进行设置下; 上面我在导入的时候估计变量忘记设置,导致出现部分失误,这里需要做的同学注意下;                                                                   mysql> use gg;Database changedmysql> select * from a;Empty set (0.00 sec)mysql> LOAD DATA INFILE '/usr/local/mysql/data/find.sql' REPLACE INTO TABLE `a` FIELDS TERMINATED BY '/t' OPTIONALLY ENCLOSED BY '"' LINES STARTING BY 'a/t' (Host, User, Password, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv, Create_view_priv, Show_view_priv, Create_routine_priv, Alter_routine_priv, Create_user_priv, Event_priv, Trigger_priv, Create_tablespace_priv, ssl_type, @var_ssl_cipher, @var_x509_issuer, @var_x509_subject, max_questions, max_updates, max_connections, max_user_connections, plugin, authentication_string)    -> SET    ->     ssl_cipher = UNHEX(@var_ssl_cipher),    ->     x509_issuer = UNHEX(@var_x509_issuer),    ->     x509_subject = UNHEX(@var_x509_subject);Query OK, 12 rows affected (0.03 sec)Records: 12  Deleted: 0  Skipped: 0  Warnings: 0mysql> select * from a;+-----------------+-------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+------------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+--------+-----------------------+| Host            | User  | Password                                  | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | Alter_routine_priv | Create_user_priv | Event_priv | Trigger_priv | Create_tablespace_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections | max_user_connections | plugin | authentication_string |+-----------------+-------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+------------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+--------+-----------------------+| localhost       | root  | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | Y                | Y              | Y                   | Y                  | Y                | Y          | Y            | Y                      |          |            |             |              |             0 |           0 |               0 |                    0 |        |                       | | Mysql64         | root  | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | Y                | Y              | Y                   | Y                  | Y                | Y          | Y            | Y                      |          |            |             |              |             0 |           0 |               0 |                    0 |        |                       | | 127.0.0.1       | root  | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | Y                | Y              | Y                   | Y                  | Y                | Y          | Y            | Y                      |          |            |             |              |             0 |           0 |               0 |                    0 |        |                       | | ::1             | root  | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | Y                | Y              | Y                   | Y                  | Y                | Y          | Y            | Y                      |          |            |             |              |             0 |           0 |               0 |                    0 |        |                       | | localhost       |       |                                           | N           | N           | N           | N           | N           | N         | N           | N             | N            | N         | N          | N               | N          | N          | N            | N          | N                     | N                | N            | N               | N                | N                | N              | N                   | N                  | N                | N          | N            | N                      |          |            |             |              |             0 |           0 |               0 |                    0 |        | NULL                  | | Mysql64         |       |                                           | N           | N           | N           | N           | N           | N         | N           | N             | N            | N         | N          | N               | N          | N          | N            | N          | N                     | N                | N            | N               | N                | N                | N              | N                   | N                  | N                | N          | N            | N                      |          |            |             |              |             0 |           0 |               0 |                    0 |        | NULL                  | | localhost       | cacti | *43DD7940383044FBDE5B177730FAD3405BC6DAD7 | N           | N           | N           | N           | N           | N         | N           | N             | N            | N         | N          | N               | N          | N          | N            | N          | N                     | N                | N            | N               | N                | N                | N              | N                   | N                  | N                | N          | N            | N                      |          |            |             |              |             0 |           0 |               0 |                    0 |        | NULL                  | | 192.168.155.229 | cacti | *43DD7940383044FBDE5B177730FAD3405BC6DAD7 | N           | N           | N           | N           | N           | N         | N           | N             | Y            | N         | N          | N               | N          | N          | N            | Y          | N                     | N                | N            | N               | Y                | N                | N              | N                   | N                  | N                | N          | N            | N                      |          |            |             |              |             0 |           0 |               0 |                    0 |        | NULL                  | | %               | cacti | *43DD7940383044FBDE5B177730FAD3405BC6DAD7 | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | N          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | Y                | Y              | Y                   | Y                  | Y                | Y          | Y            | Y                      |          |            |             |              |             0 |           0 |               0 |                    0 |        | NULL                  | | 127.0.0.1       | cacti | *43DD7940383044FBDE5B177730FAD3405BC6DAD7 | N           | N           | N           | N           | N           | N         | N           | N             | N            | N         | N          | N               | N          | N          | N            | N          | N                     | N                | N            | N               | N                | N                | N              | N                   | N                  | N                | N          | N            | N                      |          |            |             |              |             0 |           0 |               0 |                    0 |        | NULL                  | | *.*             | cacti |                                           | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | Y                | Y              | Y                   | Y                  | Y                | Y          | Y            | Y                      |          |            |             |              |             0 |           0 |               0 |                    0 |        | NULL                  | | %               | root  | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | Y                | Y              | Y                   | Y                  | Y                | Y          | Y            | Y                      |          |            |             |              |             0 |           0 |               0 |                    0 |        | NULL                  | +-----------------+-------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+------------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+--------+-----------------------+12 rows in set (0.00 sec)mysql>
Copy after login

 


bitsCN.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

When might a full table scan be faster than using an index in MySQL? When might a full table scan be faster than using an index in MySQL? Apr 09, 2025 am 12:05 AM

Full table scanning may be faster in MySQL than using indexes. Specific cases include: 1) the data volume is small; 2) when the query returns a large amount of data; 3) when the index column is not highly selective; 4) when the complex query. By analyzing query plans, optimizing indexes, avoiding over-index and regularly maintaining tables, you can make the best choices in practical applications.

Explain InnoDB Full-Text Search capabilities. Explain InnoDB Full-Text Search capabilities. Apr 02, 2025 pm 06:09 PM

InnoDB's full-text search capabilities are very powerful, which can significantly improve database query efficiency and ability to process large amounts of text data. 1) InnoDB implements full-text search through inverted indexing, supporting basic and advanced search queries. 2) Use MATCH and AGAINST keywords to search, support Boolean mode and phrase search. 3) Optimization methods include using word segmentation technology, periodic rebuilding of indexes and adjusting cache size to improve performance and accuracy.

Can I install mysql on Windows 7 Can I install mysql on Windows 7 Apr 08, 2025 pm 03:21 PM

Yes, MySQL can be installed on Windows 7, and although Microsoft has stopped supporting Windows 7, MySQL is still compatible with it. However, the following points should be noted during the installation process: Download the MySQL installer for Windows. Select the appropriate version of MySQL (community or enterprise). Select the appropriate installation directory and character set during the installation process. Set the root user password and keep it properly. Connect to the database for testing. Note the compatibility and security issues on Windows 7, and it is recommended to upgrade to a supported operating system.

Difference between clustered index and non-clustered index (secondary index) in InnoDB. Difference between clustered index and non-clustered index (secondary index) in InnoDB. Apr 02, 2025 pm 06:25 PM

The difference between clustered index and non-clustered index is: 1. Clustered index stores data rows in the index structure, which is suitable for querying by primary key and range. 2. The non-clustered index stores index key values ​​and pointers to data rows, and is suitable for non-primary key column queries.

MySQL: Simple Concepts for Easy Learning MySQL: Simple Concepts for Easy Learning Apr 10, 2025 am 09:29 AM

MySQL is an open source relational database management system. 1) Create database and tables: Use the CREATEDATABASE and CREATETABLE commands. 2) Basic operations: INSERT, UPDATE, DELETE and SELECT. 3) Advanced operations: JOIN, subquery and transaction processing. 4) Debugging skills: Check syntax, data type and permissions. 5) Optimization suggestions: Use indexes, avoid SELECT* and use transactions.

The relationship between mysql user and database The relationship between mysql user and database Apr 08, 2025 pm 07:15 PM

In MySQL database, the relationship between the user and the database is defined by permissions and tables. The user has a username and password to access the database. Permissions are granted through the GRANT command, while the table is created by the CREATE TABLE command. To establish a relationship between a user and a database, you need to create a database, create a user, and then grant permissions.

Explain different types of MySQL indexes (B-Tree, Hash, Full-text, Spatial). Explain different types of MySQL indexes (B-Tree, Hash, Full-text, Spatial). Apr 02, 2025 pm 07:05 PM

MySQL supports four index types: B-Tree, Hash, Full-text, and Spatial. 1.B-Tree index is suitable for equal value search, range query and sorting. 2. Hash index is suitable for equal value searches, but does not support range query and sorting. 3. Full-text index is used for full-text search and is suitable for processing large amounts of text data. 4. Spatial index is used for geospatial data query and is suitable for GIS applications.

Can mysql and mariadb coexist Can mysql and mariadb coexist Apr 08, 2025 pm 02:27 PM

MySQL and MariaDB can coexist, but need to be configured with caution. The key is to allocate different port numbers and data directories to each database, and adjust parameters such as memory allocation and cache size. Connection pooling, application configuration, and version differences also need to be considered and need to be carefully tested and planned to avoid pitfalls. Running two databases simultaneously can cause performance problems in situations where resources are limited.

See all articles