MySQL version 5.6 - please also tag with mysql for search purposes.

learn more… | top users | synonyms

0
votes
1answer
50 views

Don't know why MySQL is not creating table with primary key constraint [closed]

I can't understand why MySQL showing this error: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ...
3
votes
2answers
186 views

Different behavior between MySQL 5.5 and 5.6

I have this schema with data: CREATE TABLE `ticket` ( `id` INT NOT NULL, `name` VARCHAR(45) NULL, `type` INT(11) NULL, PRIMARY KEY (`id`)); CREATE TABLE `task` ( `id` int(11) NOT NULL, ...
1
vote
0answers
38 views

MySQL Event scheduler not generating CSV

The scheduler seems to be running from INFORMATION_SCHEMA.EVENTS but there is no CSV output. The event scheduler has to automatically produce a csv to pass on the data to another system. It's like ...
0
votes
0answers
12 views

How to create mail alerts in mysql replication environment?

if suppose In mysql replication environment Masterserver : @@readonlyflag has should be zero only,if it is changed as 1 means without notice.we need to set email alerts for that? is it possible to ...
0
votes
1answer
33 views

Why does this MySQL 5.6 stored procedure not compile with MySQL Workbench?

Why doesn't this MySQL 5.6 stored procedure compile with MySQL Workbench? CREATE PROCEDURE spDataLocationSetActive ( IN driveLetter varchar(1), IN active ...
0
votes
0answers
45 views

Install two instances of mysql 5.6 and 5.7

How to install two mysql servers on one Debian server? apt-get install libaio1 wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-server_5.7.11-1debian8_amd64.deb-bundle.tar tar -xvf ...
0
votes
0answers
16 views

MySql event scheduler skips events for several minutes: why?

I'm trying to diagnose some troubles on a couple of installations of a webapp that occasionally stop responding (Tomcat 7 and MySQL 5.6). Since the hangs only happen on one or two of these ...
0
votes
1answer
27 views

Mysql takes more tmp space than the table size

I have a mysql table with 2.8GB data+index size. I wanted to add a column to the table and it was failing due to insufficient space on /tmp. When I looked at the size available on /tmp it was 3.9GB. ...
1
vote
0answers
26 views

When are UPDATE / INSERT operations processed in Online DDL in MySQL 5.6?

MySQL 5.6 includes functionality called Online DDL which allows ALTER operations to proceed on tables without applying a LOCK to the table (technically referred to as allowing Concurrent DML). ...
0
votes
0answers
10 views

How to create Pivot table with dynamic columns in MySQL [duplicate]

I'm using the following table for storing dynamic form data data: Using the following query to select the records from my table SELECT response_no, ...
0
votes
0answers
28 views

mariadb can't import sql which contains \' in insert statement

i export a large db from mysql5.6, then i import into a mariadb (xampp) on my localhost by command line C:\Windows\System32>C:\xampp\mysql\bin\mysql -u root -p dbname < D:/folder/filename.sql ...
0
votes
0answers
11 views

MySQL disk usage due to failure on dump import

I've just SCPed a 400 MB database from a live server. I dumped it with mysqldump and gziped it as following: mysqldump --single-transaction=TRUE -u dbuser -p dbname | gzip> /home/user/database.gz ...
0
votes
1answer
40 views

Why do we need to compare keys from different table?

can you please help me make sense of this code? The question: is to find the pair of students who have registered for the same course in the same semester. why do I need to check the s1.sid = ...
1
vote
2answers
53 views

Contiunous rise of mysqld memory consumption

Mysqld memory consumption rises forever and never seems to be freed. It starts out about 6GB but gradually rises to around 10GB in a few weeks, and of the 10GB only 4GB and 50MB is being used by the ...
0
votes
0answers
26 views

How to enable load balancing on mysqlrouter for read/write queries?

I have installed a Mysqlrouter to be a load balancer for my databases. My databases are dual master MySQL with two slaves. I want to configure Mysqlrouter to redirect read/write queries on both ...
0
votes
1answer
34 views

Query not using indexes

I have a query which is not using the timestamp index and scanning 200 million records. I know that the query will not use the index if there is a function applied on top of it. However is there any ...
0
votes
1answer
48 views

Mysql Optimization Query

I'm looking for some expert advice on solving a few problems being reported by mysqltuner. We run a few Magento ecommerce sites. PX121-SSD server with Hetzner, 128gb RAM. Running Mysql (Percona) on ...
3
votes
1answer
60 views

InnoDB - Intermittent CPU spikes on a large database

I have a machine with a large MySQL 5.6 database (multiple tables with 10-100 million rows). It has a considerable amount of load, especially during the evening and is running on a 16 core machine. ...
0
votes
0answers
32 views

What is the difference between Microsoft SQL Server 2008 R2 and MySql Server 5.6 for handling Select ISNULL(MIN(StartDate, '1/1/1900 10:00'))?

I would like to know the difference between Microsoft SQL Server 2008 R2 and MySql Server 5.6 for parsing the following SQL statements. Microsoft SQL Server 2008 R2 SELECT ...
1
vote
1answer
32 views

Altering a large table to INNODB

I have a table of 4GB(18 Million Rows) in MYISAM Engine on one of my slave server, and I want to convert it to INNODB Engine, the server is replicating from a master. I tried to use the ...
0
votes
0answers
33 views

How to fix the MySQL 5.6 System.Security.Principal.WindowsIdentity.get_User () not implemented exception in Linux?

I would like to know if programmatic intervention is necessary to fix the following C# Runtime exception when running MySql 5.6 Connector.NET on Ubuntu Linux 15.10 instead of Windows 7. Error ...
0
votes
0answers
27 views

Query slow on 5 Mil fact table

I have a fact table with currently 5 mil rec. The record count will go up as ETL runs on daily basis. The below reporting dashboard query is taking 1.50 sec to execute. There are many number of ...
0
votes
2answers
31 views

MySQL Union not showing 2nd query result set

I am doing a union of 2 queries and trying to fetch data on two different columns, however the union is not fetching the value from 2nd result set. Can you please guide me on this. select * From ...
1
vote
0answers
29 views

Manually specifying candidate masters in Maxscale

Looking over the documentation, I haven't quite been able to find if its possible to manually set the candidate master status of a server in Maxscale. The reason I am looking for this is because some ...
1
vote
1answer
45 views

MaxScale not correctly recognizing new topology when we failover to a new master

So I currently have an architecture where we have one master and one slave and read/write splitting in Maxscale. When we fail the slave, Maxscale correctly recognizes it and displays the information ...
0
votes
0answers
76 views

Slow Insert in MySQL 5.6.29 Myisam Table

I am facing slow response times in MySQL 5.6.29 while Inserting/Updating MyISAM based tables. Queries are taking more then 40 sec and create "Waiting for table level lock" state. VM has 12 VCPU and 32 ...
0
votes
0answers
15 views

longblob insertion in MySQL

I use MYSQL 5.6.19-0ubuntu0.14.04.1 I insert a JSON String (for example {"a":"1","b":"2","c":"apple😀aeroplane"}) into a column in my table of UTF-8 encoding. Rough view of my table (i have changed ...
0
votes
0answers
47 views

begin end block in MySQL

I have a compound statement of begin end block consisting of some SQL statement as mentioned below. lab_name: BEGIN truncate table table_name; insert into table_name (a,b,c,d,e,f) ...
0
votes
0answers
28 views

Configuring my.cnf file and parameters calculations

Hi i am new in database administration and learning to configure my.cnf. Can anyone help me about parameters in my.cnf and what values should be set for each parameter, and what are the calculations ...
3
votes
1answer
59 views

How do we implement SQL Server IF EXISTS (SELECT) in MySQL 5.6?

We would like to convert the following SQL Server statement: IF EXISTS(SELECT OptionValue FROM Options WHERE OptionCatagory = 'General' AND OptionName = ...
6
votes
1answer
116 views

Non-grouping field error with ONLY_FULL_GROUP_BY mode and tables that have the same column name

I'm finding that MySQL seems to have an issue when ONLY_FULL_GROUP_BY mode is enabled and the query includes a HAVING that refers to grouped columns from different tables that have the same name. ...
1
vote
1answer
74 views

MySQL: JOIN empty tables with a constant value column, COUNT(*) returns a 0, but adding a GROUP BY on the constant value returns nothing?

Can someone explain why, when these tables are empty, the following query returns a COUNT(*) of 0 and a MAX(Timsestamp) of null... SELECT 'Combined', COUNT(*), MAX(Timestamp) FROM TableA JOIN TableB ...
3
votes
0answers
56 views

Read READ COMMITED transaction advantage in MySQL, high performance object model

I am writing high performance object model with READ COMMITED locking. My question is if there is any reason to starting READ ONLY transaction for read only operations vs. standard SELECT not ...
0
votes
0answers
14 views

MySQL ignoring my.cnf

So I have a Debian server that somebody else set up; I'm not sure what he did. It is Debian 7 with the dotdeb repos, and MySQL version 5.6 from the dotdeb. The problem is that MySQL is completely ...
1
vote
2answers
43 views

Get table sizes without SELECT permission

I want a scheduler to run a simple SQL script to collect the sizes of tables in our MySQL database: SELECT table_name, data_length, index_length FROM information_schema.TABLES The user the ...
0
votes
1answer
51 views

I would like to emulate the Microsoft SQL Server function GetSqlBinary() in MySQL version 5.6

I would like to emulate the Microsoft SQL Server function GetSqlBinary() in MySQL version 5.6. The C# namespace System.Data.SqlClient implements GetSqlBinary(), which is like fetching a blob.But the ...
1
vote
1answer
258 views

MySQL 5.6 Server start fails: InnoDB Operating system error number 23

I use a local MySQL 5.6 Server (InnoDB) on a Windows 7 machine to store several schemas of a research project. Until yesterday the system ran without problems. During a query, MySQL Workbench ...
0
votes
1answer
38 views

Could I use the SQL statement, SELECT * from sysobjects, with C# MySQL Connector - .NET?

I would like to port a SQL statement, SELECT * from sysobjects, written for Microsoft SQL Server to MySQL version 5.6. Could I use the SQL statement, SELECT * from sysobjects, with C# MySQL ...
0
votes
0answers
41 views

MySQL assertion errors after upgrade to 5.6

We've recently upgraded from 5.1 to 5.5 and then to 5.6. Since then we have database instances crash with following assertion error. I've also reported it as a bug with MySQL ...
0
votes
1answer
52 views

Transaction Identifier - possible with MySQL?

I have quite complex code, which at the beginning starts transaction. After that several user queries are performed (more or less without my control) and at the end the transaction is committed if ...
5
votes
0answers
102 views

insufficient history for index

In MySql log, there is one error `InnoDB: insufficient history for index 0' I don't know why its occur. I have done google and found following ...
3
votes
0answers
19 views

Cluster of Clusters (Not using MySQL-Cluster)

I'll start with an apology, I'm an Ops guy at heart, not a DBA, so I may use the wrong terminology, not in an effort to annoy, merely because I don't know any better. OK, that over with, on to the ...
3
votes
1answer
112 views

Improve performance of query with multiple group by column and count function in select

Brief Background of issue We have a aggregate table to store activities of competitors and this table have currently 3 Million activities and we need to retrieve data from this table group by ...
0
votes
0answers
41 views

MYISAM can't create table: Row size too large

We are having database in MySQL 5.1, we have taken the DB backup from MySQL 5.1 and trying to restore in MySQL 5.6. We are getting below error: ERROR 1118 (42000) at line 603: Row size too large. ...
1
vote
0answers
48 views

Disable/Remove Table Index for INSERT Performance

I am doing a database maintenance where I have to add new fields to a table with over 10GB of data about (20 million rows). To solve that I renamed tableA to be old_tableA and created a new table ...
1
vote
0answers
98 views

MySQL 5.6 Performance Tuning Issue

I have read and try lots of things about MySQL optimization and tuning. I tried most of them one by one according to our needs but nearly I got nothing. I am doing my test using some simulation ...
1
vote
1answer
58 views

InnoDB AUTO_INCREMENT resetting itself without MySQL restart

We've recently noticed the following scenario happening in many of our databases: A record is inserted, and receives an AUTO_INCREMENT primary key. The record is deleted. Another record is inserted, ...
0
votes
0answers
48 views

Replication Error_code: 1032

I an unable to fix this as I don't know what cause this error. Replication was stoped for maintenance activity and after completing the maintenance we started it and then after some point the ...
0
votes
0answers
18 views

Sum data from 3 tables(joining), but one of may no data then other tables data will show

I am making a stock group summary report for this I am making Sum data from 3 joining tables, but one of may no data then other tables data will show. I have 3 tables as: ac_stock_item, ...
0
votes
2answers
51 views

MySQL : How do I partition based on Month of date

I have a table having id as primary key and date column. I want to partition the data.. I felt month would be the best option so that I have 12 partitions.. How do I achieve that ! I am using mysql ...