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

learn more… | top users | synonyms

-2
votes
0answers
10 views

date wise convert row to column with sum of amount in mysql

i want dynamic table for dynamic date wise with sum of amount....plz help me guys.. Thanks in advance
3
votes
0answers
19 views

MySQL Innodb_row_lock_current_waits is 2^64 - 1

I have a MySQL 5.6 server which we monitor using Nagios. Over the weekend, it's started complaining about the Innodb_row_lock_current_waits, which currently has a value of 18446744073709551615, yes, ...
1
vote
0answers
13 views

Mysql InnoDB relations vanish when exporting/importing to online database

My issue is the following : I have a local database running on EasyPhp server : WEB serv : Apache/2.4.7 (Win32) PHP/5.5.8 DB serv : 5.6.15-log - MySQL Community Server (GPL) PHPMYADMIN : version 4.1....
1
vote
1answer
29 views

ERROR 1091 (42000): Can't DROP 'PRIMARY'; on “mysql_upgrade”

I updated MySQL from 5.5.50 to 5.6.31 on a Centos 6.8 box with Plesk 12.5.30. Using those steps. The upgrade was successful but I ran into trouble with mysql_upgrade. I had to rebuild the permission ...
1
vote
1answer
26 views

Sync two mysql database one in intranet and the other on internet

I'm making the training and placement module for my college. But I'm facing problems to sync the databases, one that will be used by the students and the other that will be used by the HR of a company....
1
vote
0answers
43 views

MySQL Load Balancing what do i need Replication or Cluster?

So My MySQL database server is reaching it's limits with the number of queries selects, updates, inserts etc it can concurrently take resulting in high CPU usage more than what a single machine can ...
1
vote
0answers
41 views

MySQL – BLObs Hitting Performance

One of my tables contains seven BLObs. Six of these refer to raw data and are typically 1.0 – 1.5Mb each. The seventh is the result of processing this data and can be nearly equal in size to the sum ...
0
votes
0answers
55 views

MySQL: Log only 'select' queries executed on a specific set of tables of a database

I have a Magento site in which I want to log only SELECT queries(after SELECT it could be any column or all columns, in short all SELECT statements) executed on a specific set of tables, also as it's ...
0
votes
1answer
39 views

how to deal with mysql 500 million data per month?

this is a interview question a telecom billing system, there is a internet flow table (phone_number,start_time,stop_time,time_lasting,fare),500 million records per month(2G),every record size is 300K,...
0
votes
0answers
25 views

counting and sorting join mysql

i have table like bellow it store of amount of buys of each user +--------+----------+ | userid | amount | +--------+----------+ | 1 | 1000000 | | 2 | 80000000 | | 3 | 7000000 | | ...
0
votes
2answers
41 views

Query to retrieve index details for a particular column in all tables

There is a column created_at in most of tables. I would like to get the details if that field exists in the table and it is not indexed. Is there any thing can be done with the information_schema to ...
0
votes
0answers
44 views

MySQL DB server had restarted automatically

We are using MySQL 5.6.27 version and Amazon AWS instance for a database server with the configuration given below: innodb_buffer_pool_size = 40G innodb_buffer_pool_instances = 40 ...
1
vote
0answers
28 views

“SHOW TABLES” command returning tables not in the schema

I was debugging a backup script at work and noticed that for some of our bigger tables (greater than 5GB), I'm noticing an odd discrepancy. If I run the command mysql -h $host -u $user -p $pass -e '...
0
votes
1answer
39 views

how to update information_schema.tables in mysql [duplicate]

i have a table A and i want to update the creation time of this table. I understand i cant simple update ( using update query) as it is not any table. Is there any way i can update it. for example ...
1
vote
2answers
89 views

MySQL doesn't log queries anymore

Some time ago I updated my MySQL server to the v5.6: SELECT VERSION(); 5.6.30-0ubuntu0.14.04.1 Now the query logging isn't working though the configs in the /etc/mysql/my.cnf seem to be correct: [...
0
votes
0answers
15 views

How to fetch Records matched with Comma separated value stored in table column

I have data stored in this format. topic_id tags 1 `tag1,tag2,tag3` 2 `tag1,tag4,tag5` 3 `tag2,tag4,tag5` 4 `tag6,tag7,tag2` I want Mysql Query to ...
0
votes
1answer
27 views

Migration MySQL to Cloud Environment replication

I'm having 5 MySQL database server , these 5 server are used for e-business web-server. Now I Would like to move the MySQL database to cloud environment for database continuous running. Recently we ...
1
vote
1answer
51 views

How to fix `The table '/tmp/mysql/#sql_xxxxx' is full`?

Ubuntu server 16.04, php7, nginx 1.10, mysql 5.7 in Hyper-V on Windows 10 host How to fix The table '/tmp/mysql/#sql_xxxxx' is full ? In mysql-error.log [ERROR] InnoDB: Tablespace ...
1
vote
0answers
31 views

Getting InnoDb internal Errors on every query run

I am having following errors in error.log at the run of each query due to which I am not able to use error.log properly. 2016-05-30 09:39:58 7f7c7e3cb700 InnoDB: Error: Column last_update in table "...
1
vote
0answers
63 views

Null instead '0000-00-00 00:00:00' in mysql 5.7

Before: mysql 5.6. One of the columns in the table is created as follows: `f_stamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' When i view this field in mysql client or using DataGrip, this ...
0
votes
1answer
21 views

mysql add a column to a number of tables

I want to add a column to a number of tables: my tables are in the format of No_tmp e.g 1_tmp .. 9999_tmp No = a number 1 - 1000 ... I want to be able to add a column to all No_tmp tables every ...
-1
votes
1answer
31 views

select columns if a column has a value [closed]

I have RegiNum and EmpNum columns in users table. If RegiNum column has a value it's considered as a student. If RegiNum is filled, I want to select Name and ID from that table. I used select if(...
0
votes
0answers
12 views

mysqldbcompare giving Compare table checksum FAIL error

Running mysqldbcompare on two test databases on same server. There is no data discrepancy in any table but showing following message which I'm not able to understand. Any help is appreciated. TABLE ...
1
vote
0answers
45 views

MySQL - Find bookings free time slot

I am trying to find free time blocks on a day between the business hours (08:00 to 18:00) of a service station. The schema of the database is as below, CREATE TABLE IF NOT EXISTS `Bookings` ( `id` ...
0
votes
2answers
26 views

Chained MySQL replication from Master->Master replicated pair

This is a pictorial view of what I have: Master 1<----->Master 2 | | | | V V Slave 1 Slave 2 The masters are never written ...
0
votes
1answer
47 views

Searching a text with space in mySql match against Query

I want to search a text in mysql DB with [space] (Ascii 32) as a part of it. But I am not getting the correct result. My MySql Query is: SELECT count(id) as total , MIN(product_price) as ...
2
votes
1answer
31 views

Logical condition when declaring handler procedure

I have a procedure in MySQL that executes a handler for SQLEXCEPTION to read the errno code and insert it to a table. DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN GET DIAGNOSTICS CONDITION 1 @...
0
votes
1answer
30 views

mysql Relay log file not found error while changing mysql data directory

I want to change data directory of my mysql server running 5.6.28 on centos 5.11. Its a slave to some master server. i have edited the config file ,moved the data contents from old directory to new ...
0
votes
0answers
26 views

Using MySQL session variables in a SSRS Report DataSet Query

I am creating a a SSRS report that connects to a MySQL database. In the DataSet I need to run a number of queries that load pieces of data in @SessionVar's that I can then piece together in the final ...
0
votes
1answer
28 views

Error: INSERT INTO client [closed]

I'm trying to convert my client database from MySQL to MySQLi and being a noob I'm having issues with it. Here's the code: <?php $servername = "localhost"; $username = "root"; $password = ""; $...
0
votes
0answers
24 views

MySQL Design for bulk inserts

Consider the following table structures as below, these tables can go beyond millions records received_goods rg_id int(10) PK (auto_increment), name varchar(128), ... storage_details rg_id int(10)...
0
votes
2answers
38 views

MySQL create index with LOCK=NONE still locks a table

I have the following MySQL RoR Migrations: class ReindexRpushNotification < ActiveRecord::Migration def up execute("DROP INDEX `index_rpush_notifications_multi` ON rpush_notifications;") ...
0
votes
0answers
29 views

mysql crashed and stuck on transaction roolback

Yesterday night I had an power outage which caused mysql reboot and after that it is stuck on waiting for 39 transactions to finish, the error is as follwed. [Note] InnoDB: Waiting for 39 active ...
0
votes
1answer
28 views

How to use FULLTEXT in mysql innoDB?

Sorry, if my question is naive, but it has puzzled me, and cannot benchmark the performance. I want to use the newly introduced feature of innoDB for FULLTEXT index. I wonder what is the difference ...
1
vote
1answer
69 views

InnoDB files created even innodb_file_per_table is OFF in mysql-5.7

We have installed mysql 5.7 in ubuntu 16.04 and we got big surprise because databases are being stored individually in each folder even parameter innodb_file_per_table is 0. We decided to change ...
4
votes
2answers
119 views

find the beginning and ending values of sequential runs

This article does the inverse of what I need: Find which numbers in [1, 161] are not in the result set? Given the sample data they used: mysql> CREATE TABLE wp_blogs -> ( -> ...
1
vote
1answer
46 views

mysql - merge two large instances to one server (40GB of binaries)

I'm need to merge two mysql instances (both mysql V5.6) onto one server. The binaries of 12 databases are approx. 40GB. I read other posts about mysqldump but as I've previously had many issues ...
0
votes
0answers
39 views

Table data is not getting dumped

This is just for test purpose. I'm taking backup (INNODB DB) with --single-transaction and from another terminal I'm running alter table on one of the table of same DB on which dump command is running....
0
votes
1answer
28 views

MySQL 5.6 performance_schema not showing queries from application

I'm seeing a strange problem with perfromance_schema... it seems queries are not getting logged as I expect them to be. For example, this is what I get: mysql> SELECT `SCHEMA_NAME`, `DIGEST_TEXT`, ...
0
votes
0answers
11 views

Is it mandate to turn off huge pages in Mysql 5.6

Folks, Is it required to turn off huge pages in Mysql 5.6 server under /sys/kernel/mm/transparent_hugepage/enabled -> To never? We have a heavy transactional database and calling the data segments ...
0
votes
1answer
59 views

Maximum number of TEXT/BLOB columns per table/performance of table with many of them?

I've created a system that generically imports CSVs into a database table with metadata columns for keeping track of when a CSV record has been changed, and it allows filtering on CSV columns instead ...
0
votes
0answers
33 views

Do Queries on a MySQL Federated table lock the remote table?

We are trying to use Federated tables as an experiment where a remote server copies from the Federated tables to a local db with OLAP designed tables. My question is whether the SELECT queries on the ...
2
votes
1answer
65 views

Query with Indexes slower than without Indexes

I'm using MySQL 5.6 and my storage engine is InnoDB. I have a table with 1 million rows containing with the columns: ID (primary key) FirstName LastName foreign_key_id (foreign key, NOT NULL) ...
0
votes
0answers
8 views

Is it advisable to configure huge pages on SLES for MySQL

What is a general opinion on using huge pages with MySQL server? As described in here: https://dev.mysql.com/doc/refman/5.7/en/large-page-support.html Or is it best to leave things as is and not ...
2
votes
0answers
36 views

How to avoid row locks on both tables joined in an update?

I have little knowledge about MySQL internals, but I'm experiencing that in a query like: UPDATE t1 JOIN t2 ON t1.id = t2.id SET t1.a = x, t1.b = y, [, ...] WHERE [ ... ] rows from both t1 and ...
0
votes
0answers
5 views

How would I script standing up a MySQL instance with certain specs?

Context: I seem to be unable to find in MySQL Workbench schema creation process where I can adjust server specs like max memory (2 GB); CPU usage, 1x 4 core; 20 GB SSD/Flash storage; OLTP; OS (RHEL ...
-1
votes
1answer
130 views

Got error while reverting mysql 5.7 to mysql 5.6

Got error while doing mysql service restart. Googled a lot, but nothing fix my issue. [ERROR] Fatal error: mysql.user table is damaged or in unsupported 3.20 format. 2016-04-23 11:10:38 22185 [...
0
votes
1answer
21 views

How to support custom fields for an entity and list them as columns?

I am currently working on a system which supports "custom fields" for users. I will illustrate this with a simplified example of this database schema: users -------- user_id name age custom_fields ...
1
vote
0answers
28 views

Mysql became unresponsive

All of the sudden mysql became unresponsive we are not sure of the reason, when we check mysql error log we find following, but for us it is hard to interpret it, can anybody help to understand it and ...
0
votes
0answers
14 views

load balancer in mysql cluster

Do MySQL cluster has its own inbuilt load balancer ? If yes then how can we use it ? I don't want to use third party tool like HA PROXY to set up LB because of financial constraint. As per MySQL DOC ...