Загрузка данных
root@linux:~# systemctl stop mysql;
root@linux:~# systemctl status mysql;
○ mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Fri 2026-05-15 21:00:25 MSK; 9s ago
Process: 3660 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Process: 3668 ExecStart=/usr/sbin/mysqld (code=exited, status=0/SUCCESS)
Main PID: 3668 (code=exited, status=0/SUCCESS)
Status: "Server shutdown complete"
CPU: 24.507s
мая 15 20:32:35 linux systemd[1]: Starting MySQL Community Server...
мая 15 20:32:37 linux systemd[1]: Started MySQL Community Server.
мая 15 21:00:24 linux systemd[1]: Stopping MySQL Community Server...
мая 15 21:00:25 linux systemd[1]: mysql.service: Deactivated successfully.
мая 15 21:00:25 linux systemd[1]: Stopped MySQL Community Server.
мая 15 21:00:25 linux systemd[1]: mysql.service: Consumed 24.507s CPU time.
root@linux:~# systemctl status mysql;
○ mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Fri 2026-05-15 21:00:25 MSK; 32s ago
Process: 3660 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Process: 3668 ExecStart=/usr/sbin/mysqld (code=exited, status=0/SUCCESS)
Main PID: 3668 (code=exited, status=0/SUCCESS)
Status: "Server shutdown complete"
CPU: 24.507s
мая 15 20:32:35 linux systemd[1]: Starting MySQL Community Server...
мая 15 20:32:37 linux systemd[1]: Started MySQL Community Server.
мая 15 21:00:24 linux systemd[1]: Stopping MySQL Community Server...
мая 15 21:00:25 linux systemd[1]: mysql.service: Deactivated successfully.
мая 15 21:00:25 linux systemd[1]: Stopped MySQL Community Server.
мая 15 21:00:25 linux systemd[1]: mysql.service: Consumed 24.507s CPU time.
root@linux:~# mkdir ~/physical_backup
root@linux:~# cp -R /var/lib/mysql/Library ~/physical_backup
root@linux:~# ls ~/physical_backup/Library
authors.ibd books.ibd country.ibd loans.ibd readers.ibd
root@linux:~# sudo systemctl start mysql
root@linux:~# systemctl status mysql
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2026-05-15 21:04:08 MSK; 6s ago
Process: 3777 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 3785 (mysqld)
Status: "Server is operational"
Tasks: 38 (limit: 2260)
Memory: 364.4M
CPU: 1.598s
CGroup: /system.slice/mysql.service
└─3785 /usr/sbin/mysqld
мая 15 21:04:07 linux systemd[1]: Starting MySQL Community Server...
мая 15 21:04:08 linux systemd[1]: Started MySQL Community Server.
root@linux:~# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.45-0ubuntu0.22.04.1 (Ubuntu)
Copyright (c) 2000, 2026, Oracle and/or its affiliates.
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> drop database Library;
Query OK, 5 rows affected (0,24 sec)
mysql> exit;
Bye
root@linux:~# systemctl stop mysql
root@linux:~# systemctl status mysql
○ mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Fri 2026-05-15 21:05:04 MSK; 7s ago
Process: 3777 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Process: 3785 ExecStart=/usr/sbin/mysqld (code=exited, status=0/SUCCESS)
Main PID: 3785 (code=exited, status=0/SUCCESS)
Status: "Server shutdown complete"
CPU: 2.550s
мая 15 21:04:07 linux systemd[1]: Starting MySQL Community Server...
мая 15 21:04:08 linux systemd[1]: Started MySQL Community Server.
мая 15 21:05:02 linux systemd[1]: Stopping MySQL Community Server...
мая 15 21:05:04 linux systemd[1]: mysql.service: Deactivated successfully.
мая 15 21:05:04 linux systemd[1]: Stopped MySQL Community Server.
мая 15 21:05:04 linux systemd[1]: mysql.service: Consumed 2.550s CPU time.
root@linux:~# sudo cp -R ~/physical_backup/Library /var/lib/mysql/
root@linux:~# sudo chown -R mysql:mysql /var/lib/mysql/Library
root@linux:~# sudo systemctl start mysql
root@linux:~# systemctl status mysql
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2026-05-15 21:07:06 MSK; 8s ago
Process: 3847 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 3855 (mysqld)
Status: "Server is operational"
Tasks: 38 (limit: 2260)
Memory: 365.2M
CPU: 1.623s
CGroup: /system.slice/mysql.service
└─3855 /usr/sbin/mysqld
мая 15 21:07:05 linux systemd[1]: Starting MySQL Community Server...
мая 15 21:07:06 linux systemd[1]: Started MySQL Community Server.
root@linux:~# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.45-0ubuntu0.22.04.1 (Ubuntu)
Copyright (c) 2000, 2026, Oracle and/or its affiliates.
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 |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0,01 sec)
mysql> use Library;
ERROR 1049 (42000): Unknown database 'Library'
mysql>