Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't create/write to file '/var/lib/mysql/is_writable' #1107

Merged
merged 1 commit into from
Aug 23, 2017

Conversation

oaattia
Copy link
Contributor

@oaattia oaattia commented Aug 22, 2017

I had issue that preventing me from starting mysql container, the error was like the following

Can't create/write to file '/var/lib/mysql/is_writable'

I found that it's a problem related to the user permission, as the mysql user which is not able to access folders mounted from OSX/Windows.

Added user: 1000:50 to fix that .

@Mahmoudz Mahmoudz merged commit a1d3eeb into laradock:master Aug 23, 2017
@a-h-abid
Copy link

a-h-abid commented Aug 25, 2017

This created problem on my Linode Linux server. MySQL fails to run.

mysql_1                | Initializing database
mysql_1                | mysqld: Can't create/write to file '/var/lib/mysql/is_writable' (Errcode: 13 - Permission denied)
mysql_1                | 2017-08-25T01:13:08.807456Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
mysql_1                | 2017-08-25T01:13:08.807540Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
mysql_1                | 2017-08-25T01:13:08.809388Z 0 [ERROR] --initialize specified but the data directory exists and is not writable. Aborting.
mysql_1                | 2017-08-25T01:13:08.809425Z 0 [ERROR] Aborting

@Mahmoudz Your Travic-ci build is also failing. Please Check.... with PHP_VERSION=71

Update: Also failing on my windows machine

mysql_1                | 2017-08-25T01:28:16.925204Z 0 [Note] Basedir set to /usr/
mysql_1                | 2017-08-25T01:28:16.925369Z 0 [Warning] The syntax '--symbolic-links/-s' is deprecated and will be removed in a future release
mysql_1                | 2017-08-25T01:28:16.925411Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
mysql_1                | 2017-08-25T01:28:16.926222Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
mysql_1                | 2017-08-25T01:28:16.926261Z 0 [Note] /usr/sbin/mysqld (mysqld 8.0.2-dmr) starting as process 1 ...
mysql_1                | 2017-08-25T01:28:16.935030Z 0 [Note] InnoDB: Using Linux native AIO
mysql_1                | 2017-08-25T01:28:16.935701Z 0 [Note] Plugin 'FEDERATED' is disabled.
mysql_1                | 2017-08-25T01:28:16.952638Z 1 [Note] InnoDB: PUNCH HOLE support available
mysql_1                | 2017-08-25T01:28:16.953023Z 1 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mysql_1                | 2017-08-25T01:28:16.953041Z 1 [Note] InnoDB: Uses event mutexes
mysql_1                | 2017-08-25T01:28:16.953046Z 1 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
mysql_1                | 2017-08-25T01:28:16.953051Z 1 [Note] InnoDB: Compressed tables use zlib 1.2.3
mysql_1                | 2017-08-25T01:28:16.954955Z 1 [Note] InnoDB: Number of pools: 1
mysql_1                | 2017-08-25T01:28:16.957142Z 1 [Note] InnoDB: Using CPU crc32 instructions
mysql_1                | 2017-08-25T01:28:16.958837Z 1 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
mysql_1                | libnuma: Warning: /sys not mounted or invalid. Assuming one node: No such file or directory
mysql_1                | mbind: Operation not permitted
mysql_1                | mbind: Operation not permitted
mysql_1                | 2017-08-25T01:28:16.970143Z 1 [Note] InnoDB: Completed initialization of buffer pool
mysql_1                | 2017-08-25T01:28:16.971139Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mysql_1                | 2017-08-25T01:28:17.062997Z 1 [Note] InnoDB: Using 'tablespaces.open.1' max LSN: 1222603668
mysql_1                | 2017-08-25T01:28:17.071286Z 1 [Note] InnoDB: Applying a batch of 0 redo log records ...
mysql_1                | 2017-08-25T01:28:17.071315Z 1 [Note] InnoDB: Apply batch completed!
mysql_1                | 2017-08-25T01:28:17.158631Z 1 [Note] InnoDB: Opened 2 existing undo tablespaces.
mysql_1                | 2017-08-25T01:28:17.609140Z 1 [Note] InnoDB: Creating shared tablespace for temporary tables
mysql_1                | 2017-08-25T01:28:17.610421Z 1 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mysql_1                | 2017-08-25T01:28:17.694400Z 1 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mysql_1                | 2017-08-25T01:28:17.704186Z 1 [Note] InnoDB: Created 128 and tracked 128 new rollback segment(s) in the temporary tablespace. 128 are now active.
mysql_1                | 2017-08-25T01:28:17.705262Z 1 [Note] InnoDB: 8.0.2 started; log sequence number 1222619483
mysql_1                | 2017-08-25T01:28:21.477270Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mysql_1                | 2017-08-25T01:28:21.491939Z 1 [Note] Found data dictionary with version 1
mysql_1                | 2017-08-25T01:28:21.533506Z 0 [Note] InnoDB: Buffer pool(s) load completed at 170825  7:28:21
mysql_1                | 2017-08-25T01:28:21.549173Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
mysql_1                | 2017-08-25T01:28:21.567152Z 0 [Warning] CA certificate ca.pem is self signed.
mysql_1                | 2017-08-25T01:28:21.571707Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
mysql_1                | 2017-08-25T01:28:21.571819Z 0 [Note] IPv6 is available.
mysql_1                | 2017-08-25T01:28:21.571918Z 0 [Note]   - '::' resolves to '::';
mysql_1                | 2017-08-25T01:28:21.571995Z 0 [Note] Server socket created on IP: '::'.
mysql_1                | 2017-08-25T01:28:21.588177Z 0 [ERROR] Table 'mysql.component' doesn't exist
mysql_1                | 2017-08-25T01:28:21.588636Z 0 [ERROR] The mysql.component table is missing or has an incorrect definition.
mysql_1                | 2017-08-25T01:28:21.659359Z 0 [Warning] Storage engine 'MyISAM' does not support system tables. [mysql.user]
mysql_1                | 2017-08-25T01:28:21.659476Z 0 [Warning] Storage engine 'MyISAM' does not support system tables. [mysql.db]
mysql_1                | 2017-08-25T01:28:21.659510Z 0 [Warning] Storage engine 'MyISAM' does not support system tables. [mysql.proxies_priv]
mysql_1                | 2017-08-25T01:28:21.659527Z 0 [Warning] Storage engine 'MyISAM' does not support system tables. [mysql.tables_priv]
mysql_1                | 2017-08-25T01:28:21.659541Z 0 [Warning] Storage engine 'MyISAM' does not support system tables. [mysql.columns_priv]
mysql_1                | 2017-08-25T01:28:21.659592Z 0 [Warning] Storage engine 'MyISAM' does not support system tables. [mysql.procs_priv]
mysql_1                | 2017-08-25T01:28:21.659706Z 0 [ERROR] /usr/sbin/mysqld: Column count of mysql.user is wrong. Expected 47, found 45. The table is probably corrupted
mysql_1                | 2017-08-25T01:28:21.665375Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
mysql_1                | 2017-08-25T01:28:21.665465Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1                | 2017-08-25T01:28:21.665911Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1                | 2017-08-25T01:28:21.666346Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
mysql_1                | 2017-08-25T01:28:21.666417Z 0 [ERROR] Missing system table mysql.global_grants; please run mysql_upgrade to create it
mysql_1                | 2017-08-25T01:28:21.666723Z 0 [Warning] Could not load mysql.role_edges and mysql.default_roles tables. ACL DDLs will not work unless mysql_upgrade is executed.
mysql_1                | 2017-08-25T01:28:21.713054Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql_1                | 2017-08-25T01:28:21.728852Z 0 [Warning] System table 'func' is expected to be transactional.
mysql_1                | 2017-08-25T01:28:21.732497Z 0 [Note] /usr/sbin/mysqld: ready for connections. Version: '8.0.2-dmr'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)

Removing this user:"1000:50" is working... Thou want to confirm, do I need to rebuild mysql container?? I'm using existing container before this PR.

@oaattia
Copy link
Contributor Author

oaattia commented Aug 25, 2017

Have you tried to rebuild mysql container after adding user:1000:50 ?

@a-h-abid
Copy link

@oaattia Yes, I tried with rebuilding the container, still failing...

@muzk6
Copy link

muzk6 commented Sep 2, 2017

After I removed the line user: "1000:50" , and rebuild mysql container, it work successfully.

agebeyaw pushed a commit to agebeyaw/laradock that referenced this pull request Aug 22, 2018
Can't create/write to file '/var/lib/mysql/is_writable'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants