I'm trying to install MariaDB (Ver 10.8.3-MariaDB for osx10.18 on arm64) via Homebrew (3.6.8) on macOS Ventura (13.0, Apple M1 Max) with the following steps:
brew install mariadb
Summary looks fine:
==> Summary
🍺 /opt/homebrew/Cellar/mariadb/10.8.3_1: 917 files, 174.8MB
But the following warning attracts my attention:
Warning: The post-install step did not complete successfully
You can try again using:
brew postinstall mariadb
Then when I run mysql I get the error:
ERROR 2002 (HY000): Can't connect to local server through socket '/tmp/mysql.sock' (2)
Running mysqld lists the following lines:
2022-11-03 16:01:12 0 [Note] mysqld (server 10.8.3-MariaDB) starting as process 94524 ...
2022-11-03 16:01:12 0 [Warning] Setting lower_case_table_names=2 because file system for /opt/homebrew/var/mysql/ is case insensitive
2022-11-03 16:01:12 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-11-03 16:01:12 0 [Note] InnoDB: Number of transaction pools: 1
2022-11-03 16:01:12 0 [Note] InnoDB: Using generic crc32 instructions
2022-11-03 16:01:12 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
2022-11-03 16:01:12 0 [Note] InnoDB: Completed initialization of buffer pool
2022-11-03 16:01:12 0 [ERROR] InnoDB: Invalid flags 0x4800 in ./ibdata1
2022-11-03 16:01:12 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
2022-11-03 16:01:12 0 [Note] InnoDB: Starting shutdown...
2022-11-03 16:01:12 0 [ERROR] Plugin 'InnoDB' init function returned error.
2022-11-03 16:01:12 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2022-11-03 16:01:12 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-11-03 16:01:12 0 [ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not loaded
2022-11-03 16:01:12 0 [ERROR] mysqld: unknown variable 'mysqlx-bind-address=127.0.0.1'
2022-11-03 16:01:12 0 [ERROR] Aborting
But unfortunately I have no clue how to solve the first listed error and I can't find any information about it:
2022-11-03 16:01:12 0 [ERROR] InnoDB: Invalid flags 0x4800 in ./ibdata1
On advice I've deleted /opt/homebrew/var/mysql and reinstalled MariaDB, unfortunately with the same behavior afterwards. The new mysql direction contains:
this-mac.local.err
aria_log_control
ib_logfile0
aria_log.00000001
ib_buffer_pool
ibdata1
The […].local.err now contains:
221104 00:08:48 mysqld_safe Starting mariadbd daemon with databases from /opt/homebrew/var/mysql
2022-11-04 0:08:48 0 [Note] /opt/homebrew/opt/mariadb/bin/mariadbd (server 10.8.3-MariaDB) starting as process 12788 ...
2022-11-04 0:08:48 0 [Warning] Setting lower_case_table_names=2 because file system for /opt/homebrew/var/mysql/ is case insensitive
2022-11-04 0:08:48 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-11-04 0:08:48 0 [Note] InnoDB: Number of transaction pools: 1
2022-11-04 0:08:48 0 [Note] InnoDB: Using generic crc32 instructions
2022-11-04 0:08:48 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
2022-11-04 0:08:48 0 [Note] InnoDB: Completed initialization of buffer pool
2022-11-04 0:08:48 0 [Note] InnoDB: 128 rollback segments are active.
2022-11-04 0:08:48 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2022-11-04 0:08:48 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2022-11-04 0:08:48 0 [Note] InnoDB: log sequence number 36426; transaction id 4
2022-11-04 0:08:48 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-11-04 0:08:48 0 [Note] InnoDB: Loading buffer pool(s) from /opt/homebrew/var/mysql/ib_buffer_pool
2022-11-04 0:08:48 0 [ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not loaded
2022-11-04 0:08:48 0 [ERROR] /opt/homebrew/opt/mariadb/bin/mariadbd: unknown variable 'mysqlx-bind-address=127.0.0.1'
2022-11-04 0:08:48 0 [ERROR] Aborting
221104 00:08:48 mysqld_safe mysqld from pid file /opt/homebrew/var/mysql/MacBook-Pro-von-Malte.local.pid ended
I'm thankful for any hint and I'd like to give any additional information, if needed.
"Invalid flags 0x4800 in ./ibdata1" is an indication that the datadir was installed with MySQL-8.0.
MariaDB cannot start on a MySQL-8.0 datadir.
Also "mysqlx-bind-address=127.0.0.1" is a MySQL only system variable.
To install MariaDB you'll need to remove the MySQL datadir and configuration files first. (And backup any data there if its important).
After a hard restart on macOS (monitor blacked out) i can't get my mariadb to work.
ERROR! MariaDB server PID file could not be found! Starting MariaDB .210121 09:45:40 mysqld_safe Logging to '/usr/local/var/mysql/computer.local.err'
Logfile: /usr/local/var/mysql/computer.local.err
2021-01-21 9:48:16 0 [Note] InnoDB: Uses event mutexes
2021-01-21 9:48:16 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-01-21 9:48:16 0 [Note] InnoDB: Number of pools: 1
2021-01-21 9:48:16 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2021-01-21 9:48:16 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2021-01-21 9:48:16 0 [Note] InnoDB: Completed initialization of buffer pool
2021-01-21 9:48:16 0 [ERROR] InnoDB: Upgrade after a crash is not supported. The redo log was created with MariaDB 10.4.11.
2021-01-21 9:48:16 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2021-01-21 9:48:16 0 [Note] InnoDB: Starting shutdown...
2021-01-21 9:48:16 0 [ERROR] Plugin 'InnoDB' init function returned error.
2021-01-21 9:48:16 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-01-21 9:48:16 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-01-21 9:48:16 0 [ERROR] Unknown/unsupported storage engine: InnoDB
Mariadb is installed via homebrew
I have restarted and reinstalled mariadb via homebrew
any ideas how to fix this? :)
Solution
If found the solution, That is, to remove these /var/lib/mysql/ib_logfile*. Those logfiles prevented mariadb to start
I am using "MariaDB 10.3.8" and "MariaBackup" for state transfer.wsrep_sst_method=Mariabackup.
I have a donor node and "galera_new_cluster" is running. I want to add another node(joiner) to the cluster. After the mariabackup SST transfer finishes, I receive the error as follows
WSREP: SST position can't be set in past.
What's kind of error is this?
How can I solve this?
here is the log Joiner:
2019-02-13 9:57:54 0 [Note] WSREP: Signalling provider to continue.
2019-02-13 9:57:54 0 [Warning] WSREP: SST position can't be set in past. Requested: 194, Current: 123717.
2019-02-13 9:57:54 0 [Warning] WSREP: Can't continue.
2019-02-13 9:57:54 0 [ERROR] Aborting
Installing MariaDB Galera cluster 10.0.35 on two nodes on RHEL 7.5.
I am able to bring up first node successfully.However getting below error when bringing the second node :
180524 23:45:27 [Warning] WSREP: Gap in state sequence. Need state transfer.
180524 23:45:27 [Note] WSREP: Running: 'wsrep_sst_rsync --role 'joiner' --address '173.36.55.164' --datadir '/mysql/product/' --parent '20955' --binlog '/mysql/product/mysql-bin' '
180524 23:45:28 [Note] WSREP: Prepared SST request: rsync|173.36.55.164:4444/rsync_sst
180524 23:45:28 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
180524 23:45:28 [Note] WSREP: REPL Protocols: 7 (3, 2)
180524 23:45:28 [Note] WSREP: Service thread queue flushed.
180524 23:45:28 [Note] WSREP: Assign initial position for certification: 5, protocol version: 3
180524 23:45:28 [Note] WSREP: Service thread queue flushed.
180524 23:45:28 [Warning] WSREP: Failed to prepare for incremental state transfer: Local state UUID (00000000-0000-0000-0000-000000000000) does not match group state UUID (3b95c41c-5fa2-11e8-8d53-2a74c875a219): 1 (Operation not permitted)
at galera/src/replicator_str.cpp:prepare_for_IST():482. IST will be unavailable.
180524 23:45:28 [Note] WSREP: Member 1.0 (vm-srin-006) requested state transfer from 'any'. Selected 0.0 (vm-pahc-00b)(SYNCED) as donor.
180524 23:45:28 [Note] WSREP: Shifting PRIMARY -> JOINER (TO: 5)
180524 23:45:28 [Note] WSREP: Requesting state transfer: success, donor: 0
180524 23:45:28 [Warning] WSREP: 0.0 (vm-pahc-00b): State transfer to 1.0 (vm-srin-006) failed: -255 (Unknown error 255)
180524 23:45:28 [ERROR] WSREP: gcs/src/gcs_group.cpp:gcs_group_handle_join_msg():731: Will never receive state. Need to abort.
Appreciate any help to resolve this.
Thanks,
Vijay
PS : Resolved the issue.
Issue was related port.After opening the all the ports,second and third nodes were able to join the cluster.
Though I am not sure which all ports needs to open.
Two ports which I identified were : 3360 and 4567
I dont see any documents where it mentions which all ports needs to be opened.
Appreciate if any one has information on the same.
I have faced the same problem.
Execute the following command on the node that is not coming up:
mysqld --wsrep-recover
Then start mysql server asusal (e.g. systemctl start mysql)
This blog may be of help:
https://severalnines.com/blog/how-bootstrap-mysqlmariadb-galera-cluster
I have three nodes to setup the mariadb cluster.
When I use /usr/sbin/mysqld --wsrep-new-cluster --user=root & to start the cluster in the node1, but get the below error:
2017-08-05 17:41:36 140123776886528 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
2017-08-05 17:41:36 140123777161408 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.1.19-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server
2017-08-05 17:41:41 140123698513664 [ERROR] InnoDB: InnoDB: Unable to allocate memory of size 18446744073709544120.
2017-08-05 17:41:41 7f7117464700 InnoDB: Assertion failure in thread 140123698513664 in file ha_innodb.cc line 22407
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
170805 17:41:41 [ERROR] mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
To report this bug, see https://mariadb.com/kb/en/reporting-bugs
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
Server version: 10.1.19-MariaDB
key_buffer_size=0
read_buffer_size=131072
max_used_connections=3
max_threads=10002
thread_count=6
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 21969763 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0x7f6fe0b7e008
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x7f7117463cc0 thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x7f711ca3dcde]
/usr/sbin/mysqld(handle_fatal_signal+0x2d5)[0x7f711c561005]
/lib64/libpthread.so.0(+0xf100)[0x7f711bb7b100]
/lib64/libc.so.6(gsignal+0x37)[0x7f7119ed65f7]
/lib64/libc.so.6(abort+0x148)[0x7f7119ed7ce8]
/usr/sbin/mysqld(+0x73880f)[0x7f711c6e480f]
/usr/sbin/mysqld(+0x78fbb7)[0x7f711c73bbb7]
/usr/sbin/mysqld(+0x78fcfc)[0x7f711c73bcfc]
/usr/sbin/mysqld(+0x82da1c)[0x7f711c7d9a1c]
/usr/sbin/mysqld(+0x82dc9e)[0x7f711c7d9c9e]
/usr/sbin/mysqld(+0x80ab5f)[0x7f711c7b6b5f]
/usr/sbin/mysqld(+0x8002cc)[0x7f711c7ac2cc]
/usr/sbin/mysqld(+0x7360f2)[0x7f711c6e20f2]
/usr/sbin/mysqld(_ZN7handler18index_read_idx_mapEPhjPKhm16ha_rkey_function+0x85)[0x7f711c561965]
/usr/sbin/mysqld(_ZN7handler21ha_index_read_idx_mapEPhjPKhm16ha_rkey_function+0xa6)[0x7f711c565ca6]
/usr/sbin/mysqld(+0x479524)[0x7f711c425524]
/usr/sbin/mysqld(+0x4796a0)[0x7f711c4256a0]
/usr/sbin/mysqld(+0x47edd6)[0x7f711c42add6]
/usr/sbin/mysqld(_ZN4JOIN14optimize_innerEv+0x72f)[0x7f711c432c1f]
/usr/sbin/mysqld(_ZN4JOIN8optimizeEv+0x2f)[0x7f711c43551f]
/usr/sbin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x8f)[0x7f711c43565f]
/usr/sbin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x245)[0x7f711c4361c5]
/usr/sbin/mysqld(+0x4291a1)[0x7f711c3d51a1]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x5f8f)[0x7f711c3e14cf]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x352)[0x7f711c3e4e62]
/usr/sbin/mysqld(+0x439689)[0x7f711c3e5689]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x1fb0)[0x7f711c3e7d10]
/usr/sbin/mysqld(_Z10do_commandP3THD+0x169)[0x7f711c3e8bb9]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x18a)[0x7f711c4af71a]
/usr/sbin/mysqld(handle_one_connection+0x40)[0x7f711c4af8f0]
/usr/sbin/mysqld(+0x96f37d)[0x7f711c91b37d]
/lib64/libpthread.so.0(+0x7dc5)[0x7f711bb73dc5]
/lib64/libc.so.6(clone+0x6d)[0x7f7119f9721d]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f6fd9420020): is an invalid pointer
Connection ID (thread ID): 16
Status: NOT_KILLED
Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
We think the query pointer is invalid, but we will try to print it anyway.
Query: SELECT agents.id AS agents_id, agents.agent_type AS agents_agent_type, agents.`binary` AS agents_binary, agents.topic AS agents_topic, agents.host AS agents_host, agents.availability_zone AS agents_availability_zone, agents.admin_state_up AS agents_admin_state_up, agents.created_at AS agents_created_at, agents.started_at AS agents_started_at, agents.heartbeat_timestamp AS agents_heartbeat_timestamp, agents.description AS agents_description, agents.configurations AS agents_configurations, agents.resource_versions AS agents_resource_versions, agents.`load` AS agents_load
FROM agents
WHERE agents.agent_type = 'Linux bridge agent' AND agents.host = 'ha-node2'