Questions tagged [mariadb-10.1]

MariaDB 10.1 was released as stable (GA) with version 10.1.8 on 17 Oct 2015.

Filter by
Sorted by
Tagged with
1
vote
1answer
21 views

Cannot remove orphaned InnoDB Temp Table - missing .frm file

For the second time, I have encountered an issue, where our MySQL server (MariaDB v10.1) suddenly threw an error - Could not remove temporary table: './database_name/#sql-4593_791', error: 120. ...
0
votes
0answers
10 views

Access a file on diffferent drive using connect driver on Windows XP

I need to access a *.DBF file on a network drive using CONNECT database engine. When I use a file on the C:/ drive, it works as intended, but when I move the file to a remote drive, it says "no such ...
0
votes
2answers
27 views

Max Connections Maria DB

Every time I reboot Mariadb places me the max_connections in 151 and in the my.cnf I have it with 300. Why does this happen?
0
votes
1answer
50 views

Multiple mariadb instances - how to access to the not default instances via command line?

I have a TYPO3 and a Moodle installation on one server with Debian stretch. Moodle needs some database configurations (MariaDB 10.1.38) which are different from the ones TYPO3 needs. I made a new ...
2
votes
2answers
138 views

how to improve this query performance

I have an application that's running this following query SELECT SQL_NO_CACHE p.*, product_shop.*, stock.out_of_stock, IFNULL(stock....
0
votes
1answer
29 views

convert date to timestamp and store into table using trigger mysql

Using trigger I convert DateTime into a timestamp and then store into another table. But somehow convert date into timestamp always affected by timezone so that's why I had use convert_tz of date and ...
0
votes
1answer
45 views

MariaDB Multiline RegEx

I'm running a SQL query in MariaDB under PHPMyAdmin as follows: select REGEXP_REPLACE(post_content,'(?m)<noindex>[.\r\n]*</noindex>','') from wp_posts where ID = 318 I'm trying to ...
0
votes
0answers
59 views

how to remove/deal with locks in a MariaDB Galera cluster

I have a cluster of 3 nodes running MariaDB Galera cluster, cluster works as expected, I can reboot a single node at a time and in the best case, IST will be used or SST(using rsync) to sync back the ...
0
votes
1answer
28 views

MySQL Conditional Counter Based Other Columns?

I have a query that returns purchases for all customers in a store across a date range. It works fine, but now I've been asked to modify the results so only the first purchase per customer per day is ...
2
votes
1answer
102 views

How to optimize the execution of query that takes too long

I am working with a query that is taking around 53 minutes to execute, which I feel is excessive. Maria DB version: Server version: 10.1.38-MariaDB-1~stretch mariadb.org The declaration of the ...
1
vote
2answers
63 views

User rank based on cumulative rows

UPDATE: Full table schema and data: https://www.db-fiddle.com/f/jT3Mfwd1BJ8GrsBxxPDC8M/1 Table structure (some fields are hidden): +---------+---------+------------+-------------+-------+-------+ | ...
0
votes
1answer
52 views

Cannot import table due to zombie constraint

I tried to refresh my copy of the production database by emptying and importing a SQL file. I've done it hundreds of times, only this time the import failed. I tried dropping & recreating the ...
2
votes
2answers
242 views

Unexpected RAM usage on MySQL

We have a server which hosts about 10 customers in a multi-tenant web application, each customer has its own database which is cloned from a template, and each database is a little less than 3000 ...
2
votes
1answer
206 views

Using mariabackup/xtrabackup vs block level snapshots

I am running a mariadb 10.1 instance with all innodb tables and a replication slave in a k8s cluster on Google Cloud's GKE. I have a scheduled mysqldump that runs every night. But for additional ...
0
votes
1answer
269 views

How to restore dump from MariaDB 10.1 to MySQL 5.5

I generate backups of my databases by using mysqldump.exe -u root --all-databases > mariaDbBackup.sql. When I try to restore my dump by doing mysql -u root -p < mariaDbBackup.sql, I get an ...
0
votes
0answers
326 views

Display Dynamic Pivot MySql Table to PHP

i need help on how to display this on html or php. i have this dynamic pivot table code. SET @sql_dynamic:= (SELECT GROUP_CONCAT(DISTINCT CONCAT('if(sum(if(attendance_date = "', ...
0
votes
0answers
16 views

How do I select this pivot query by specified Month

I need help with my mysql pivot code. Everytime I add WHERE MONTH(attendance_date) = 2 inside @sql_dynamic gets error. pls help I have a code: SET @sql_dynamic:= (SELECT GROUP_CONCAT(DISTINCT ...
0
votes
2answers
72 views

sql select only the last record for multiple values

I have a table called "sessions" with say 4 columns like below id name s_time f_time 01 abc 10.15 10.45 02 abc 11.05 11.55 03 abc 12.18 13.46 04 abc 15.12 16.53 05 def 10.01 12.58 06 ...
0
votes
2answers
54 views

Time taken to drop/add index is lesser than adding a column. Why is that?

I'm using 10.1.25-MariaDB-1~xenial, but engine is innodb though. I'm performing an alter by default it does ONLINE alter. When I add column it takes at least 50 mins for 50G table in our ...
0
votes
1answer
61 views

Mariadb 10.1 / Galera - bootstrap node always doesn't lose quorum

I'm using mariadb10.1.37, wsrep_provider_version 25.3.24(r3825). On my dev cluster (2node+1arbitrator) I found the following behaviour: node1: bootstrap new cluster (using galera_new_cluster, with pc....
1
vote
3answers
111 views

How can I speed up this query?

Here is the definition of the relevant table: CREATE TABLE IF NOT EXISTS pricehistory ( id INTEGER(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY, price INTEGER NOT NULL, region ...
0
votes
1answer
39 views

Processes dissappear from processlist (MariaDB)

In my application I need to monitor list of process ids for some database user, so I execute SHOW PROCESSLIST command to get information. The problem is that sometimes some Id dissapears from command ...
0
votes
2answers
259 views

DELETE inside INSERT Trigger

I wanted to make rotation inside my logs table to store last 100 rows only, and decided to use triggers, as in create trigger rotate_log after insert on logs for each row begin declare cnt int; ...
0
votes
2answers
86 views

Create users identified by the same password as another user in MariaDB 10.0.X

How do I create users with the same password as another user in MariaDB 10.x? I do not know the password of the existing user , so i want to use same hashed password as existing, also do need to ...
1
vote
2answers
2k views

Which file do I need to modify my.cnf MariaDB on Ubuntu 18.04

I want to modify these values: [mysqld] key_buffer_size = 256M max_allowed_packet = 128M thread_stack = 256K query_cache_limit = 64M query_cache_size = 384M innodb_buffer_pool_size = ...
1
vote
0answers
57 views

MariaDB Cluster Cannot Join new Node

This is status on Main node. it's show some seqno as 17210843 when new empty node is join. i'm found rsync process is ok. but i see difference seqno in linux process after finish this process my ...
1
vote
1answer
78 views

How does STRICT_ALL_TABLES work with multi-row statements and partial updates?

In the docs for STRICT_ALL_TABLES it states, For STRICT_ALL_TABLES, MySQL returns an error and ignores the rest of the rows. However, because the earlier rows have been inserted or updated, the ...
1
vote
1answer
226 views

greatest n per group with a 3 tables join

Working on a project with following objects: People id Vehicles id model: text and a link table for owners which passes through owners changes Owner_Changes old_person_id new_person_id ...
0
votes
0answers
385 views

WITH clause in Maria DB

I am trying to run below query in Maria DB (10.1.26-MariaDB-0+deb9u1 Debian 9.1) with ind as ( select index_name, table_name, group_concat(column_name) column_name, ...
0
votes
1answer
28 views

How can I use user defined variables and `USE`?

I have some schemas, all with the same format. The format is: schema name, underscore, single digit (example: database_1). How can I loop through all of these schemas easily? I tried SET @num = 1; USE ...
0
votes
1answer
46 views

JOIN on “Latest Match” in “Order”

Having a hard time explaining my scenario and what I am trying to accomplish. I have two tables like so, I have reduced the values for my scenarios Table1 +----------------------+ | ID | Time ...
3
votes
1answer
669 views

how to get 'Queries per second avg' using SQL (not 'mysqladmin status')

When I start mysqladmin, it prints out several statistics, including "Queries per second avg": # mysqladmin --defaults-file=../mylogin.cnf status Uptime: 4568115 Threads: 859 Questions: 3703806462 ...
2
votes
0answers
480 views

Mariadb connection fails through tunnel when bind address = localhost

I have a MariaDB 10.1.26 virtual server running on Debian 9. It is connected to via ssh tunnel and the bind address = localhost. It has been working without fail untill recently. Now when I connect ...
0
votes
2answers
74 views

WARN max_connections from pt-variable-advisor - what to configure for DBaaS?

Our VM configuration (hosted on Vmware) # cat /proc/cpuinfo |grep "cpu cores" | awk -F: '{ num+=$2 } END{ print "cpu cores", num }' cpu cores 32 # free -h total used free ...
0
votes
1answer
800 views

different settings for max_heap_table_size and tmp_table_size (MariaDB 10.1.x)

I run pt-variable-advisor and got a note about different settings for max_heap_table_size and tmp_table_size. With a web search I found only old articles (around 2007). pt-variable-advisor h=...
1
vote
1answer
208 views

pt-query-digest --type binlog (percona-toolkit) gives empty output with MariaDB/Galera 10.1

My installed versions of MariaDB and Percona Toolkit on MacBook: brew info percona-toolkit percona-toolkit: stable 3.0.10 (bottled), HEAD Percona Toolkit for MySQL https://www.percona.com/software/...
1
vote
1answer
240 views

Mariadb slow_query_log keeps disabling

I'm trying to enable slow_query_log on a Mariadb 10.1.32 server. When slow_query_log is enabled & flushed, logging is successful (slow queries are recorded and written to the file) for a minute ...
0
votes
1answer
243 views

mariadb, add 4th galera node failed

I have three nodes setup and running perfectly for the past months. Recently I want to add another node in a different location but somehow I keep on getting errors. At first, I was just following ...
4
votes
1answer
2k views

MariaDB - “ERROR 1205 … Lock wait timeout exceeded; …” when doing multiple parallel UPDATEs affecting different rows

We are using MariaDB 10.1.19 hosting a legacy database. We have an lpr table (on InnoDB) where we want to move from a text column gate to a normalized foreign key gate_id. Our code is doing the UPDATE ...
3
votes
3answers
1k views

Can MariaDB or MySQL cast as bigint, getting an error: … right syntax to use near 'bigint)'?

If I want to take a string and create a table (this fails in strict mode), CREATE TABLE g AS SELECT CAST('2147483699' AS int); How do I tell it that I want a bigint type? I'll also get an int(10) ...
5
votes
2answers
942 views

Hex and Binary Literals in MySQL / MariaDB?

Another question I have pertains to just the & over string types. This question is over the binary-string literals as constructed with B'' or X''. MariaDB supports binary and hex literals, ...
1
vote
1answer
81 views

does the gcache.size matter during SST? What if more than gcache.size comes in during SST?

During SST my data dir looks like this (there is a hidden dir .sst with xtrabackup): -rw-rw---- 1 vcap vcap 113 Apr 16 08:13 grastate.dat -rw-rw---- 1 vcap vcap 265 Apr 16 08:13 gvwstate....
1
vote
1answer
772 views

What are the options for archiving old data of mariadb tables if partitioning can not be implemented due to a restriction

We are planning to archive some old data of our MariaDB tables to some other volume(or mount point) of the linux server apart from the one the tables are on. We are using partitioning for this and ...
2
votes
2answers
688 views

why I see only COMMIT or commit in SHOW FULL PROCESSLIST - No SQL statement

I see in lots of output from SHOW FULL PROCESSLIST only COMMIT or commit (lowercase and upercase mix). What are those transactions? Why no SQL statement? We are running MariaDB 10.1.x and Galera ...
0
votes
1answer
164 views

how to install a second server of mariadb [on hold]

I have a server where cpanel is installed (it includes mysql 5, php). What I need is to install a second database server mariadb 10.1.20. I tried through: yum install MariaDB-10.1.20-centos6-x86_64-...
3
votes
1answer
581 views

MariaDB audit plugin logs all queries instead of DML only

I was testing the "server_audit" plugin of MariaDB, which I configured like this: plugin-load-add = server_audit server_audit_logging = ON server_audit_events = QUERY_DML server_audit_output_type = ...
0
votes
1answer
60 views

I can't add extra node after reset root password mariadb 10.1.20

I have a mariadb 10.1.20 cluster with 5 nodes. I don't know root password so I did the following steps: On second node, I stopped mysql service I set wsrep = OFF on /etc/my.cnf.d/server.cnf I ...
3
votes
2answers
560 views

Changing master for channel gives syntax error

I'm trying to set up a multi-source replication When trying to set a master for a specific channel using this query CHANGE MASTER TO MASTER_HOST='192.168.0.203', MASTER_USER='rep', MASTER_PORT=3306, ...
2
votes
2answers
18k views

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 “No such file or directory”) when configuring cluster

I have 3 MariaDB nodes. Want to configure cluster. Specified in gcomm:// in my.cnf ips of all members in cluster according to this. And added ?pc.wait_prim=no at then of gcomm://ip1,ip2,ip3 Then ...
0
votes
1answer
184 views

I can't add an extra node to mariadb cluster 10.1

I was installing a test mariadb cluster but I have a problem when I want to add an extra node. Both nodes use Red Hat Enterprise Linux Server release 7.3 (Maipo) These were the following steps: On ...