Questions tagged [mariadb-10.3]

MariaDB 10.3 is an open source database server that offers similar functionality compared to MySQL.

MariaDB 10.3 is an open source database server that offers similar functionality compared to MySQL. Since version 10.0 MariaDB has veered off MySQL and now implements a different set of features.

MariaDB 10.3 implements system-versioning tables, PERCENTILE_CONT(), PERCENTILE_DISC(), and MEDIAN() window functions, INTERSECT and EXCEPT clauses, cursors with parameters, LIMIT in multi-table updates, LIMIT in GROUP_CONCAT(), and many other new features.

171 questions
0
votes
0 answers

mysql command displays `-?` help instead of `-e` executing command when run from bash script (but not when run by hand)

I have a rather simple bash script. #!/bin/bash echo echo What is the root statement for the new debate? read body echo echo What is your mysql password? read -s pass echo sql='INSERT INTO `Debate` (`unblocked`, `debaterId`, `dirty`…
Cliff Armstrong
  • 197
  • 1
  • 12
0
votes
1 answer

MariaDB EVENT autoclear DB returns warning

I got MariaDB version 10.3.27 where im trying to run EVENT which starts everyday at 1am for clearing some databases. but when I try to pass lines below, it return 1 warning, but Im not sure why.... Can someone please clarify this for me?…
0
votes
1 answer

Force mysqldump to use CREATE DATABASE IF NOT EXISTS

I've been going through the mysqldump documentation for MariaDB. How do I force mysqldump to output CREATE DATABASE IF NOT EXISTS? The best I've managed is to add the --databases flag: mysqldump -u root -p --skip-set-charset --databases…
John
  • 1
  • 13
  • 98
  • 177
0
votes
1 answer

Usage of wildcard '%' not working for seeing grants of a user from any host

Are my queries wrong?. MariaDB [(none)]> SHOW GRANTS for 'root'@'%'; ERROR 1141 (42000): There is no such grant defined for user 'root' on host '%' MariaDB [(none)]> show grants for 'wp_user'@'%'; ERROR 1141 (42000): There is no such grant defined…
vjwilson
  • 754
  • 2
  • 14
  • 30
0
votes
0 answers

Issue Setting Up MariaDB as a CentOS7 Service

I have built MariaDB from source for CentOS 7 yum-builddep mariadb-server yum install git \ gcc \ gcc-c++ \ bison \ libxml2-devel \ libevent-devel \ rpm-build git clone --branch 10.3 https://github.com/MariaDB/server.git cmake…
afp_2008
  • 1,940
  • 1
  • 19
  • 46
0
votes
1 answer

How to use if else condition in MariaDB stored procedure?

When I am trying to use IF Else condition in my stored procedure, I am getting the syntax error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'sortby = 1 …
Ullan
  • 905
  • 4
  • 15
  • 28
0
votes
1 answer

Can't update an table's column but works after using update sql query in phpmyadmin

When a user tries to update their settings, I inserted into my audit log table called userUpdateLogand it calls a before insert trigger to insert into userProfiles and users based off the columns insert into their respective table. But for an…
Brandon
  • 159
  • 1
  • 1
  • 13
0
votes
3 answers

SQL query to count of two columns in one

s.fruit fruit Cucumber apple apple Mango Orange grape grape apple My output need to be the count be of the total fruit. apple:3, Mango :1, grape:2, Cucumber:1, orange:1. This is what i tried which is not correct so how to do this…
Ruban
  • 125
  • 7
0
votes
2 answers

Multi SELECT query for multiple ids

I do a SELECT to decide if I send a notification to a user. (10.3.23-MariaDB) First part checks if there are 0 unread notifications, if 0 no further SELECT is needed. If not, I count how many notifications the user has since last equal notification…
Vixxs
  • 569
  • 7
  • 21
0
votes
0 answers

How can I run a Django 3 project with a MySQL server set on a NAS (Synology DS120J) using phpMyAdmin and MariaDB 10?

I appreciate the fact that the topic is quite specific, but I have been struggling to find documentation on such setup. I am working on a Django 3 project using Python 3.9, instead of SQLite3, the application would be using a MySQL server hosted on…
user14999895
0
votes
1 answer

In MariaDB, how to select the last event in every day and create indexes for it?

I have a table of meetings, each of which has a start and end time expressed as an integer Unix timestamp, as well as a group of people who are attending this meeting. I need to send out notifications to each group of people once all their meetings…
0
votes
1 answer

What is the best way to create an index on 3 column and if this is possible?

We have a SQL query that is doing a full table scan: DELETE FROM oc_cart WHERE (api_id > ? OR customer_id = ?) AND date_added < DATE_SUB(NOW(), INTERVAL ? HOUR) Is it possible to create an index to optimize this query? For now I have…
redochka
  • 12,345
  • 14
  • 66
  • 79
0
votes
0 answers

Updating same column twice while joining with another table is not working as expected

Consider I have two tables, t1 and t2. t1 has two columns: c1 and c2. t2 has two columns: c1 and c3. We insert values in both tables: CREATE TABLE t1 (c1 INT, c2 INT); CREATE TABLE t2 (c1 int, c3 int); INSERT INTO t1 VALUES (10,10),…
Paul Karam
  • 4,052
  • 8
  • 30
  • 53
0
votes
1 answer

Drupal Sites Shows content of the Index.php file

Im trying to move a drupal site I started on my localhost to a server at home. The database is both exported from my localhost and stored on the server. The content of the nginx.conf file is as follows events { worker_connections 768; #…
0
votes
3 answers

Update A Record if it exists, else do nothing, including short-cicruit

What I want to do is something that has the following logic: IF EXISTS (SELECT * FROM people WHERE ID = 168) THEN UPDATE people SET calculated_value = complex_queries_and_calculations WHERE ID = 168 .., so to update a field of a given record if…
DevelJoe
  • 856
  • 1
  • 10
  • 24