/r/mariadb

Photograph via snooOG

MariaDB Server is an open source relational database

/r/mariadb

2,296 Subscribers

0

MariaDB rejects my configuration for Innodb size

It's recommended from what I read to use 70% system memory which is around 1.4G. When I type in 1.4G it rejects the config and won't start. Does the config not accept using decimals?

innodb_buffer_pool_size = 1.4G

3 Comments
2024/04/25
20:23 UTC

1

Alter timestamp to datetime

As far as I know the timestamp column is internally stored in UTC. When selecting records, the utc value is automatically changed in the server's timezone, which in my case is Europe/Amsterdam.
What if I do change the datatype of the column to DateTime, does it automatically update the value from UTC to Europe/Amsterdam also? Or, does it mean the UTC datetime is stored and I need to manually update it? Thanks in advance.

2 Comments
2024/04/23
13:57 UTC

1

How to temporarily force MariaDB to accept only maintenance user?

I need to do some dump/restore activity for which of course the server must be up. However, during this time I don't want it to accept any connections except on the local Unix socket that is used by the maintenance user to ensure DB consistency. Is there a way to do that?

I know the REAL solution is to cleanly shut down all services that might want to use the database. But it's a somewhat messy intranet implementation with several people / applications involved, none of which have a proper "down for maintenance" page. So I'll just screw it and eat an hour of http server errors.

2 Comments
2024/04/23
07:01 UTC

0

I was looking at MariaDB, and, I have about 500 xls files..with different stock prices from years back, I was thinking of migrating them to a MySQL database..but, I am totally/woefully have no idea how to do this, what do people recommend to do to start using MySQL with no clue how to do this?

apparently a person has to use localhost or something? also..I am using python, so..does a person use an html file and then query the mysql database in python to return to the html?

9 Comments
2024/04/19
16:31 UTC

3

Migrating from ibdata1 to individual files / subdirs

I'm aware that this topic has been very well documented over the past 10 years, and there are many good step-by-step descriptions on how to do the migration. (By forces outside my control I recently migrated from RHEL7 to RHEL8 which is why I'm many years behind the curve.) All of them use a common procedure, which is basically:

  1. Backup DB data dir
  2. Mysqldump all DBs
  3. Drop all DBs (except mysql)
  4. Stop server
  5. Delete ibdata1 and logfiles
  6. Start server
  7. Restore DBs by importing dumped SQL from step 2.

I understand all of this. However, In this StackExchange post, I found this:

By using the command

ALTER TABLE <tablename> ENGINE=innodb

or

OPTIMIZE TABLE <tablename>

one can extract data and index pages from ibdata1 to separate files. However, ibdata1 will not shrink unless you do the steps above.

Question: Why isn't it possible to just convert every table to individual files by using the ALTER TABLE command, stop the server, delete ibdata1, start the server, and be done? Without the dumping and restoring rigmarole (which is what the poster means by "the steps above")?

The way I understand it, after the ALTER TABLE all table data is copied to individual files (as desired), and future changes will also be stored there, so all of ibdata1 should just be redundant / obsolete and can be deleted.

Am I wrong?

3 Comments
2024/04/19
07:16 UTC

5

Mariadb odbc ssl option

Hello, I am using mariadb odbc 3.1.20 . I cannot connect to DB with this user without ssl. I could not find ssl option under odbc driver. Is there a way? Thanks!

4 Comments
2024/04/18
14:32 UTC

2

Does MariaDB create index automatically if I add a foreign key as. a reference?

Do I have to add index manually?
Or MariaDB adds an Index for me?

Create table posts ...

CONSTRAINT FOREIGN KEY (user_id)
REFERENCES users (id)
ON UPDATE CASCADE

Post table has user_id. Will it be index automatically? Do I have to add an index manually now?
How do I check if there is an index already?

3 Comments
2024/04/16
09:57 UTC

0

If your database is a MariaDB database, when you put it up on the server, is it just a .mariadb file, or how exactly does that work? I have been reading up on how a person queries one with Javascript/Python, and, I think wikipedia actually use MariaDB..so, it seemed good as a database?

putting mariadb on a server?

2 Comments
2024/04/15
01:27 UTC

1

Table design - Json or relational

I was thinking to design tables for quiz.

Quiz Table

‘’’id primary key title/name varchar other infos (createdon, user id, status…)’’’

Questions table

id question fk_quiz_id

Choices id choice fk_question_id

This is by basic idea. Alternatively i can create something like this.

Quiz

id title questions json (array of questions with choices)

I feel the json variation is better than relational..

What is the advantage and disadvantage with JSON?

This is the first time i am thinking to use JSON.

0 Comments
2024/04/13
16:37 UTC

2

CSV import as SQL Statement for automation

Hello MariaDB Community,

We are currently using DBeaver to import a CSV?

We need that CSV import, but we want to automate it; hence we need to actually write the SQL for it.

How can we replicate that import we do with DBeaver in a SQL Statement?

https://preview.redd.it/16hsjgravttc1.png?width=619&format=png&auto=webp&s=58fb73b441d3877f0034f0eacc2d068438c9601e

1 Comment
2024/04/11
10:31 UTC

21

We are part of the team behind the MariaDB database. AMA.

Hello from the MariaDB team! We are specifically part of the teams that develop the roadmap for MariaDB database products, and provide support and services for our customers. Join our head of product Joe Cotellese and head of technical operations (i.e. our support and services organizations) Ben Stillman in this upcoming AMA. Our focus will be on answering questions we know best – features and functionality around MariaDB Server and other MariaDB products (MaxScale, ColumnStore, etc), best practices for deploying and operating MariaDB, and questions about us or our product and technical operations teams.

We’ll start answering questions at 11:00 AM PDT on Wednesday, April 17, 2024. If you’d like to join us on our live webinar, you can do so at the link below but we will also type in any answers to questions we get here.

Live AMA webinar, sign up here.

Or type in questions below and we will answer them on April 17!

9 Comments
2024/04/09
23:40 UTC

1

Unknown system variable 'transaction_isolation'

Hello, I am more or less following redmine documention for installing and running mariaDB and redmine but seem to have gotten stuck at one of the steps.

I need to input command "RAILS_ENV=production bundle exec rake db:migrate" but when I do I get error "Unknown system variable 'transaction_isolation'". When I search for this error I get a solution to execute

select @@transaction_isolation;

select @@version;

in the mariaDB server command line. When I do this though I just get next line ">" and nothing happens. Any thoughts on how to proceed from here?

Ver: MariaDB 10.6.16

0 Comments
2024/04/09
20:48 UTC

5

Ask Anything About MariaDB: Live AMA with MariaDB Product Leaders

In case you're interested in attending the live Q&A on Apr 17th at 12 PM CST, sign up here.

https://go.mariadb.com/GLBL-WBN-AMA-webinar1-2024-04-17_Registration-LP.html

6 Comments
2024/04/07
05:15 UTC

1

Community Server and Max Indexes

This may or may not be the best place to ask - longtime lurker, first time poster, RHCSA certified. Be gentle!

I am trying to restore an application database dump provided by a cloud vendor and it's very clear it came from MariaDB.

When importing the database I'm reaching an error that says the database/schema exceeds 64 indexes in a table. From what I see the community default is 64 - it looks like there is a way to manually compile it from source for more (./configure --with-max-indexes=256) but so far I still get the 64 index limit when importing. Has that option been removed since Enterprise has support for 128? Or any way to verify if the index count change applied?

To be clear I did uninstall mariadb-server and reinstall from the generated package, dnf info shows it's from local repository.

3 Comments
2024/04/05
16:18 UTC

3

Topology question re Galera cluster

Hi

I have a galera cluster that I'm building up as below. I bootstrap the cluster from node1. My issue is that when node1 and 2 go down I can't get them back up again. I'd assume node3 and 4 could orchestrate the rebuild but it is totally dead. That and building node2 makes the whole of site A useless. Should I get a third node on Site A and Site B? This was a recommended configuration so I'm not sure if I'm doing something else wrong.

https://preview.redd.it/vehgppu26gsc1.png?width=674&format=png&auto=webp&s=50fd3cfc180f8c93f27d59645e868f82704127be

8 Comments
2024/04/04
14:09 UTC

2

Need Help Troubleshooting Inconsistency Voting?

Hello can someone explain to me what happened during this part of the error? My cluster suddenly changed to donor/desync after this happened and is there a way to make it reconnect automatically?

2024-04-02 1:34:58 9 [ERROR] Slave SQL: Could not execute Write_rows_v1 event on table testapp.cache_default; Duplicate entry 'system.theme.files' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 1416, Internal MariaDB error code: 1062

2024-04-02 1:34:58 9 [Warning] WSREP: Event 3 Write_rows_v1 apply failed: 121, seqno 223406986

2024-04-02 1:34:58 0 [Note] WSREP: Member 1(Tres) responds to vote on 101e4f63-7254-11eb-8fe2-f75c7115ac06:223406985,0000000000000000: Success

2024-04-02 1:34:58 0 [Note] WSREP: Votes over 101e4f63-7254-11eb-8fe2-f75c7115ac06:223406985:

0000000000000000: 1/5

ca73b5b9079bd5a7: 1/5

Waiting for more votes.

2024-04-02 1:34:58 0 [Note] WSREP: Member 4(Quatro) initiates vote on 101e4f63-7254-11eb-8fe2-f75c7115ac06:223406985,ca73b5b9079bd5a7: Duplicate entry 'state-system.theme.files' for key 'PRIMARY', Error_code: 1062;

2024-04-02 1:34:58 0 [Note] WSREP: Votes over 101e4f63-7254-11eb-8fe2-f75c7115ac06:223406985:

0000000000000000: 1/5

ca73b5b9079bd5a7: 2/5

Waiting for more votes.

2024-04-02 1:34:58 0 [Note] WSREP: Member 0(Uno) responds to vote on 101e4f63-7254-11eb-8fe2-f75c7115ac06:223406985,0000000000000000: Success

2024-04-02 1:34:58 0 [Note] WSREP: Votes over 101e4f63-7254-11eb-8fe2-f75c7115ac06:223406985:

0000000000000000: 2/5

ca73b5b9079bd5a7: 2/5

Waiting for more votes.

2024-04-02 1:34:58 0 [Note] WSREP: Member 3(Dos) responds to vote on 101e4f63-7254-11eb-8fe2-f75c7115ac06:223406985,0000000000000000: Success

2024-04-02 1:34:58 0 [Note] WSREP: Votes over 101e4f63-7254-11eb-8fe2-f75c7115ac06:223406985:

0000000000000000: 3/5

ca73b5b9079bd5a7: 2/5

Winner: 0000000000000000

2024-04-02 1:34:58 8 [ERROR] WSREP: Inconsistency detected: Inconsistent by consensus on 101e4f63-7254-11eb-8fe2-f75c7115ac06:223406985

at /builddir/build/BUILD/galera-26.4.14/galera/src/replicator_smm.cpp:process_apply_error():1357

2024-04-02 1:34:58 8 [Note] WSREP: Closing send monitor...

2024-04-02 1:34:58 8 [Note] WSREP: Closed send monitor.

2024-04-02 1:34:58 8 [Note] WSREP: gcomm: terminating thread

2024-04-02 1:34:58 8 [Note] WSREP: gcomm: joining thread

2024-04-02 1:34:58 8 [Note] WSREP: gcomm: closing backend

2024-04-02 1:34:59 8 [Note] WSREP: view(view_id(NON_PRIM,1ba2bb9f-b638,688) memb {

d90744e0-a4a1,0

} joined {

} left {

} partitioned {

1ba2bb9f-b638,0

9c7b0bb3-8660,0

dc9c41ca-bbd7,0

ec456072-89c4,0

})

2024-04-02 1:34:59 8 [Note] WSREP: PC protocol downgrade 1 -> 0

2024-04-02 1:34:59 8 [Note] WSREP: view((empty))

2024-04-02 1:34:59 8 [Note] WSREP: gcomm: closed

2024-04-02 1:34:59 0 [Note] WSREP: New COMPONENT: primary = no, bootstrap = no, my_idx = 0, memb_num = 1

2024-04-02 1:34:59 0 [Note] WSREP: Flow-control interval: [16, 16]

2024-04-02 1:34:59 0 [Note] WSREP: Received NON-PRIMARY.

2024-04-02 1:34:59 0 [Note] WSREP: Shifting SYNCED -> OPEN (TO: 223406986)

2024-04-02 1:34:59 0 [Note] WSREP: New SELF-LEAVE.

2024-04-02 1:34:59 0 [Note] WSREP: Flow-control interval: [0, 0]

2024-04-02 1:34:59 0 [Note] WSREP: Received SELF-LEAVE. Closing connection.

2024-04-02 1:34:59 0 [Note] WSREP: Shifting OPEN -> CLOSED (TO: 223406986)

2024-04-02 1:34:59 0 [Note] WSREP: RECV thread exiting 0: Success

2024-04-02 1:34:59 6 [Note] WSREP: ================================================

View:

id: 101e4f63-7254-11eb-8fe2-f75c7115ac06:223406986

status: non-primary

protocol_version: 4

capabilities: MULTI-MASTER, CERTIFICATION, PARALLEL_APPLYING, REPLAY, ISOLATION, PAUSE, CAUSAL_READ, INCREMENTAL_WS, UNORDERED, PREORDERED, STREAMING, NBO

final: no

own_index: 0

members(1):

0: d90744e0-eff5-11ee-a4a1-577e30a6299d, Cinq

=================================================

2024-04-02 1:34:59 6 [Note] WSREP: Non-primary view

2024-04-02 1:34:59 6 [Note] WSREP: Server status change synced -> connected

2024-04-02 1:34:59 6 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.

2024-04-02 1:34:59 6 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.

2024-04-02 1:34:59 8 [Note] WSREP: recv_thread() joined.

2024-04-02 1:34:59 8 [Note] WSREP: Closing replication queue.

2024-04-02 1:34:59 8 [Note] WSREP: Closing slave action queue.

2024-04-02 1:34:59 8 [ERROR] WSREP: Failed to apply write set: gtid: 101e4f63-7254-11eb-8fe2-f75c7115ac06:223406985 server_id: 9c7b0bb3-ec18-11ee-8660-c3869b3c485a client_id: 1091000 trx_id: 53723308 flags: 3 (start_transaction | commit)

2024-04-02 1:34:59 6 [Note] WSREP: ================================================

View:

id: 101e4f63-7254-11eb-8fe2-f75c7115ac06:223406986

status: non-primary

protocol_version: 4

capabilities: MULTI-MASTER, CERTIFICATION, PARALLEL_APPLYING, REPLAY, ISOLATION, PAUSE, CAUSAL_READ, INCREMENTAL_WS, UNORDERED, PREORDERED, STREAMING, NBO

final: yes

own_index: -1

members(0):

=================================================

2024-04-02 1:34:59 6 [Note] WSREP: Non-primary view

2024-04-02 1:34:59 6 [Note] WSREP: Server status change connected -> disconnected

2024-04-02 1:34:59 6 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.

2024-04-02 1:34:59 6 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.

2024-04-02 1:34:59 2 [Note] WSREP: Applier thread exiting ret: 6 thd: 2

2024-04-02 1:34:59 2 [Warning] Aborted connection 2 to db: 'unconnected' user: 'unauthenticated' host: '' (This connection closed normally without authentication)

2024-04-02 1:34:59 8 [Note] WSREP: Applier thread exiting ret: 6 thd: 8

2024-04-02 1:34:59 8 [Warning] Aborted connection 8 to db: 'unconnected' user: 'unauthenticated' host: '' (This connection closed normally without authentication)

2024-04-02 1:34:59 9 [Note] WSREP: Applier thread exiting ret: 6 thd: 9

2024-04-02 1:34:59 9 [Warning] Aborted connection 9 to db: 'unconnected' user: 'unauthenticated' host: '' (This connection closed normally without authentication)

2024-04-02 1:34:59 0 [Note] WSREP: Service thread queue flushed.

2024-04-02 1:34:59 6 [Note] WSREP: ####### Assign initial position for certification: 00000000-0000-0000-0000-000000000000:-1, protocol version: 5

All I get from this is that they encountered some duplicate data then they voted and 2 of the nodes desynced from the cluster? It keeps happening recently also how do I prevent this from reoccurring?

Thank you.

4 Comments
2024/04/02
10:17 UTC

1

Is algorithm=temptable the best way to create a read-only / non-updatable view?

I want to create a view on db2 that reads some data from db1, but I don't want users with full privileges on db2 to be able to update any data back to db1.

So far the only way I found to achieve this was to create the view with algorithm=temptable.

Documentation though says merge is more efficient, so I'm wondering if there's a better way of achieving my goal using merge algorithm instead.

0 Comments
2024/03/30
17:48 UTC

1

I need help

I’m trying to setup a inventory tracker https://coreconduit.com/2019/02/07/using-a-raspberry-pi-for-your-own-inventory-management-system/ but MariaDB is not coopering can someone tell me what I’m doing wrong?

u/raspberryp1:~

§ sudo mysql -uroot

Welcome to the MariaDE monitor. Commands end with ; or \g-

Your MariaDB connection id is 31

Server version: 10.11.6-MariaDB-0+deb121 Debian 12

Copyright (C) 2000, 2018, Oracle, MariaDB Corporation Ab and others. I Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> mysql> create database inventory;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaD server version for the right syntax to use near 'm ysql> create database inventory' at line 1

MariaDB [(none)]>

5 Comments
2024/03/26
10:51 UTC

1

Does MariaDb support time-series tables? Something like Timescale.

I was asking to myself today and found nothing interesting.

1 Comment
2024/03/22
09:59 UTC

0

ANY_VALUE does not exist

I am on Mariadb version 10.5.24. I am getting this error for a query with ANY_VALUE. Used to work fine on MySQL. Has anyone experienced this error?

FUNCTION database.ANY_VALUE does not exist

3 Comments
2024/03/21
06:19 UTC

2

Replicating database to different name database on same server?

I have a critical database that I need a multi-tiered interval backup scheme on a WHM/Cpanel (Alamalinux 8) server. Currently I have JetBackup doing incremental backups every 30 minutes and I have the database being replicated to another server. However that means I have exposure of up to 29 minutes (worst case scenario) of data loss/corruption. I want to lower the maximum potential data loss to 3-minute. I don't think it's smart to be running a backup with Jetbackup every 3 minutes. Obviously I could add a relay on the replication of 3 minutes so if data was accidentally deleted I'd have 3 minutes to temporarily stop replication and restore the deleted data. But that means in the even of a catastrophic database failure, the data on the replicated hot spare will be missing the last 3 minutes of data.

The simplest solution would be to add a third server to be a second slave with the 3 minute replication delay but I really don't want to create a server just for this purpose. I've though about setting up a trigger to replicated insert, update and delete commands on the database to another database with a different name on the slave server but that seems like a pretty clunky solution and I'm not sure that has the capability of adding a 3 minute delay.

I could do a drop and import every 3 minutes but that's going to keep a pretty constant high load on the slave server.

What I really need is to be able to setup the slave server to replicate locally in addition to be being a remote slave but I think that would require a totally separate MariaDB instance which I'm not sure how simple that is or even possible to setup.

Any ideas?

2 Comments
2024/03/18
15:53 UTC

2

Initial node can't rejoin cluster.

Hi all

I start my cluster on node1 with galera_new_cluster. It stays active while I add the other 4 nodes with no issue. I can restart any other node besides node1. Node1 currently is a replica for another server, I'm not sure if this is related at all.

When I restart node1 it won't rejoin the cluster. I have to rebuild everything from scratch. This really isn't ideal. I've pasted the whole log below because it isn't too long. Any ideas what I'm doing wrong?

2024-03-11 15:57:17 0 [Note] WSREP: Recovering GCache ring buffer: version: 2, UUID: 57e7e8e4-cbf6-11ee-aa0d-ab395826b534, offset: -1 
2024-03-11 15:57:17 0 [Note] WSREP: GCache::RingBuffer initial scan... 0.0% ( 0/134217752 bytes) complete. 
2024-03-11 15:57:17 0 [Note] WSREP: GCache::RingBuffer initial scan...100.0% (134217752/134217752 bytes) complete. 
2024-03-11 15:57:17 0 [Note] WSREP: Recovering GCache ring buffer: Recovery failed, need to do full reset. 
2024-03-11 15:57:17 0 [Note] WSREP: Passing config to GCS: base_dir = /var/lib/mysql/; base_host = 10.3.6.30; base_port = 4567; cert.log_conflicts = no; cert.optimistic_pa = yes; debug = no; evs.auto_evict = 0; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.join_retrans_period = PT1S; evs.max_install_timeouts = 3; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT5S; evs.user_send_window = 2; evs.view_forget_timeout = PT24H; gcache.dir = /var/lib/mysql/; gcache.keep_pages_size = 0; gcache.keep_plaintext_size = 128M; gcache.mem_size = 0; gcache.name = galera.cache; gcache.page_size = 128M; gcache.recover = yes; gcache.size = 128M; gcomm.thread_prio = ; gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 16; gcs.fc_master_slave = no; gcs.fc_single_primary = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; gcs.recv_q_hard_limit = 9223372036854775807; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; gmcast.segment = 0; gm 
2024-03-11 15:57:17 0 [Note] WSREP: Start replication 
2024-03-11 15:57:17 0 [Note] WSREP: Connecting with bootstrap option: 0 
2024-03-11 15:57:17 0 [Note] WSREP: Setting GCS initial position to 00000000-0000-0000-0000-000000000000:-1 
2024-03-11 15:57:17 0 [Note] WSREP: protonet asio version 0 
2024-03-11 15:57:17 0 [Note] WSREP: Using CRC-32C for message checksums. 
2024-03-11 15:57:17 0 [Note] WSREP: backend: asio 
2024-03-11 15:57:17 0 [Note] WSREP: gcomm thread scheduling priority set to other:0 2024-03-11 15:57:17 0 [Note] WSREP: access file(/var/lib/mysql//gvwstate.dat) failed(No such file or directory) 
2024-03-11 15:57:17 0 [Note] WSREP: restore pc from disk failed 
2024-03-11 15:57:17 0 [Note] WSREP: GMCast version 0 
2024-03-11 15:57:17 0 [Note] WSREP: (45c43a67-b207, 'tcp://0.0.0.0:4567') listening at tcp://0.0.0.0:4567 
2024-03-11 15:57:17 0 [Note] WSREP: (45c43a67-b207, 'tcp://0.0.0.0:4567') multicast: , ttl: 1 
2024-03-11 15:57:17 0 [Note] WSREP: EVS version 1 
2024-03-11 15:57:17 0 [Note] WSREP: gcomm: connecting to group 'configdb_cluster', peer '10.3.6.30:,10.3.6.31:,10.88.51.58:,10.88.51.39:' 
2024-03-11 15:57:17 0 [Note] WSREP: (45c43a67-b207, 'tcp://0.0.0.0:4567') Found matching local endpoint for a connection, blacklisting address tcp://10.3.6.30:4567 
2024-03-11 15:57:17 0 [Note] WSREP: (45c43a67-b207, 'tcp://0.0.0.0:4567') connection established to 95da9edb-a2cc tcp://10.3.6.31:4567 
2024-03-11 15:57:17 0 [Note] WSREP: (45c43a67-b207, 'tcp://0.0.0.0:4567') turning message relay requesting on, nonlive peers: tcp://10.89.4.12:4567 
2024-03-11 15:57:18 0 [Note] WSREP: (45c43a67-b207, 'tcp://0.0.0.0:4567') connection established to fc372c80-ad14 tcp://10.89.4.12:4567 
2024-03-11 15:57:18 0 [Note] WSREP: (45c43a67-b207, 'tcp://0.0.0.0:4567') connection established to 5932c7f2-b7d9 tcp://10.88.51.58:4567 
2024-03-11 15:57:18 0 [Note] WSREP: (45c43a67-b207, 'tcp://0.0.0.0:4567') connection established to c50e8cf3-8a86 tcp://10.88.51.39:4567 
2024-03-11 15:57:18 0 [Warning] WSREP: handshake with 00000000-0000 failed: 'duplicate uuid' 
2024-03-11 15:57:18 0 [ERROR] WSREP: failed to open gcomm backend connection: 131: A node with the same UUID already exists in the cluster. Removing gvwstate.dat file, this node will generate a new UUID when restarted. (FATAL) at ./gcomm/src/gmcast_proto.cpp:handle_failed():313 
2024-03-11 15:57:18 0 [ERROR] WSREP: ./gcs/src/gcs_core.cpp:gcs_core_open():221: Failed to open backend connection: -131 (State not recoverable) 
2024-03-11 15:57:18 0 [Warning] WSREP: handshake with 00000000-0000 failed: 'duplicate uuid' 
2024-03-11 15:57:19 0 [ERROR] WSREP: ./gcs/src/gcs.cpp:gcs_open():1674: Failed to open channel 'configdb_cluster' at 'gcomm://10.3.6.30,10.3.6.31,10.88.51.58,10.88.51.39': -131 (State not recoverable) 
2024-03-11 15:57:19 0 [ERROR] WSREP: gcs connect failed: State not recoverable 
2024-03-11 15:57:19 0 [ERROR] WSREP: wsrep::connect(gcomm://10.3.6.30,10.3.6.31,10.88.51.58,10.88.51.39) failed: 7 
2024-03-11 15:57:19 0 [ERROR] Aborting

Below is an image of the setup. It's not the complete cluster. It just shows the hosts I'm discussing currently. There are 2 other nodes and an arbitrator spanning 3 locations.

https://preview.redd.it/w2j2oodke2pc1.png?width=526&format=png&auto=webp&s=4e7b9f242ffe3f511efda8825799a4235334b4ac

3 Comments
2024/03/11
14:15 UTC

1

Mariadb_dump - error - It's base table, skipped

Hello

Firstly, I am a total SQL neophyte.

I am struggling with a very long list of errors below

-- Retrieving rows...

-- Retrieving table structure for table wp_wpforms_tasks_meta...

-- Sending SELECT query...

-- Retrieving rows...

-- Retrieving view structure for table wp_actionscheduler_actions...

-- It's base table, skipped

-- Retrieving view structure for table wp_actionscheduler_claims...

-- It's base table, skipped

-- Disconnecting from localhost...

using the mariadb-dump command

mariadb-dump -u root --password=***** --all-databases -x -Y -v > ${homePath}/dbBackups/db_backup.sql

I get a 1.7GB file at the end but the command

head -n 5 /dbBackups/db_backup.sql

Does not return anything.

The phpmyadmin SQL export tools gives me a 3.6GB file and the head command reads the file header.

I cannot find too much on the web concerning the "error" above, but it seems to stop me having a usable export.

Any thoughts on how to rectify the dump error so any thoughts are most welcome.

Thank you

2 Comments
2024/03/11
07:55 UTC

2

Doubt about join multiple columns from another table on a query

Hello there, I hope not to molest too much with my newbie doubt, but I'm really stuck in this:

I'm performing the next query in my database:

select A.ticket_id, A.subject, A.c_mod, A.h_pro, A.h_via, A.h_ini, A.h_fin

from ost_ticket__cdata as A
join ost_ticket as B on A.ticket_id = B.ticket_id
where A.h_programada >= cast('2024-01-01' as date)
and A.h_programada <= cast('2024-01-31' as date)
order by A.h_programada
;

But I need to view in the output, another columns from ost_ticket table, such as ost_ticket.number, ost_ticket.created and ost_ticket.closed and I can´t find information about how can I do that. Every tutorial that I see, refers to only one column, not multiple.

Anyone can give me a light?

Thanks!!

3 Comments
2024/03/06
18:32 UTC

3

MariaDB replica issue

Hello everyone! I would like to ask some advice from you because I am trying to make 2 MariaDB replicas between 3 servers at the same time, I can make work only 1 of them at the same time, together I haven't been able to, I need them to be able to work at the same time, but please, let me get into the details of the topology.

1st case:

  • ServerA replicates some tables from DATABASE1 to ServerB and ServerC (In this case ServerA serving as the Source/Master and ServerB and ServerC serving as the Replicas/Slaves)

ServerA Databases: DATABASE1
ServerB Databases: DATABASE1
ServerC Databases: DATABASE1

MariaDB's config for ServerA in the 1st case:

## MASTER
server-id               = 1
log_bin                 = /var/log/mysql/mysql-bin.log
log-basename            = masterdb1
binlog-format           = mixed
binlog_do_db            = DATABASE1
replicate-do-table      = DATABASE1.TYPE
replicate-do-table      = DATABASE1.MODEL
replicate-do-table      = DATABASE1.BRAND
expire_logs_days        = 10
max_binlog_size         = 100M

MariaDB's config for ServerB and ServerC in the 1st case:

slave-skip-errors       = all
server-id               = 2 #<<<----2 for serverB and 3 for serverC
log_bin         = /var/log/mysql/mariadb-bin

#SLAVES
masterdb1.binlog_do_db              = DATABASE1
masterdb1.replicate-do-table        = DATABASE1.TYPE
masterdb1.replicate-do-table        = DATABASE1.MODEL
masterdb1.replicate-do-table        = DATABASE1.BRAND

expire_logs_days        = 10
max_binlog_size        = 100M

This works perfectly, as intended.

The problem starts when I try to add the 2nd case replica, I did try the following configuration by itself, and it works, I mean, that if I configure the 2nd case when it is the only replica between the servers, it works, but I can't make it work alongside the 1st case.

2nd case:

  • ServerB and ServerC replicating the whole DATABASE2 in both servers to the ServerA (In this case ServerB and ServerC serving as the Sources/Masters and ServerA serving as the Replica/Slave)

ServerA Databases: DATABASE2_SERVERB, DATABASE2_SERVERC
ServerB Databases: DATABASE2
ServerC Databases: DATABASE2

MariaDB's config for ServerB in the 2st case:

server-id               = 2
log_bin                 = /var/log/mysql/mysql-bin.log
log-basename            = masterserverB
binlog-format           = mixed
replicate-rewrite-db    = DATABASE2->DATABASE2_SERVERB
expire_logs_days        = 10
max_binlog_size         = 100M

MariaDB's config for ServerC in the 2st case:

server-id               = 3
log_bin                 = /var/log/mysql/mysql-bin.log
log-basename            = masterserverC
binlog-format           = mixed
replicate-rewrite-db    = DATABASE2->DATABASE2_SERVERC
expire_logs_days        = 10
max_binlog_size         = 100M

MariaDB's config for ServerA in the 2st case:

slave-skip-errors       = all
server-id               = 1
log_bin                 = /var/log/mysql/mysql-bin.log
masterserverB.replicate-rewrite-db    = DATABASE2->DATABASE2_SERVERB
masterserverC.replicate-rewrite-db    = DATABASE2->DATABASE2_SERVERC
relay-log               = /var/log/mysql/mysql-relay-bin.log

So, the question is, how may I have those configs together so I can get the 3 servers to be Source/Master and Replica/Slave at the same time with those configurations? Is it possible? Could anyone show some light on the matter? Thanks in advance for any help and sorry for the long post.

Edit: spelling

0 Comments
2024/03/05
14:50 UTC

3

From MySQL to MariaDB in under 10 minutes - Live-on-stage migration of cantamen's main database

0 Comments
2024/03/03
21:18 UTC

1

errno: 11 "Resource temporarily unavailable"

I am using the linuxserver.io/mariadb image with docker. I'm using it as a db for nextcloud, but I'm still having issues.

/config/log/mysql/mariadb-bin' (errno: 11 "Resource temporarily unavailable")

Of course, I also tried giving /config/log/mysql/ in docker 777 permissions. I also tried assigning 777 to /config/log/mysql/*. But it still says Resource temporarily unavailable.

When I access it via docker exec, the file is accessible with non-root user. I have now tried a clean install of db and nextcloud, but still no luck.

2 Comments
2024/03/02
06:18 UTC

2

db restore with alternative name

Hi

I've restored db files with an alternative name to a mariadb server.

The db is shown and the tables too, but when I try to select a table it throws "#1932 - table doesn't exist in engine" error.

I suppose this happens because the mariadb server doesn't know this new tables in the alternative named db. Is there any way to fix this ?

Thank you.

9 Comments
2024/02/29
13:40 UTC

Back To Top