Здесь показаны различия между двумя версиями данной страницы.
| Предыдущая версия справа и слева Предыдущая версия | |||
| freebsd:seafile [2020/02/01 18:14] alex | freebsd:seafile [2020/11/23 21:01] (текущий) alex [Перенос SeaFile на новый сервер] | ||
|---|---|---|---|
| Строка 569: | Строка 569: | ||
| На старых серверах делаю дампы баз данных SeaFile | На старых серверах делаю дампы баз данных SeaFile | ||
| + | |||
| + | # mysqldump -u seafile -p ccnet-db > ccnet-db.sql | ||
| + | Enter password: | ||
| + | mysqldump: Got error: 1045: Access denied for user 'seafile'@'localhost' (using password: YES) when trying to connect | ||
| + | root@jail_1:/ # | ||
| + | root@jail_1:/ # mysql -uroot -p | ||
| + | Enter password: | ||
| + | Welcome to the MySQL monitor.  Commands end with ; or \g. | ||
| + | Your MySQL connection id is 8 | ||
| + | Server version: 5.7.29-log Source distribution | ||
| + | |||
| + | Copyright (c) 2000, 2020, 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. | ||
| + | |||
| + | root@localhost [(none)]> select user,host from mysql.user; | ||
| + | +---------------+-------------+ | ||
| + | | user | host | | ||
| + | +---------------+-------------+ | ||
| + | | root | 192.168.0.3 | | ||
| + | | seafile  | 192.168.0.3 | | ||
| + | | mysql.session | localhost  | | ||
| + | | mysql.sys  | localhost  | | ||
| + | | root | localhost  | | ||
| + | +---------------+-------------+ | ||
| + | 5 rows in set (0.19 sec) | ||
| + | |||
| + | root@localhost [(none)]> create user 'seafile'@'localhost' identified by 'Kl0T1k#$ea'; | ||
| + | Query OK, 0 rows affected (0.28 sec) | ||
| + | |||
| + | root@localhost [(none)]> GRANT ALL PRIVILEGES ON *.* TO 'seafile'@'localhost'; | ||
| + | Query OK, 0 rows affected (0.03 sec) | ||
| + | |||
| + | root@localhost [(none)]> FLUSH PRIVILEGES; | ||
| + | Query OK, 0 rows affected (0.09 sec) | ||
| + | |||
| + | root@localhost [(none)]> select user,host from mysql.user; | ||
| + | +---------------+-------------+ | ||
| + | | user | host | | ||
| + | +---------------+-------------+ | ||
| + | | root | 192.168.0.3 | | ||
| + | | seafile  | 192.168.0.3 | | ||
| + | | mysql.session | localhost  | | ||
| + | | mysql.sys  | localhost  | | ||
| + | | root | localhost  | | ||
| + | | seafile  | localhost  | | ||
| + | +---------------+-------------+ | ||
| + | 6 rows in set (0.00 sec) | ||
| + | |||
| + | root@localhost [(none)]> quit | ||
| + | |||
| mysqldump -u seafile -p ccnet-db > ccnet-db.sql | mysqldump -u seafile -p ccnet-db > ccnet-db.sql | ||
| mysqldump -u seafile -p seafile-db > seafile-db.sql | mysqldump -u seafile -p seafile-db > seafile-db.sql | ||