⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.124
Server IP:
50.28.103.30
Server:
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software:
nginx/1.28.0
PHP Version:
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
server
/
mysql
/
mysql-test
/
include
/
View File Name :
backup_tables_priv_and_users.inc
# ==== Purpose ==== # # To backup/restore contents of the tables: mysql.tables_priv and mysql.user # # ==== Usage ==== # # # Backup mysql.user & mysql.tables_priv tables # --let $backup=1 # --source include/backup_tables_priv_users.inc # # # Restore mysql.user & mysql.tables_priv from backup # --let $restore=1 # --source include/backup_tables_priv_users.inc if ($backup) { # Save a copy of the user/tables_priv tables, to restore later CREATE TEMPORARY TABLE tmp_backup_tables_priv AS SELECT * FROM mysql.tables_priv; CREATE TEMPORARY TABLE tmp_backup_user AS SELECT * FROM mysql.user; # Reset the backup flag --let $backup= 0; } if ($restore) { # Restore the saved contents of mysql.tables_priv and mysql.user TRUNCATE TABLE mysql.tables_priv; INSERT INTO mysql.tables_priv (SELECT * FROM tmp_backup_tables_priv); DROP TEMPORARY TABLE tmp_backup_tables_priv; TRUNCATE TABLE mysql.user; INSERT INTO mysql.user (SELECT * FROM tmp_backup_user); DROP TEMPORARY TABLE tmp_backup_user; # Reset the restore flag --let $restore= 0; }