First, I'm not a backend person.
I had a running instance of mysql on my ubuntu server. I was able to log in, run some basic queries, everything was fine.
I stopped the service and started futzing around trying to get mysql to boot up in --skip-grant-table mode so I could import an older dump file that would then need to be upgraded. I tried various commands such as mysqld --skip-grant-tables
and other all quite likely betraying that I'm not quite sure what I'm doing and the documentation is nearly impossible to locate. I've been trying to follow the instructions here.
Read: Highly irritated at this point.
Now I can't even start the service anymore and I get this series of warnings followed by this series of errors:
017-08-04T07:23:17.065571Z 0 [Warning] Can't create test file /var/lib/mysql/hq-lampsvr.lower-test
2017-08-04T07:23:17.065614Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.19) starting as process 12175 ...
2017-08-04T07:23:17.068092Z 0 [Warning] Can't create test file /var/lib/mysql/hq-lampsvr.lower-test
2017-08-04T07:23:17.068122Z 0 [Warning] Can't create test file /var/lib/mysql/hq-lampsvr.lower-test
…
2017-08-04T07:23:17.092298Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2017-08-04T07:23:17.092320Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2017-08-04T07:23:17.092325Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
…
What am I doing wrong, how can I get mysql to boot up again and does anyone know how to get this "safe mode" mysql type thing to boot up because nothing in the mysql docs is working. Working from clean installs of everything.
Ubuntu: 16.04
Mysql: 5.7.19
У меня такая же проблема, решите ее после
отредактируйте этот файл
/etc/apparmor.d/local/usr.sbin.mysqld
и посмотрите эту ссылку
возможно помочь вам
Когда я получил ту же ошибку, я открыл командную строку DOS, перешел в каталог MySQL bin \ и ввел следующую команду, чтобы узнать, что вызывает проблему:
.. \ bin > mysqld --defaults-file = "C: \ ProgramData \ MySQL \ MySQL Server 8.0 \ my.ini" --standalone --console
он показал мне ошибки, например
[ОШИБКА] [MY-012611] [InnoDB] Ошибка операционной системы номер 32 в файловая операция.
[ОШИБКА] [MY-012615] [InnoDB] Ошибка означает, что другая программа используя файлы InnoDB. Это может быть резервная копия или антивирусное программное обеспечение или Другая.
Итак, антивирус блокировал файлы (в вашем случае ошибка может быть другой). Когда я снова выполнил указанную выше команду, на этот раз mysql запустился как автономный.
Есть еще несколько моментов, на которые следует обратить внимание -