Questions tagged [mariadb-10.1]

MariaDB 10.1 is a free, open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). MariaDB -- initially a clone of MySQL database -- has now veered off the original code base and implements different new features compared to MySQL.

66 questions
11
votes
4 answers

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server

I was trying to run following Query on my sql server : CREATE TABLE `e_store`.`products`( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , `name` VARCHAR(250) NOT NULL , `brand_id` INT UNSIGNED NOT NULL , `category_id` INT UNSIGNED NOT…
User57
  • 2,453
  • 14
  • 36
  • 72
2
votes
1 answer

MariaDB get counted values grouped by datetime for all possible dates

1.48 table which looks like this: CREATE TABLE `history` ( `TIMESTAMP` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `DEVICE` VARCHAR(64) NULL DEFAULT NULL COLLATE 'utf8_bin', `TYPE` VARCHAR(64) NULL DEFAULT…
Peter H
  • 23
  • 2
2
votes
1 answer

Can pattern matching be used in MySQL for consecutive rows?

I have a very simple table, similar to: id | val ---------- 1 | 20 2 | 22 3 | 29 4 | 21 5 | 14 6 | 9 7 | 15 I want to be able to identify a pattern in consecutive rows. For example, if the input is "29, 21, 14", there are three…
blogo
  • 319
  • 1
  • 12
2
votes
2 answers

Unable to start fresh wiki.js install on my virtual server

I am trying to install the latest wiki.js version 2.5.170 on my standalone virtual machine running Centos 7 https://docs.requarks.io/install/linux Nodejs is also the latest. [root@server101 wiki]# node -v v14.0.0 DB block in the config.yml…
vjwilson
  • 754
  • 2
  • 14
  • 30
2
votes
1 answer

nested query to get number of employees under managers

create table employee ( Id int, ManagerId int); insert into employee values (1, 3), (2, 3), (3, 6), (4, 7), (5, 7), (6, 8), (7, 6); select * from employee; here is the table: how to write a query to get managers with number of employees under…
JamesWang
  • 1,175
  • 3
  • 14
  • 32
2
votes
1 answer

Order by in a self referencing table

I have a table of comments (to some article like this): --------------------------------------------------------------- id |comment_id |likes_count |add_time --------------------------------------------------------------- 0 NULL …
hiddeneyes02
  • 2,562
  • 1
  • 31
  • 58
2
votes
2 answers

How to get a random combination of rows that sum up to a specific value?

The Table I have: +--------+--------------------+ |item_id| value | +--------+--------------------+ | 1 | 1 | | 2 | 4 | | 3 | 2 | | 4 | 6 …
Darkenn
  • 25
  • 4
1
vote
1 answer

Restoring to mariadb10.1 fails the first time, but succeeds when restoring again after recreating the database

I am upgrading from mariadb5.5 to 10.1. I'm trying to restore the dump file output from 5.5 to 10.1, but I'm suffering from the phenomenon that the first restore always fails, and the restore succeeds after deleting and recreating the database. The…
snks
  • 13
  • 2
1
vote
2 answers

MariaDB Import maximum key length

We are currently moving the DB to another Server but we got a problem. Our Database is quite big and when we want to Import it to our new MariaDB Server with PhpMyAdmin. We got an Error Code and don´t know how to solve it. Sorry that the Outcome is…
ZeroOne
  • 13
  • 2
1
vote
1 answer

MariaDB - Replication. Slave Lagging Behind For an Interval

So I have 1 Master Server and 2 Slave servers running (CentOS-7). I have installed MariaDB-10.1.48 on all the servers. I implemented replication using GTID. All things were working well but an issue arose when I tried to add the 2nd Slave to…
1
vote
1 answer

mysql joining one table's data with other tables each row

I was trying to generate a report for a given date range from the following table. table_columns => employee_id |date | status where status 1 = not_visited, 2 = visited, 3 = canceled, 4 = pending (for approval) The report should look like the…
Noob Coder
  • 2,816
  • 8
  • 36
  • 61
1
vote
1 answer

Keep group of rows together ordered by min(time) without using group by

I have a table of events generated by users doing stuff. It looks roughly like this: session | time | event | etc. 06efaa1805ef670c | 2022-01-07 08:41:03 | lockFound | etc. 06efaa1805ef670c | …
wagster
  • 498
  • 4
  • 15
1
vote
1 answer

phpmyadmin Event syntax error while it works on the sql command

DELETE FROM Ranking; ALTER TABLE Ranking AUTO_INCREMENT = 1; INSERT INTO Ranking (username) select username from Players order by rank desc LIMIT 100; This is the command i want to execute every 10 Minutes, i have a table which should constantly…
1
vote
1 answer

Get orders in every nth hour interval in MySQL

We collect orders from users and give them a window of 3 days to pay before order is delivered/canceled. We want to send them notification every 8th hour to remind them for payment. we use hourly cron to send notification. How can we get all orders…
Shamim Hasan
  • 179
  • 2
  • 9
1
vote
1 answer

mariadb galera node stuck at WSREP state transfer ongoing

I restarted mariadb galera cluster node, and now its taking ages to start, however I noticed Status: "WSREP state transfer ongoing, current seqno: 9331 waited 510.000000 secs" and also noticed Memory: 71.3M memory usage is going up everytime I…
Ciasto piekarz
  • 7,853
  • 18
  • 101
  • 197
1
2 3 4 5