H1ve icon indicating copy to clipboard operation
H1ve copied to clipboard

Mariadb Datafile Error?

Open Tiaonmmn opened this issue 4 years ago • 1 comments

When I just use docker-compose -f single.yml up,the db1 container reports the following error:

db_1     | 2019-12-02 13:36:25 0 [Note] mysqld (mysqld 10.4.10-MariaDB-1:10.4.10+maria~bionic) starting as process 1 ...
cache_1  | 1:M 02 Dec 13:36:28.944 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
db_1     | 2019-12-02 13:36:25 0 [Note] InnoDB: Using Linux native AIO
db_1     | 2019-12-02 13:36:25 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db_1     | 2019-12-02 13:36:25 0 [Note] InnoDB: Uses event mutexes
db_1     | 2019-12-02 13:36:25 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
db_1     | 2019-12-02 13:36:25 0 [Note] InnoDB: Number of pools: 1
db_1     | 2019-12-02 13:36:25 0 [Note] InnoDB: Using SSE2 crc32 instructions
db_1     | 2019-12-02 13:36:25 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
main_1   | db is ready
db_1     | 2019-12-02 13:36:25 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
db_1     | 2019-12-02 13:36:25 0 [Note] InnoDB: Completed initialization of buffer pool
cache_1  | 1:M 02 Dec 13:36:28.944 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
db_1     | 2019-12-02 13:36:25 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
db_1     | 2019-12-02 13:36:35 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
db_1     | 2019-12-02 13:36:35 0 [Note] InnoDB: Creating shared tablespace for temporary tables
db_1     | 2019-12-02 13:36:35 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
db_1     | 2019-12-02 13:36:35 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
db_1     | 2019-12-02 13:36:35 0 [Note] InnoDB: 10.4.10 started; log sequence number 113901; transaction id 9
cache_1  | 1:M 02 Dec 13:36:28.945 * DB loaded from disk: 0.000 seconds
db_1     | 2019-12-02 13:36:35 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
db_1     | 2019-12-02 13:36:35 0 [Note] InnoDB: Buffer pool(s) load completed at 191202 13:36:35
db_1     | 2019-12-02 13:36:35 0 [Note] Server socket created on IP: '::'.
db_1     | 2019-12-02 13:36:35 0 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
db_1     | 2019-12-02 13:36:35 0 [Warning] Can't open and lock time zone table: Table 'mysql.time_zone_leap_second' doesn't exist trying to live without them
cache_1  | 1:M 02 Dec 13:36:28.945 * Ready to accept connections
db_1     | 2019-12-02 13:36:35 0 [ERROR] Cannot open mysql.event
db_1     | 2019-12-02 13:36:35 0 [ERROR] mysqld: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
db_1     | 2019-12-02 13:36:35 6 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exist
db_1     | 2019-12-02 13:36:35 0 [Note] mysqld: ready for connections.
db_1     | Version: '10.4.10-MariaDB-1:10.4.10+maria~bionic'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution

So,the pymysql reports erros also:pymysql.err.InternalError: Packet sequence number wrong - got 1 expected 0 Maybe the mysql data file is coruptted?

Tiaonmmn avatar Dec 02 '19 13:12 Tiaonmmn

Have a try to restart the docker service, and try again? I have not meat this problem before.

0akarma avatar Dec 03 '19 06:12 0akarma