All versions of MySQL (not Microsoft SQL Server). Please also add a version-specific tag like mysql-5.7 if that is relevant to the question.

learn more… | top users | synonyms

1
vote
0answers
38 views

Classic vs. GTID replication MySQL 5.6 - how to identity which one used from errors?

Is that true? In classic replication (SQL_SLAVE_SKIP_COUNTER=1) you never see UUIDs in logs and show slave status like 3e11fa47-71ca-11e1-9e33-c80aa9429562:1-5? When you see an UUID, there is GTID ...
1
vote
0answers
33 views

The time is wrong in MySQL “data/*.err” file

I use "select now();" in MySQL client, the return time is right, is my system time. But the time in the "data/g1.err" is wrong, the "g1" is my computer name. The time's minute is right, so I think ...
1
vote
0answers
36 views

Multiple columns VS one big-capacity-column?

I have a table like this: // table_A +--------+---------------+------------+ | id | short-text | long-text | +--------+---------------+------------+ int(11) varchar(200) text ...
1
vote
0answers
20 views

Automatic incremental backup of MySql on windows

I have three Mysql Servers, Server-1, Server-2 and Server-3 all running on Windows. I have to configure Master-Master replication on Server-2 and Server-3. But Server-2 has to be a mirror of Server-1....
1
vote
0answers
49 views

mysql innodb - strange data loss

I am running a mysql database on linux with several InnoDB tables. At some point, the ibdata1 file got quite big and I wanted to delete it. So I made a dump, deleted the file and restarted the server. ...
1
vote
0answers
38 views

Most Similar Records Query Performance

I have a mysql database table with 20 million records. It grows at roughly 25,000 records per day. Each record has a number of numeric fields. I have a similarity query that selects the 10 most ...
1
vote
0answers
49 views

Mysql Cluster Disk Storage Problem

We are currently create a Mysql Cluster with ndb distribution storage. We have a very large set of data so we want to config the ndb using the tablespace to store data in disk. I follow this link to ...
1
vote
0answers
33 views

Tracking MySQL DML Operations Source

We have a table that will get inserts and updates from 10 different jobs. We need to track each DML operation with its source i.e job name. We have used audit tables and triggers to get old and new ...
1
vote
0answers
29 views

MySQL using cpu after cancelling slow query

I had to cancel a very slow running query after it ran for a few days without completing on my ubuntu server. Since then mysql has been persistently running a process which is using 25-45% of the cpu ...
1
vote
0answers
56 views

Is this query actually working?

This is from show engine innodb status ---TRANSACTION 4FF4, ACTIVE 43350 sec, OS thread id 6232 fetching rows mysql tables in use 2, locked 2 480318 lock struct(s), heap size 46578104, 48647170 row ...
1
vote
0answers
91 views

High load on server because of one query

I have one query running from last stable version of wordpress on causing high load on my centos 6.7 server I enabled slow query log thought /etc/my.cnf file to record which sql cause this problem ...
1
vote
0answers
26 views

Mysql trigger with group_concat

I'm trying to create insert and update triggers with SELECT GROUP_CONCAT request on one of the fields; This select query perfectly works, when I trying it in console, but trigger saves only first ...
1
vote
0answers
3k views

mysqld upgrade 5.5 -> 5.6 mysql Error: Failed while fetching Server version! Could be due to unauthorized access

After updating mysql with yum to 5.6 I am getting such an error message when trying to run mysql [root@host rpm]# mysql_upgrade Looking for 'mysql' as: mysql Looking for 'mysqlcheck' as: mysqlcheck ...
1
vote
0answers
66 views

pt-table-sync - Resync non existing table

I created my little lab where I can try different setup/scenarios. I have four machines debootsraped/chroot and this is my current layout: | Master A | < ---- > | Master B | | | Slave C | ...
1
vote
0answers
57 views

After disabling replication, should I disable binary logging?

I have a master-slave setup currently but am going to remove the replication DB server. The DBs are running on MySQL 5.6. I have a couple of questions about removing the replication: 1) I have read ...
1
vote
0answers
78 views

Is a 16,000 table database a bad idea?

I need to track stock prices for all 8,000+ stocks on the NYSE, AMX, and NASDAQ for at least 48 hours at a time, with stock price quotes for each stock every 2-4 minutes (less than a 5 minute period). ...
1
vote
0answers
33 views

Pushing pointers to followers with the metadata (MySQL Query)

I’ve seen the following question on StackOverflow, http://stackoverflow.com/questions/14004322/intelligent-mysql-group-by-for-activity-streams posted by Christian Owens 12/12/12. So I decided to try ...
1
vote
0answers
48 views

Moving to innodb_file_per_table?

I have just noticed (unfortunately while trying to restore from backup), that on my production server there is a 35GB ibdata1 file! As I understand I can reduce its size by moving to ...
1
vote
0answers
75 views

Alternative to EAV to store data with an unknown structure

For my bachelor thesis I have to build a reseach database which has to meet the requirement of provenance. In the present case it means that among other things I have to store the results of my ...
1
vote
0answers
55 views

Optimizing a group by/where in/min() query in MySQL

Assume I have a table that looks like such (The actual column names of my real table would only make things harder to explain, so I have created a mimic that behaves similarly). id | cond1 | cond2 ...
1
vote
0answers
44 views

MySQL Foreign Key Not Cascading On Delete

I have 2 tables, coupon: CREATE TABLE `coupon` ( `coupon_id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `code` varchar(10) COLLATE utf8_unicode_ci ...
1
vote
0answers
23 views

MATCH(title) AGAINST('test 11' IN BOOLEAN MODE) can't search number

SELECT *, MATCH(title) AGAINST('test 11' IN BOOLEAN MODE) AS Score FROM search_table WHERE `date` > DATE_SUB(NOW(), INTERVAL 1 MONTH) AND MATCH(title) AGAINST('test 11' IN BOOLEAN MODE) ...
1
vote
0answers
259 views

Random Spikes in DB Connections - Amazon RDS

I'm running an EC2 instance (c3.large) with an RDS instance (db.t2.small). I'm frequently having issues with DB Connections spikes all of a sudden. PROBLEM: As you can see, I'm getting huge ...
1
vote
0answers
165 views

mariadb galera cluster stop one node automaticly

I have Mariadb galera cluster. I have 4 nodes. but When one node become slow, it stop itself automaticly. that's the error. What should I do? 151030 17:17:14 [Note] WSREP: view((empty)) 151030 17:17:...
1
vote
0answers
75 views

Proper database configuration

I'm running MySQL 5.5 on Debian 7.8. My entire DB is 2200 MB large (all tables are InnoDB), the mysql process is taking up to 6G RAM but still I think that not evrything is loaded in RAM I have large ...
1
vote
0answers
245 views

`lc_time_names` has no effect

I have a Windows MySQL server running (5.6), and in the my.ini file I have the following directive under [mysqld]: lc_time_names = 'fr_FR'; But it has ZERO effect. When I start up the server, all ...
1
vote
0answers
48 views

Get a parent and the children using a child ID or the parent ID

I have a hierarchical table with 2 levels of depth – that is, parents and children. Having a parent ID, I want to extract the parent and its children. Having a child ID, I want to extract the parent ...
1
vote
0answers
52 views

Matching same unknown characters in two columns

So here is the situation. I have a database with values in columns that look something like this field_0_data1, field_0_data2, field_1_data1, field_1_data2 Is it possible to only select the columns ...
1
vote
0answers
46 views

Find the last record of group of overlapped records

I have a little dilemma with filtering out result. The result and what I want to achieve is not very trivial and I didn't find an answer anywhere after extensive search. So here is my problem: I ...
1
vote
0answers
72 views

Restoring MySQL Master-Master Replication

I am trying to restore Master-Master MySQL 5.6 servers. The replication failed between DB1=>DB2 and so DB2 went out of sync. GTIDs are enabled. I have done an export and import from DB1 to DB2 and ...
1
vote
0answers
55 views

Inexplicable differences between 2 almost identical databases on the same server

Our situation is as follows: We've got 1 MySQL (5.5.44) database server. The server hosts 2 databases. 1 database is the production database. The other is a copy database that gets copied from ...
1
vote
0answers
63 views

Design pattern for storing a database of databases

I have been tasked with designing a cloud platform that allows a user to manage the menus of a chain of restaurants from one place. The menus are basically massive TVs at the ordering counter. These ...
1
vote
0answers
65 views

Whats the difference between the following queries? Getting the top 3 salaries for different department

I am practicing SQL and came across this issue. I am trying to find the top 3 salaries for each department. The table structure is basic with one employee table with columns (Id,name,Salary,...
1
vote
0answers
46 views

MySql - view out params of stored procedure when it selects from table

I have stored procedure: DELIMITER // CREATE PROCEDURE prcGetFemaleUsers() begin select firstName, lastName from tblUser where gender = 'female'; end // DELIMITER ; How can I get ...
1
vote
0answers
150 views

How to auto populate a foreign table?

This problem has been bothering me for some time now and honestly i feel like i just don't know how to solve it.I have been trying to solve it for over a week or probably two . It's pretty simple but ...
1
vote
0answers
131 views

phpmyAdmin doesn't display one table's data

Sorry if this sounds like a very basic question but I couldn't find the answer on this site or with web searches. I have a table in my database that have this structure: And these indexes: It ...
1
vote
0answers
72 views

How to import Sqlite database into another Sqlite database?

Hello everyone I am developing Desktop Application and using the WebSql Database this database is created into this path: C:\Users\Admin\AppData\Local\Google\Chrome\User Data\Default\databases\...
1
vote
0answers
55 views

how to group transaction entries?

I have this transactions table on my dvd store app: Transactions +----+-----------+--------------------+---------+------------------------+-----------------------------------------+ | id | member_id ...
1
vote
0answers
185 views

Mariadb alongside MySQL Can't start the MariaDB

I'm running MySQL on ubuntu 14.04 and it works great. For development and testing before switching between the two I want to install a separate Mariadb server. I followed this (old) tutorial: ...
1
vote
0answers
36 views

Which hosting technology is suitable for large data with limited index

I have a scenario where I have to host very large amount of data in database type solution. The amount of data is very very large. When I try to host it in mysql database the size increases as mysql ...
1
vote
0answers
302 views

Quotation and invoice mysql table

I am trying to develop a small business web application for my friends business. I do have some php,html experience so I have done the interface and all. Now I am trying to work on the database. The ...
1
vote
0answers
4k views

MySql 5.6 error (Table 'mysql.user' doesn't exist) when started as a daemon

We can't seem to get the MySql daemon to start when using the included init script... A clean install on linux (ubuntu 14.04) was done using the generic MySql binary tarball. The following post-...
1
vote
0answers
77 views

changing mysql configuration . Getting errors like Table is marked as crashed and should be repaired

On Our server I have done following configuration for Database: [server has 2 core, 2 GB ram and windows 2008 operating system] query_cache_size= 32M [Old] query_cache_size= 50M ...
1
vote
0answers
31 views

Table metadata auto_increment value for table modification

if table X is modified(DELETE, INSERT, UPDATE) then table X's metadata value should get incremented. I can write trigger for the same. But inbuilt solution will be better. This way I can stop ...
1
vote
0answers
85 views

mysql datetime timezone +0000

I've got a Twitter database and some columns in multiple tables are time-stamps like: Tue Sep 09 23:48:37 +0000 2014 These columns are TEXT so I want to convert them. I read Date and Time Types, ...
1
vote
0answers
119 views

How to configure correctly Mysql heavy used server to prevent it from write IO huge spikes?

I have mysql 5.6 server which handles thousands of users online. All tables are Innodb. The problem is, that once or twice a day it writes huge amount of data to disk, or it slows down a lot. Than ...
1
vote
0answers
249 views

Poor performance after switching from EC2 Percona to RDS MySQL. What am I missing?

Current RDS Setup: db.r3.2xlarge running in Multi-AZ, 8 VCPU, 61GB RAM, 1500GB EBS Volume with 5000PIOPS, Mysql5.6 Here are our current MySQL variable values: https://gist.github.com/jonhatalla/...
1
vote
0answers
30 views

Source dump interrupted by computer restart

I'm have a wamp server installed on my windows machine (apache 2.4.9, mySQL 5.6, php 5.5, PHPmyAdmin 4.1). I was recently performing a source dump operation to restore a tables in a database. ...
1
vote
0answers
128 views

What causes the creation of such a large number of Galera cache files?

I manage a Percona XtraDB 3-node cluster. Recently the MySQL datadir of one of the nodes (not the one from which the cluster has been bootstrapped) started being filled up with gcache.page.00nnnn ...
1
vote
0answers
26 views

MySQL - Join on proceedure result - recommendations on what I should do?

I have already read that this CANNOT be done. I'm looking for an alternative. Short problem I have a really long SQL query (with a union) and I want to use it like a view (hide the union and ...