mariadb

Why in MySQL (MariaDB) does the loop not work even in the procedure?

2 UPDATE: Something to think about: delimiter ;; drop procedure if exists test2;; create procedure test2() begin select ‘He ... t do it... I ask the moderators and users to help in this matter, and not to give the tag duplicate and set downvote. Please!

MySQL: INSERT... VALUES, INSERT... SET and hybrid version

When reading the legacy code, I found an SQL query to MySQL of this type: INSERT INTO table (field1, field2, field3) V ... just redundant code that can be cleaned up and brought to either the standard variant (1) or the MySQL-specific variant (2)?

Migrating a database from phpMyAdmin to MariaDB

Good day to all! Guys, you can't export and then import the database. I will describe the actions in Linux: Running phpMyAd ... yTable ERROR 1146 (42S02): Table 'myDB.myTable' doesn't exist Why can't he see the table in this database, if it is there?

foreign keys in MariaDB

Hello there is a problem in phpadmin I have three tables student,group,student_to_group table student_to_group contains two f ... CONSTRAINT students_ibfk_1 FOREIGN KEY (id) REFERENCES students_to_group (student_id) ON DELETE CASCADE ON UPDATE NO ACTION)

Openfire installation, database creation

Setting openfire to ubuntu 16.04. Mysql version 15.1, distrib 10.0.38-MariaDB, version openfire 4.5.3. Reached the step where ... exist After that, the show tables command does not show the list of tables, so nothing was unloaded. How to deal with this?

How to join multiple rows in a table into one

There is an sql query select oi.order_item_name , oi.order_item_id, oim.meta_key ,oim.meta_value from idlf.wp_woocomm ... of the request is as follows How do I make _product_id, _qty, and _line_total appear on the same line for the same product?

which sql query is faster CASE WHEN THEN or ELT

Can you tell me which sql query will be executed faster - using CASE WHEN THEN or with ELT? There is a heavy, even very heavy ... t ... SET column=SET WHEN ... THEN ELSE column END. Very large and extremely slow to execute. Maybe using ELT will go faster?

I can't do partitioning of the table by month

There is a table: CREATE TABLE `Send-mail` ( `id` int(11) NOT NULL, `email` varchar(150) CHARACTER SET c ... s('2017-04-01')), PARTITION pmaxval VALUES LESS THAN MAXVALUE ); I changed it for myself, but I still don't like it...

How does BETWEEN work in MySQL?

Faced with a dilemma. In some situations, the BETWEEN statement includes the second date BEFORE, and in some it does not. Why ... происходит по двум датам за 28 и 29 (Field date in the database in DATE format, created_at in DATETIME) How does it work?

Is not allowed to connect to this MariaDB server

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [1130] Host 'xxx.xxx.xxx.xxx' is not all ... up? All rights to the user for remote connections are given, through Mysql Workbrench is normally connected. XAMPP server.

Group the rows of the SQL table and add the group ID

There are many (>100k) rows, you need to group them by the values of their columns and write the ID of the resulting group ... to the comma. If both strings match, assign them a unique identifier. groups. Is it possible to do this on a pure mysql ?

Qt QSqlQuery CREATE DATABASE

I am writing an application under the eight. I use MariaDB. Through HeidiSQL (client to MySQL) created a database. In my appl ... L error:" + query.lastError().text(); qDebug()<<"MySQL error code:"+ QString::number(query.lastError().number()); }

How do I create a user with rights to only one database?

I do it like this: $ mysql -u root -p mysql> create database your_db_name; mysql> grant usage on *.* to your_user@local ... s the third line do? Namely, what is *.*, and what is db_name.*? How to create a mysql user with rights to only one database?

Error creating foreign key in MariaDB

When trying to create the toy table, the following error appears: ERROR 1005 (HY000): can't create table brinquedos.brin ... iaDB documentation the default engine is InnoDB too, so I'm using InnoDB (I think). From now on I thank anyone who helps me.

How to import a csv file to MySQL?

I am starting my studies in MySQL. I decided to install MariaDB 10.1.14 on CentOS. I want to create a database from a file .c ... ror messages are not clear to me. I would appreciate it very much if someone could give me a light of how to solve this stop.

What is the difference between mysql-server and mysql-client?

It is said that using the Command apt-get install mariadb-server would also install mariadb-cliente. I understand that the s ... re the data persists, however I lack an understanding about the client. Still if pertinent, Are Mysql and Mariadb the same?

MySQL = MariaDB?

It has been a few days in which I sculpt in my classes the teacher saying: Oracle bought the MySQL and only renamed it t ... DB are not the same. After all, the DB MySQL is it the same thing as MariaDB? If not, what is the difference between them?

Is using specific data types like SMALLINT and MEDIUMINT instead of INT and marking columns with UNSIGNED an overkill?

Speaking of databases, we know that they have several data types to be used in each specific situation. But, following the da ... leaving aside and doing what everyone do. If you have something else that fits the question and you want to add, feel free.

Query sql INNER JOIN with WHERE and GROUP BY

And I have this query in my database, just want to add a sum that is in your a.preco_produto and GROUP BY if I put the GROUP ... roduto INNER JOIN lojas AS c on a.codigo_loja = c.cod_loja WHERE a.codigo_loja = 3 Limit 20 OFFSET 0 GROUP BY a.codigo_loja

INSERT with select where not EXISTS clause

I found in SOpt an answer for the same case as mine, but something unexpected happens as this is new to me, the SQL statement ... SELECT 1 FROM' at line 12 The question is, in MariaDB is the use of SELECT 1 possible? if that's not it, what should it be?