FAQ Database Discussion Community


MySQL/MariaDB Trigger for Taking Ran Query and Pasting into a Row

mysql,database,sqlite,mariadb
So one of the projects I'm working on requires us to take every query that is ran on the server and automatically paste that query into a table inside of the database. The reason for this is so that the DBA is able to view all prior SQL Queries that...

Can't connect to MySQL/MariaDB database from vibed app

mysql,d,mariadb,vibed
All work fine if I use custom main ( void main() instead of shared static this() ). With default main I am getting "Access Violation" error. It's look like MySQL not allow connecting to it from localhost, but in my.ini I added string: bind-address = 127.0.0.1 code, if it's help:...

Join SQL confusion?

sql,mariadb
I was just wondering, can you have 2 ON statments in a join? I have something like: SELECT table1.col1, table2.col2 FROM table1 JOIN table2 ON table1.col1 = table2.col1 ON table1.col2 >= table2.col2; ...

MariaDB 10.0 with SphinxSE

mysql,node.js,full-text-search,sphinx,mariadb
I have a question about integrating Sphinx with MariaDB 10.0. The db comes packaged with the SphinxSE storage engine, but I'm having trouble finding detailed information about how to set this up. Consider the following scenario: I have a book-selling app using a database with the following tables: "Book", "Listing",...

MySQL: ERROR 1064 (42000) on trigger

mysql,mariadb
Could someone help me with this trigger please to find out what I am doing wrong. BTW sometime I didn't have this error... CREATE DEFINER = CURRENT_USER TRIGGER `domitik_db`.`disp_hdw_BEFORE_INSERT` BEFORE INSERT ON `disp_hdw` FOR EACH ROW BEGIN declare boxId int UNSIGNED; declare unitId VARCHAR; SET unitId=(SELECT homeunit FROM t_cpl WHERE...

read value from file then pass value in sql UPDATE command(python script)

python,mysql,mariadb
So hopefully an easy question although I'm having trouble putting it together using google. I have a windows application that writes values to a text file which I need to pull from text and send to mysql. I can manually do everything I need but having trouble pulling the value...

PHP loop - poor SQL performance

php,mysql,performance,pdo,mariadb
I'm looping through 40 associative arrays: array( 'key0' => value, 'url0' => value, 'tit0' => value, 'cdn0' => value, 'cdn1' => value, 'cdn2' => value, ) and I am performing multiple select and one possible insert queries. I tried to optimize the performance by reducing the amount of queries. foreach($buf){...

#1146 - Table 'phpmyadmin.pma__tracking' doesn't exist how to disable manually?

mysql,mysqli,phpmyadmin,mariadb
I received this error today in phpMyAdmin, 1146 - Table 'phpmyadmin.pma__tracking' doesn't exist nginx/1.6.2 | Database client version: libmysql - 5.5.41-MariaDB | PHP extension: mysqli It's rendered it inaccessible as whenever I try to create the table using SQL query i get that same error, #1146 - Table 'phpmyadmin.pma__tracking' doesn't...

MariaDB / MySQL pre-existing DB's

mysql,mariadb
I was wondering what these three pre-existing Database are for? information_schema mysql performance_schema I am interested to know whether or not I can remove them in a minimalistic environment without worrying about any ramifications....

Show range according to the number of points in PHP

php,mysql,sql,mariadb
I need advice. I have a simple while loop. And I have a table contestants. Each contestant has a total column [celkem]. These data excerpting the cycle while And I need that when you have two points as well, so it was always in range (see picture) The rest of...

Innacurate query with LIKE statement

mysql,mariadb,sql-like
Language is PHP, Database ORM is RedBean if(isset($get['last']) || isset($get['first'])){ $query = ''; $search_params = []; if(isset($get['first']) && !isset($get['last'])){ //search only with first name $query .= ' AND name LIKE :first '; $search_params[':first'] = '%'.$get['first'].'%'; $args['first'] = $get['first']; } else if(!isset($get['first']) && isset($get['last'])){ //search only with last name $query .=...

Maria DB (mysql) installation on Red Hat . How do I start service after installation

mysql,redhat,mariadb
I have installed mysql (maria db) on redhat. My question is - how do I start and stop the server? STEPS I ran the command $sudo yum install mysql It gave long messages in the console while installing and and at the end said Installed: mariadb.x86_64 1:5.5.41-2.el7_0 Dependency Installed: perl.x86_64...

How to prevent MariaDB from simplfiying logical expressions

view,mariadb,simplification
I'm having a very weird problem with MariaDB 10, it simplify automaticaly some logical expression !! here's an example CREATE VIEW test AS SELECT 1 FROM test_table WHERE NOT (1 < 2 OR 3 > 4); SHOW CREATE VIEW test; CREATE ALGORITHM = UNDEFINED DEFINER =`root`@`localhost` SQL SECURITY DEFINER VIEW...

ZF2 Doctrine Query With Multiple OR Conditions

symfony2,doctrine2,doctrine,mariadb
I've wrote the following Doctrine query: $query3 = $this->entityManager ->createQueryBuilder() ->select('t.textDomain , t.translationKey , t.languageIso , t.translationDate') ->from( 'AMDatabase\Entity\TheVerse\TranslationsMasters', 't' ) ->groupBy('t.languageIso') ->orderBy( 't.translationDate', 'DESC' ); // the values of $key2 array are: // en-US // es-MX // es-PR foreach( $translation AS $key2=>$value2 ) { if ( $key2 == 'en-US'...

Disallow NULL parameters to stored procedures in MySQL/MariaDB

mysql,stored-procedures,mariadb,stored-functions
I can specify that table columns are NOT NULL, but how do I make a stored procedure or function only be compatible with non-null arguments? Adding NOT NULL after the argument name doesn't work.

Is it possible to query an index in a MySQL/MariaDB database?

mysql,mariadb
I know that you can tell if an index exists in MySQL with a statement like SHOW INDEX FROM table1; but is it possible to actually query the index to check the state of the index, e.g. something along the lines of SELECT * FROM <index_name> And get a result...

Which is the better way of describing city selections in Maria DB

php,data,mariadb
There is a table of cities in my database. There is a table of clients and a table of forecasts for each city. Every client has a list of cities for which they require forecasts. I need to put these lists in the database for they are in text files...

Check if comma exists inside tag

mysql,regex,mariadb
I want to list all rows that contain a certain tag with multiple attributes. Eg.: [TAG=XX, YYY]ljasdljaslkdj[/TAG] (space is optional) I've tried this, but it doesn't return any rows: select * from oldtexts old WHERE old.content REGEXP "^\\[TAG=[A-Za-z][,][A-Za-z]\]" LIMIT 10 I only it to return tags with a comma inside...

MariaDB/MySQL: Get checksum of InnoDB table

mysql,innodb,mariadb,information-schema
How do I get a reliable checksum on an InnoDB table? I want something like the CHECKSUM TABLE foo QUICK; that MyISAM has, and it needs to be fast. I'm developing a tool to reliably monitor and swiftly react to changes in my database. InnoDB tables don't update UPDATE_TIME in...

MariaDB formatting view code

mysql,linux,view,formatting,mariadb
When i save view on mariadb on debian(6) I lose comments and formatting of code. What is this feature of mariadb? How turn if off? On windows instance all comments and formats are stored. Both instances is MariaDB 10.0.17. Managed with Heidi 9.1 from Windows. Edit 1. Semi solved. LOAD_FILE...

Determine tables that takes a part in the query result?

c++,mariadb,mariasql
I use libmariadb to communicate with mysql server. mysql_real_query - to execute queries mysql_store_result - to fetch result Is there a way to figure out from MYSQL_RES (or else), what tables takes a part in the query result? For example, for query SELECT name, number FROM person INNER JOIN phone...

Change column name in MariaDB

mariadb,spacebars
I have this column in this database with a spacebar included, which I want to change. ALTER TABLE . CHANGE COLUMN `Anzahl Personen` AnzahlPersonen int(11); After using this line in the command line the output is as following: ERROR 1064 (42000): You have an error in your SQL syntax; check...

Is there a limit on the number of rows I can update via an IN clause of a MySQL query? [duplicate]

php,mysql,sql,mariadb
This question already has an answer here: MySQL number of items within “in clause” 4 answers Is there a limit on the number of rows that I can update in a single query using an IN clause? For example: mysql_query("UPDATE `table` SET `row`=1 WHERE `id` IN(1,2,3,4,5,6,7,8....5000)"); Could I update...

input field showing an URL with quotes

php,mysql,quotes,mariadb,double-quotes
I have to store some Wikipedia URLs into a MariaDB database. It happens that some URLs contain quotes, like this one: https://en.wikipedia.org/wiki/%22Heroes%22 so I use urlencode() to store them as "en.wikipedia.org%2Fwiki%2F%22Heroes%22". If I urldecode() the URL, to show it inside an <input type="text"> field without all the % (they scare...

Apache (PHP) & Mysql - Ideal 2 Server Setup

php,mysql,apache,centos,mariadb
My client currently has only one server with both MySql and Apache running on it, and at busy times of the year they're occasionally seeing Apache fall over as it has so many connections. They run two applications; their busy public ecommerce PHP based website and their (busy during working...

Speed up SQL SELECT with arithmetic and geometric calculations

mysql,sql,database-performance,mariadb
This is a follow-up to my previous post How to improve wind data SQL query performance. I have expanded the SQL statement to also perform the first part in the calculation of the average wind direction using circular statistics. This means that I want to calculate the average of the...

How to choose indexes

sql,indexing,mariadb
I'm trying to execute several times the following query : SELECT st2.stop_id AS to_stop_id, TIME_TO_SEC( ADDTIME(TIMEDIFF(MIN(st1.time), %time), TIMEDIFF(st2.time, st2.time))) AS duration FROM stop_times st1, stop_times st2, trips tr, calendar cal WHERE tr.service_id = cal.service_id AND tr.trip_id = st1.trip_id AND st1.trip_id = st2.trip_id AND st1.stop_id = %sid AND st1.stop_seq +1 =...

Different ResultSet in MySQL and MariaDB Using GROUP BY and ORDER BY

mysql,group-by,sql-order-by,mariadb
I have a table: voj_submission with following structure: CREATE TABLE IF NOT EXISTS `voj_submissions` ( `submission_id` bigint(20) NOT NULL, `problem_id` bigint(20) NOT NULL, `uid` bigint(20) NOT NULL, `submission_judge_result` varchar(8) DEFAULT NULL, ) ENGINE=InnoDB AUTO_INCREMENT=1004 DEFAULT CHARSET=utf8; And the data in the table may like this: SubmissionID ProblemID UserID JudgeResult 1000...

MariaDB Dynamic Column Nesting

nosql,mariadb
I have been searching for this for a couple of hours. I have setup a MariaDB server and am implementing Dynamic Columns, which I know how to do, but I can't seem to find out how to go more than one level deep. INSERT INTO Invoices (Invoice) VALUES ( COLUMN_CREATE...

not letting me insert values with a where clause

php,mysql,pdo,where,mariadb
I'm making forums and I'm trying to make it so when you reply to a topic it will put the reply information in a table (WHICH WORKS) and then it will INSERT values into the subcategories table WHERE the subcategories ID is equal to this subcategories ID. CODE: $query =...

sorting via order by and row_number via user variable in mariadb

mysql,variables,sql-order-by,mariadb,temp-tables
I've read that any order by Operation is done at the end of the query and therefore sorting cannot be forced in a result before. So what I'm trying to achive is to get only one record from a result with duplicates by using variables which assign row numbers and...

How do I group only the last `n` rows?

mysql,sql,group,mariadb
Take the following table: id - member_id - day 0 1 1 1 1 1 2 1 2 3 2 2 4 1 3 5 2 3 6 2 3 7 1 3 8 1 3 9 2 3 Lets say I want to do something like: SELECT `day`, COUNT(`id`)...

Delete all foreign keys in mysql database

mysql,sql,mariadb
I can see that there are some questions [1,2] that already ask for this, but where the solution didn't contain a complete SQL script to do this task. I have a situation where it would be very helpful to delete all foreign keys using SQL only. Currently I'm trying to...

Using PyMySQL with MariaDB

python,mysql,mariadb
I have read this article about switching from MySQL to MariaDB on Ubuntu. The article claims that it would be not problem to switch between the two. Currently, I am using PyMySQL to connect to my MySQL database and insert, update and delete values from it. My question is: can...

Symfony2 can't connect to MySQL server on '192.168.1.50' (113)

php,mysql,symfony2,centos,mariadb
I have remote mysql server @192.168.1.50. I can access it through [http://192.168.1.50/phpmyadmin/] on my pc, or by using ssh [email protected] But in Symfony2 when I run php app/console doctrine:schema:update --force gives me error [PDOException] SQLSTATE[HY000] [2003] Can't connect to MySQL server on '192.168.1.50' (113 ) my parameter.yml parameters: database_driver: pdo_mysql...

MySQL / MariaDB unique BLOB of fixed length

mysql,blob,biginteger,mariadb
I need a 16-byte binary data column to be unique. Why can't a BLOB(16) be unique in MySQL and MariaDB, when it supports unique VARCHAR? That this is supported but not a fixed-length set of bytes seems nuts. Also, it's not acceptable to waste space by storing a binary value...

Convert Subquery SQL to Laravel possible?

php,laravel,mariadb
Is this possible to change this SQL to let it work on Laravel? SELECT name, event,m.season_id, tm.played_pugs, active, m.created_at, datediff(now(),m.created_at) FROM matchs m LEFT OUTER JOIN seasons ON seasons.id = m.season_id JOIN ( SELECT season_id, max(matchs.created_at) as MaxDate, count(season_id) as played_pugs FROM matchs GROUP BY season_id) tm on m.season_id =...

Doctrine DBAL - Transaction and inserts outside transaction

php,mysql,orm,mariadb,dbal
Hello I have service which works in transactions, it's communicating with remote API and I want to log every request/response in this API, but if main transaction rollback, any logs will be rollbacked too. What I think is to clone DBAL connection. Will it open second connection with no transaction...

Maximum possible memory usage: 307.9G (244% of installed RAM)

mysql,mariadb
What is the recommended configuration for server dedicated 128 GB of RAM my.cnf [mysqld] datadir="/home/mysql" default-storage-engine=MyISAM innodb_file_per_table=1 max_allowed_packet=268435456 innodb_buffer_pool_size = 94G innodb_buffer_pool_instances = 12 innodb_open_files=20000 innodb_io_capacity=10000 innodb_io_capacity_max=25000 innodb_read_io_threads=8 innodb_write_io_threads=8 innodb_flush_log_at_trx_commit=2 innodb_max_dirty_pages_pct = 90 open_files_limit=100000 interactive_timeout=60 wait_timeout=60 max_connections=20000...

How to use MariaDB's REGEXP_REPLACE?

mariadb
I have read the docs for MariaDB's REGEX_REPLACE but cannot get my query to work. I am storing links in a column, link and want to change the end of the link: From www.example.com/<code> to www.example.com/#/results/<code> where <code> is some hexidecimal hash, e.g. 55770abb384c06ee00e0c579. What I am trying is: SELECT...

Is it ok to mix storage engines on same database?

mysql,opencart,collation,mariadb,storage-engines
I have an OpenCart project with about 50,000 products in the database. I've switched the web hosting from a VPS to a dedicated server and I've seen some improvements, but still the website is laggy. On the VPS all the tables were MyISAM with latin1_swedish_ci collation on mysql 5.1.x.x ....

Is there a native C++ connector for mariadb/mysql that is not just a wrapper for an older c connector? [closed]

c++,mariadb,mysql-connector
Has anyone released a native c++ connector for mariadb/mysql that is not a wrapper for a c connector api? I've googled around and can't find anything. The reason I ask is to judge the ultimate value of using a c++ connector versus just implementing the c connector itself without the...

Does Maria DB support ANSI-89 join syntax

sql,database,join,syntax,mariadb
Does Maria DB support ansi-89 join syntax? SELECT sites.site_id, sites.site_name, pages.page_id, pages.page_title FROM sites, pages WHERE sites.site_id = pages.site_id; or only ansi-92 syntax? SELECT sites.site_id, sites.site_name, pages.page_id, pages.page_title FROM sites INNER JOIN pages ON sites.site_id = pages.site_id; ...

Strange syntax error when changing type of a column

mariadb
I'm trying to change the type of 2 columns. The first works but the second gives a syntax error for the same command: > show full columns from KernelParams; +-------+------------------+-------------------+------+-----+---------+----------------+---------------------------------+---------+ | Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment | +-------+------------------+-------------------+------+-----+---------+----------------+---------------------------------+---------+...

Laravel 5 application can't connect MariaDB engine in docker container

docker,laravel-5,mariadb
I create a new Laravel 5 application in a docker container. I can access the home url and get the welcome message. I try create new routes and they are working too. Then I run a MariaDB docker container to link to the Laravel 5 application. Here is where the...

php/SQL returns NULL

php,mysql,sql,mariadb
I'll be the first to admit I'm an idiot, but is there any reason for why this query returns NULL? The connection to the DB is working just fine and I'm able to POST to it. <?php $servername = "server"; $username = "user"; $password = "pass"; $dbname = "db-name"; //...

MariaDB install: I unchecked running as service during installation. What is correct way to start and stop mariadb?

mysql,mariadb
Now, I don't know how to start mariadb since I didn't install it as a running service. This didn't help me: https://mariadb.com/kb/en/mariadb/starting-and-stopping-mariadb/ I googled and thought this would work to set it as a service: C:\Program Files\MariaDB 10.0\bin>mysql_install_db.exe --datadir=c:\mariadb --service=MyDB --password=secret Running bootstrap Removing default user Setting root password Creating...

mysqli_fetch_array($link, $query) is not outputting the expected result when querying database directly

php,mysql,arrays,mariadb
I am trying to create an array of the table comments per column_name, where column_name is the key. I go to my mysql database (Maria DB) and enter the query SELECT column_name, column_comment FROM information_schema.columns WHERE table_name='apple_checklists' and it returns two columns of information: when I use the phpcode: $columnCommentQuery...

Unable to connect to mariadb database server with qt 4.8.5 and Ubuntu 12.04

mysql,qt,ubuntu,mariadb
I use the following code to connect to a MySQL server database. QSqlDatabase db_Server = QSqlDatabase::database("Test"); //find mysql driver db_Server = QSqlDatabase::addDatabase("QMYSQL","Test"); db_Server.setHostName("188.**.***.***"); db_Server.setPort(3306); db_Server.setDatabaseName("Test"); db_Server.setUserName("Test"); db_Server.setPassword("*********"); bool ret = db_Server.open(); if(ret) qDebug() << "Database open" else qDebug() << db_Server.lastError().text(); Lately they changed the server to mariadb and I assumed...

Advanced MySQL left join IFNULL Query

mysql,mariadb
I am looking for help with an advanced MySQL query. My current query, shown below, works fine. I would like to add an additional field, so I don't have to create a separate query. The new field, count(TableA.Field05), should result in the total number of records from TableA. TableA has...

Query performance - 'Left join is null' vs 'Not exists select'

mariadb
I have a question about a query that I want to execute, but I dont know what is the best qua performance. I need to get all the words exclude the words that have a relation with the table wordfilter. The output of the queries is right, but maybe there...

MYSQL - Optimise query to proceed as fast as possible

mysql,sql,optimization,mariadb
im forcing now performance problems in my service due high and still growing traffic. this is my sql query SELECT * FROM $db1 WHERE userid!='$userid' AND media NOT IN (SELECT media FROM $db2 WHERE uid='$userid') ORDER BY active ASC LIMIT 60 This is very poorly optimised. It was working good...

How do i add some data to a mysql resultset? [closed]

php,mysql,google-maps,mariadb
As the first comment suggested, i'm gonna try to simplify my question: I got this table: `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `name` VARCHAR( 60 ) NOT NULL , `address` VARCHAR( 80 ) NOT NULL , `coords` SPATIAL NOT NULL , `qual` INT(3) NOT NULL; I got this...

Order by COUNT(something) vs order by #column (sqlzoo example)

mysql,sql,mariadb
I was trying to solve problem 15 under http://sqlzoo.net/wiki/More_JOIN_operations I don't understand why my query is wrong, even though my output is like it's supposed to be. Here's my query: SELECT movie.title, COUNT(actorid) FROM movie JOIN casting on movie.id=movieid WHERE yr='1978' GROUP BY casting.movieid ORDER BY COUNT(casting.actorid) DESC And the...

MariaDB, Workbench, and ON DELETE SET DEFAULT

mysql,mysql-workbench,mariadb
I have a non-nullable foreign key that I need to be set to default on a delete of the other table. I'm using MariaDB, and exporting the SQL script from a model in MySQL Workbench. MariaDB supports ON DELETE SET DEFAULT according to https://mariadb.com/kb/en/sql-99/constraint_type-foreign-key-constraint/ MySQL documentation says that while it's...

MariaDB convert_tz maketime

date,mariadb
When I run this query select convert_tz( concat( (`last_mailing` + interval 1 day), ' ', maketime(`email_delivery_hour`,0,0) ), 'EST','GMT') FROM `member_subscriptions` the date - time stamps returned include fractions of a second, such as 2014-07-01 05:00:00.000000 I need the date - time to return in the format YYYY-MM-DD HH:II:SS last_mailing is...

Open source Windows GUI for MariaDB

user-interface,mariadb
Is there any open source client GUI for windows operation system to manage MariaDB databases?

How to create a sails.js skeleton so I can quickly build new apps with common goals?

node.js,mongodb,sass,sails.js,mariadb
This is more for some fun and playing around with, but hopefully should produce something useful. I would like to extend sails.js framework so that when I generate a new app using 'sails new project-name' it will already have a lot of previous configurations or modules added. For example, with...

Comparing date in sql with custom date

python,sql-server,mariadb,erpnext,frappe
I was trying to compare a custom date with date field in sql.I done the following query but it returned an error and rightfully so. I have my date value in date1 and want to comapare it with sale.posting_date.I tried reading the related posts here,but no use.Can anyone help me?...

MariaDB Slave Error - String is too long for MASTER_HOST

mysql,amazon-web-services,database-replication,mariadb
I'm attempting to replicate an AWS RDS instance with MariaDB. For those not familiar, RDS instances have extremely long DNS hostnames and cannot be accessed by their underlying IP address. When it comes time to issue the "change master" command, I receive the following error: String 'my rds dns name'...

insert into database unknown error

mysql,database,mariadb
I am trying to do a simple insert into database but cannot find where the problem is. If anyone could help would be great please. My code: if(isset($_POST['s1'])) { $q1 = "INSERT INTO tienda (title,desc) VALUES ('$title', '$desc')"; mysql_query($q1) or die(mysql_error()); echo "<div class=alert fade in><b>Group added!</b></div>"; } The field...

MySQL/MariaDB slow UPDATE on PRIMARY KEY

mysql,sql,query-optimization,innodb,mariadb
Query: UPDATE `cart` SET `user_id` = NULL, `completed` = 0 WHERE `id` = 6948; Query OK, 0 rows affected (1.21 sec) Rows matched: 1 Changed: 0 Warnings: 0 0 rows affected, but it took 1210ms. SELECT of this row by id always took 0ms. Table size is (6,354 rows). >...

Error when configuring MariaDB driver on Wildfly server

java,jboss,mariadb,wildfly-8
I am trying to configure a MariaDB datasource on Wildfly. This seems like it should be a simple operation, but I can't seem to get the datasource module to load properly. I have added the maria-java-client-1.1.8.jar archive and a module.xml file to the wildfly-8.2.0.Final/modules/com/mariadb/main directory. The module.xml file is as...

PHP / MYSQL connection failures under heavy load through mysql.sock

php,mysql,mariadb,file-descriptor
I've done quite a bit of reading before asking this, so let me preface by saying I am not running out of connections, or memory, or cpu, and from what I can tell, I am not running out of file descriptors either. Here's what PHP throws at me when MySQL...

Is this query really unsafe?

mysql,sql,database,mariadb
The following query is executing as desired however when i execute via my remote admin tool (heidisql) I am receiving a message that states: Note: Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting...

“Insert…select” transactions with multiple values and normalized database

mysql,sql,database,normalization,mariadb
This question properly explains how to simultaneously insert data in a database for "hierarchical" structures (is-a relationship). 74 down vote accepted No, you can't insert into multiple tables in one MySQL command. You can however use transactions. BEGIN; INSERT INTO base_class (data0, data1) VALUES('0', '1'); INSERT INTO derived_class (base_id, data2,...

Can't find FULLTEXT index while using IN BOOLEAN MODE

mysql,sql,full-text-search,mariadb,match-against
I'm trying to filter some data with an MATCH ... AGAINST WHERE clause. But I get the following error: Can't find FULLTEXT index matching the column list This is an query I execute: SELECT PAR.idPartij, PAR.Partijnaam, PRO.Productnaam, PER.Perceel, R.Ras, PAR.TagNR FROM Partij AS PAR LEFT OUTER JOIN Product AS PRO...

add record if id is not known else update the record

mysql,sql,mariadb
I have the following table in mariadb: -id = key which shall autoincrement -price -amount -name -order_id order_id can appear twice in the table but the combination of name and order_id should be unique. I now have a combination of name and order_id. What I want to do is to...

MariaDB CommunicationsException: Communications link failure

mysql,jdbc,mariadb
There seems to be enough of questions relating to CommunicationsException were posted on Stackoverflow. But none of them helps me out of a difficult position. I installed MariaDB 5.5 in my CentOS 7 server, and configured everything so that I can connect to the DB server remotely through a MySQL...

Are there downsides of using & inside Bash scripts?

mysql,linux,bash,mariadb
I am making a script that should install MariaDB/MySQL server and then create users and such. For this I need mysqld_safe to be running, which doesn't have a daemon mode, so the script won't continue. Doing mysqld_safe & works it seams. /usr/bin/mysqld_safe > /dev/null 2>&1 & RET=1 while [[ RET...