Форум русскоязычного сообщества Ubuntu


Хотите сделать посильный вклад в развитие Ubuntu и русскоязычного сообщества?
Помогите нам с документацией!

Автор Тема: зависает дамп базы Mysql на Ubuntu  (Прочитано 1508 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн oskokos

  • Автор темы
  • Новичок
  • *
  • Сообщений: 4
    • Просмотр профиля
зависает дамп базы Mysql на Ubuntu
« : 24 Марта 2019, 18:02:08 »
нужно загрузить дамп базы. Пробовал и через phpmyadmin и через терминал командой
Код: (xml) [Выделить]
mysql -u root -p testbaza < 1.sqlитог один.. зависает и ничего не двигается. в итоге перегружаю сервер и вижу разные результаты если исходная база данных весит  137 МБ и имеет 6219 строк то после заливки дампа вижу 130-135Мб. и 6000-7000 строк... откуда строк больше и почему зависает помогите разобраться... без зависания до конца ни разу не выполнялось.

Оффлайн AnrDaemon

  • Заслуженный пользователь
  • Старожил
  • *
  • Сообщений: 28511
    • Просмотр профиля
Re: зависает дамп базы Mysql на Ubuntu
« Ответ #1 : 24 Марта 2019, 18:20:51 »
Без лога импорта? Могу на кофейной гуще погадать.
Хотите получить помощь? Потрудитесь представить запрошенную информацию в полном объёме.

Прежде чем [Отправить], нажми [Просмотр] и прочти собственное сообщение. Сам-то понял, что написал?…

Оффлайн ecc83

  • Старожил
  • *
  • Сообщений: 2121
  • Ubuntu Mate 22.04 LTS
    • Просмотр профиля
Re: зависает дамп базы Mysql на Ubuntu
« Ответ #2 : 24 Марта 2019, 18:29:15 »
oskokos, перед заливкой базы из бекапа, сначала очисти полностью имеющуюся базу на сервере.

Оффлайн oskokos

  • Автор темы
  • Новичок
  • *
  • Сообщений: 4
    • Просмотр профиля
Re: зависает дамп базы Mysql на Ubuntu
« Ответ #3 : 24 Марта 2019, 18:42:06 »
Цитировать
Без лога импорта? Могу на кофейной гуще погадать.
лог импорта это лог ошибок который error.log там это после начала:
2019-03-24T15:31:29.002692Z 2 [Note] Access denied for user 'root'@'localhost' (using password: NO)
2019-03-24T15:35:40.615759Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 19340ms. The settings might not be optimal. (flushed=103 and evicted=0, during the time.)
2019-03-24T15:36:10.613354Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 26538ms. The settings might not be optimal. (flushed=52 and evicted=0, during the time.)
2019-03-24T15:36:58.574312Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 20900ms. The settings might not be optimal. (flushed=51 and evicted=0, during the time.)
2019-03-24T15:38:18.620352Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 77811ms. The settings might not be optimal. (flushed=200 and evicted=0, during the time.)
2019-03-24T15:38:27.350987Z 5 [Note] Access denied for user 'root'@'localhost' (using password: YES)
2019-03-24T15:39:44.950493Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 84115ms. The settings might not be optimal. (flushed=200 and evicted=0, during the time.)


Цитировать
oskokos, перед заливкой базы из бекапа, сначала очисти полностью имеющуюся базу на сервере.
все очищено

Оффлайн ecc83

  • Старожил
  • *
  • Сообщений: 2121
  • Ubuntu Mate 22.04 LTS
    • Просмотр профиля
Re: зависает дамп базы Mysql на Ubuntu
« Ответ #4 : 24 Марта 2019, 19:00:59 »
все очищено

А как дела с правами на файлы базы?

Цитировать
Access denied for user 'root'@'localhost' (using password: YES)

Оффлайн oskokos

  • Автор темы
  • Новичок
  • *
  • Сообщений: 4
    • Просмотр профиля
Re: зависает дамп базы Mysql на Ubuntu
« Ответ #5 : 24 Марта 2019, 19:06:38 »
я не знаю что это и как настраивается. Я сделал дамп со своего сайта и хочу перенести сайт на VPS на линуксе. Подскажите какие права где нужно настроить?
Если смотреть дальше пока стоит зависшее в логах вижу это:
Код: (xml) [Выделить]
2019-03-24T15:31:29.002692Z 2 [Note] Access denied for user 'root'@'localhost' (using password: NO)
2019-03-24T15:35:40.615759Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 19340ms. The settings might not be optimal. (flushed=103 and evicted=0, during the time.)
2019-03-24T15:36:10.613354Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 26538ms. The settings might not be optimal. (flushed=52 and evicted=0, during the time.)
2019-03-24T15:36:58.574312Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 20900ms. The settings might not be optimal. (flushed=51 and evicted=0, during the time.)
2019-03-24T15:38:18.620352Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 77811ms. The settings might not be optimal. (flushed=200 and evicted=0, during the time.)
2019-03-24T15:38:27.350987Z 5 [Note] Access denied for user 'root'@'localhost' (using password: YES)
2019-03-24T15:39:44.950493Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 84115ms. The settings might not be optimal. (flushed=200 and evicted=0, during the time.)
2019-03-24T15:41:13.170675Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 82150ms. The settings might not be optimal. (flushed=200 and evicted=0, during the time.)
2019-03-24T15:42:13.703179Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 57993ms. The settings might not be optimal. (flushed=200 and evicted=0, during the time.)
2019-03-24T15:42:44.761628Z 7 [Note] Access denied for user 'root'@'localhost' (using password: YES)
2019-03-24T15:43:34.045621Z 9 [Note] Access denied for user 'root'@'localhost' (using password: YES)
2019-03-24T15:44:52.267461Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 148564ms. The settings might not be optimal. (flushed=173 and evicted=0, during the time.)
2019-03-24T15:45:11.509592Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 8170ms. The settings might not be optimal. (flushed=13 and evicted=0, during the time.)
2019-03-24T15:45:30.104804Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 5515ms. The settings might not be optimal. (flushed=10 and evicted=0, during the time.)
2019-03-24T15:45:34.949427Z 11 [Note] Access denied for user 'root'@'localhost' (using password: YES)
2019-03-24T15:47:04.466965Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 79022ms. The settings might not be optimal. (flushed=200 and evicted=0, during the time.)
2019-03-24T15:47:46.656723Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 39894ms. The settings might not be optimal. (flushed=89 and evicted=0, during the time.)
2019-03-24T15:47:54.021428Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 6365ms. The settings might not be optimal. (flushed=12 and evicted=0, during the time.)
2019-03-24T15:48:04.278221Z 13 [Note] Access denied for user 'root'@'localhost' (using password: YES)
2019-03-24T15:48:06.041725Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 8654ms. The settings might not be optimal. (flushed=17 and evicted=0, during the time.)
2019-03-24T15:48:29.841414Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 22800ms. The settings might not be optimal. (flushed=15 and evicted=0, during the time.)
2019-03-24T15:48:39.731690Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 4680ms. The settings might not be optimal. (flushed=11 and evicted=0, during the time.)
2019-03-24T15:48:53.401645Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 12670ms. The settings might not be optimal. (flushed=23 and evicted=0, during the time.)
2019-03-24T15:49:08.097391Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 10161ms. The settings might not be optimal. (flushed=15 and evicted=0, during the time.)
2019-03-24T15:49:19.821468Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 7410ms. The settings might not be optimal. (flushed=12 and evicted=0, during the time.)
2019-03-24T15:49:29.831471Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 9009ms. The settings might not be optimal. (flushed=14 and evicted=0, during the time.)
2019-03-24T15:50:15.554444Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 41627ms. The settings might not be optimal. (flushed=16 and evicted=0, during the time.)
2019-03-24T15:51:16.059910Z 15 [Note] Access denied for user 'root'@'localhost' (using password: YES)
2019-03-24T15:51:28.808706Z 17 [Note] Access denied for user 'root'@'localhost' (using password: YES)
2019-03-24T15:51:32.144515Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 52750ms. The settings might not be optimal. (flushed=106 and evicted=0, during the time.)
2019-03-24T15:52:40.635457Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 66356ms. The settings might not be optimal. (flushed=17 and evicted=0, during the time.)
2019-03-24T15:53:37.630614Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 34470ms. The settings might not be optimal. (flushed=78 and evicted=0, during the time.)
2019-03-24T15:55:18.482422Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 39682ms. The settings might not be optimal. (flushed=73 and evicted=0, during the time.)
2019-03-24T15:55:38.484497Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 10001ms. The settings might not be optimal. (flushed=1 and evicted=0, during the time.)
2019-03-24T15:56:09.615035Z 19 [Note] Access denied for user 'root'@'localhost' (using password: YES)
2019-03-24T15:57:15.985550Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 72411ms. The settings might not be optimal. (flushed=185 and evicted=0, during the time.)
2019-03-24T15:57:38.808471Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 21823ms. The settings might not be optimal. (flushed=1 and evicted=0, during the time.)
2019-03-24T15:59:53.119453Z 21 [Note] Access denied for user 'root'@'localhost' (using password: YES)
2019-03-24T15:59:53.933237Z 23 [Note] Access denied for user 'root'@'localhost' (using password: YES)
2019-03-24T15:59:56.603839Z 25 [Note] Access denied for user 'root'@'localhost' (using password: YES)
2019-03-24T16:00:02.195302Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 22311ms. The settings might not be optimal. (flushed=53 and evicted=0, during the time.)
2019-03-24T16:01:06.408522Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 28088ms. The settings might not be optimal. (flushed=68 and evicted=0, during the time.)
2019-03-24T16:01:45.096341Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 36688ms. The settings might not be optimal. (flushed=166 and evicted=0, during the time.)
2019-03-24T16:01:49.781064Z 27 [Note] Access denied for user 'root'@'localhost' (using password: YES)
2019-03-24T16:02:19.797446Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 5628ms. The settings might not be optimal. (flushed=1 and evicted=0, during the time.)
2019-03-24T16:04:12.523385Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 93368ms. The settings might not be optimal. (flushed=200 and evicted=0, during the time.)

Оффлайн AnrDaemon

  • Заслуженный пользователь
  • Старожил
  • *
  • Сообщений: 28511
    • Просмотр профиля
Re: зависает дамп базы Mysql на Ubuntu
« Ответ #6 : 24 Марта 2019, 19:15:10 »
Зачем мне системный лог? Показывайте ЛОГ ИМПОРТА.
Если вы вообще не знаете, что такое SQL, наймите человека, который знает.
Хотите получить помощь? Потрудитесь представить запрошенную информацию в полном объёме.

Прежде чем [Отправить], нажми [Просмотр] и прочти собственное сообщение. Сам-то понял, что написал?…

Оффлайн oskokos

  • Автор темы
  • Новичок
  • *
  • Сообщений: 4
    • Просмотр профиля
Re: зависает дамп базы Mysql на Ubuntu
« Ответ #7 : 24 Марта 2019, 19:26:38 »
решил проблему по этой инмтрукции:
Самым лучшим выходом из ситуации будет ипморт напрямую через cli MySQL :
Заходим в MySQL:
mysql -u Login -p DB_name -h Host
(вместо Login и DB_name вводим данные пользователя БД и хост, например localhost)
Выбираем базу данных:
 use db_name
(вместо db_name вводим название БД)
Делаем импорт файла в выбранную бд:
source db_name.sql
(вместо db_name.sql вводим название файла дампа БД или путь до файла, если вы находитесь не в той папке, где лежит файл)
« Последнее редактирование: 24 Марта 2019, 19:45:47 от oskokos »

 

Страница сгенерирована за 0.021 секунд. Запросов: 22.