InnoDB: operating system error number 13 in file operation, not fixed after changing permissions in / var / lib / mysql / or disabling selinux

When I start mysql, I get an error ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). mysqldgives an error

    150101 12:08:19 [Warning] Can't create test file /var/lib/mysql/lamp-update.lower-test
    150101 12:08:19 [Warning] Can't create test file /var/lib/mysql/lamp-update.lower-test
    150101 12:08:19 [Warning] One can only use the --user switch if running as root

    150101 12:08:19 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
    150101 12:08:19 [Note] Plugin 'FEDERATED' is disabled.
    mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
    150101 12:08:19 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
    150101 12:08:19 InnoDB: The InnoDB memory heap is disabled
    150101 12:08:19 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    150101 12:08:19 InnoDB: Compressed tables use zlib 1.2.8
    150101 12:08:19 InnoDB: Using Linux native AIO
    150101 12:08:19 InnoDB: Initializing buffer pool, size = 128.0M
    150101 12:08:19 InnoDB: Completed initialization of buffer pool
    150101 12:08:19  InnoDB: Operating system error number 13 in a file operation.
    InnoDB: The error means mysqld does not have the access rights to
    InnoDB: the directory.
    InnoDB: File name ./ibdata1
    InnoDB: File operation call: 'open'.
    InnoDB: Cannot continue operation.

sudo mysqld displays the result 150101 12:11:59 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.

I am running an ubuntu virtual Linux server. Mysql worked without problems until yesterday, when I received this error.

I tried to set the file permissions in / var / lib / mysql to 660, / var / lib / mysql to 755, and its subdirectories to 700. Then I ran sudo chown -R mysql:mysql /var/lib/mysql. Then I tried to restart my server and start mysqld. I got the same error.

Then I tried to disable selinux by running sudo vim /etc/selinux/semanage.confand adding SELINUX=disabledto the file as the first line. I rebooted again and got the same error.

, stackexchange .

- , ?

,

Daniel

:

"" , mysqld root, , .

+4
1

, mysql root (sudo chown -R mysql: root folder). , .

+5

Source: https://habr.com/ru/post/1569628/


All Articles