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

2
votes
0answers
892 views

CSV File Into MYSQL Merging - LOAD DATA on Duplicate Key?

Hey Dba Stack Exchange, My question to you is with regards to mysql. Right now I have a medium to small sized csv with 25k lines I need imported into mysql for a client. Problem is, their is only ...
2
votes
0answers
132 views

MySQL Partitioning Performance

I have a MyISAM table with billions of rows that is still causing me problems because the indexes, even after I shortened them as much as possible, do not fit in my 64GB of RAM. I am unable to index ...
2
votes
0answers
217 views

Error in alter table reorganize partition for MySQL Cluster

My cluster contains 48 million rows and cluster contains 4 storage nodes . After that I add online storage node and executed alter table 'customer_tbl' reorganize partition. Some parameters of config....
2
votes
0answers
93 views

How can one improve the performance of a query that selects on a low cardinality column in MySQL?

I have a "State" column that has a low cardinality (three possible value), on which most of my queries perform an equality selection (WHERE col = 'blah') AFAIK you need something like a bitmap index ...
2
votes
0answers
1k views

Migrating from Oracle to MySQL using WorkBench Migration Tool

I am currently migrating from Oracle to MySQL and I am going to use the migration tool in workbench to help me with the procedure. I have entered my source connection details as follows: Database ...
2
votes
0answers
560 views

Incorrect data when we using the CONVERT_TZ function on DST boundaries

We have a problem in converting time zone from "America/New_York" to "UTC". This problem occurs only on times representing 2.00 AM during the daylight saving. Timezone conversion with correct output ...
2
votes
0answers
200 views

phpMyAdmin slow for small database

I have a small database (<100 KB when dumped) that will hang in phpMyAdmin when I try to sort by various columns. Sometimes it hangs when I try to edit columns by directly clicking on their ...
2
votes
0answers
4k views

'Access Denied' in MySQL on AWS RDS

I'm trying to use an ETL (in my current case, the free version of Talend). I've successfully set up a MySQL on Amazon RDS, logged in through the MySQL Workbench for Mac, and uploaded my company's ...
2
votes
0answers
2k views

MySQL Server hitting 100% unexpectedly (Amazon AWS RDS)

We've been struggling with this issue for months. This week we upped our RDS instance to the highest performing instance and although the occurrences have reduced, we're still seeing our database ...
2
votes
0answers
93 views

MySQL Partioning: Is there a performance tradeoff between number of partitions and size of each partition?

I have a large table (several 100 million rows) that I would like to efficiently partition. My question is whether there is a tradeoff between partition size and number of partitions. As far as I ...
2
votes
0answers
217 views

Get all comment.message, status.message, users.* and profiles.* where users.user_id exists in friend.friend_id or friend.user_id

I need some help building this query because it's a bit complicated at least for me. I need to get all comment.message, status.message, users.* and profiles.* where users.user_id exists in friend....
2
votes
0answers
1k views

MySQL re-install fails under Mountain Lion

I have problems to reinstall MySQL on Mac OS X after it was running on my system. I uninstalled it because the PreferencePane wasn't working as expected, using the procedure described here: http://...
2
votes
0answers
1k views

Index usage for database server

How can i fix the Index usage on one of our database server? It says from our Nagios control panel that: Service: DB Index Usage Host: MySQL Cluster Address: ( our IP ) State: CRITICAL Additional ...
2
votes
0answers
1k views

SQL query optimization in Prestashop e-Commerce solution

I'm working on a layered navigation module within Prestashop e-Commerce solution. I'm trying to optimize a SQL query which creates a temp table during execution. I think this is creating a ...
2
votes
0answers
105 views

Can't connect to MySQL Cluster Storage (data) nodes

I've deployed a MySQL Cluster with a few nodes, and I want to access the storage nodes directly from another machine using NDBAPI. When I tried to connect from the same host it worked, but when I try ...
1
vote
0answers
12 views

`t2.t1_id IN (select t1.id from t1 …)` is slower then `t2.t1_id IN (1,2,3,…,150)`

Query with subquery is much slower: SELECT COUNT(*) FROM `t2` WHERE `t2`.`t1_id` IN (SELECT `t1`.`id` FROM `t1` WHERE `t1`.`site_id` = 5978) AND (t2.created_at >= '2016-02-13 08:00:...
1
vote
0answers
11 views

Is there a way to synchronize mysql databases that are missing a few days worth of data

I have a primary-primary MySQL server setup that is connected to a load balancer. At one point, a failure occurred to where the replication wasn't happening and data was being written to one server ...
1
vote
0answers
22 views

How unsafe is to use ctrl+c or ctrl+d in mysql prompt?

How unsafe is to use ctrl + c when in mysql prompt whether to interrupt a hanging statement or ctrl + d to exit? When I do ctr + d for exit mysqly can see a ¿special character? typed besides Bye ...
1
vote
0answers
29 views

How to design efficient queries and structure for data logging table (numerical stats)

I'd like to create a logging table that logs numeric values (.NET application). Being a programmer and not really a database person, I'd like to ensure myself with the advice of more experience ...
1
vote
0answers
51 views

MYSQL Extremely slow - Heavy CPU Load

I am having an issue with my Percona MySQL 5.7 node. Since past 3 days, MySQL is processing queries very slowly. When I run top, the % CPU usage of MySQL is always 600. # top | grep mysqld 8409 ...
1
vote
0answers
46 views

How to reference Foreign Key(s) to the parent table where data goes on increasing?

Hello i am very new to learning PHP and MySQL. I have just begun learning MySQL. As the question mentioned above, will be kind if anyone can give a solution. Please see the example of a simple ...
1
vote
0answers
43 views

MySQL 5.5 Continuously getting crashed

I have MySQL 5.5.44 running in RHEL server. It is a standalone server used for testing and offlate not much used. The instance is currently down. Hence, I tried to start the service. It got started ...
1
vote
0answers
17 views

Mysql to MS SQL Migration and synchronization

Database migration from MySQL to MS SQL using SSMA tool is very nifty, however, I have one question around this. I have 2 MySQL Db's want to migrate to MS SQL, one sizes around 850 GB and another one ...
1
vote
0answers
34 views

Do not want to allow Queries to take more than x minutes?

Do not want to allow Queries to take more than x minutes ! What System variable can I set to automatically terminate it.
1
vote
0answers
27 views

Retrieve data from OLTP MySQL to SQL Server DWH using SSIS

I'm running a BI solution currently reading data from an OLTP SQL Server 2008 to a SQL Server 2012 data warehouse. The ETL phase is implemented with SSIS and runs twice a day. This phase relies on a ...
1
vote
0answers
22 views

MySQL keeps crashing

MySQL keeps crashing randomly - recent errors in error logs says this 160626 21:50:42 [Warning] IP address '113.108.21.*' could not be resolved: Name or service not known 160626 22:42:57 [Warning] IP ...
1
vote
0answers
57 views

What exactly is MySQL Spin rounds per wait in SEMAPHORES section?

I am facing slowness issue on MySQL Slave. I am suspecting this due to OS I/O as i compared Spin rounds per wait values with PROD. Slave have higher values. Also slave has less resources compared to ...
1
vote
0answers
42 views

get max item in sub query join mysql

i have a table it contain buy of each user , other table contain a star ranking According to buys all user, my scenario very sample i create it and show in sqlfiddle . example if in table buy have ...
1
vote
0answers
15 views

Mysql multisource replication : on slave map masters dbname to something like mastername-originaldbname

I need to implement a mysql multisource replication using mysql >=5.7.11, there are already a certain number of mysql servers running which will become masters for the single slave which is going to ...
1
vote
0answers
37 views

MySql - Update the defualt table schema on production server

The story starts with a MySql table called table on the production server: As you can see, I f***ed up when specifying defaults - 0000-00-00 00:00:00 is not a valid MySql datetime. I need to ...
1
vote
0answers
31 views

How can i sync a table between two MySQL RDS insatance

I am trying to sync one table in two of mysql RDS instances in AWS something like a db link or FEDERATED engine.
1
vote
0answers
24 views

New percona xtradb node shuts itself down shortly after launch

We currently have a 3 node percona xtradb cluster running on premises. We are trying to add a 4th, remote node ( Obviously split-brain is a concern in this situation but it is only temporary while we ...
1
vote
0answers
36 views

Dynamic table name in Insert query

I have asked a question about dynamic table name in a prepared statement here , but I want to know if Mysql server support dynamic table name like this : SET @tbl = 'Dawin'; INSERT INTO @tbl (col1,...
1
vote
0answers
61 views

Is there a faster way of importing 8m+ rows?

I'm creating a new feature on my website in order to provide player locations (my website is for a multiplayer gaming service), and am going to use a simple IP lookup in my database. For this I need ...
1
vote
0answers
39 views

MySQL Supported versions of MySQL Enterprise TDE

We are bidding for a project involving developing a portal using Liferay, which requires that we use MySQL version 5.5 which is the current compliant version of MySQL with Liferay. We need also use ...
1
vote
0answers
35 views

Can't drop table after creating table with wrong engine

I'm trying to drop a table containing several hundred thousand column-based records. Normally when creating the database I use a column-based engine (infinidb) but in this case I forgot to include the ...
1
vote
0answers
25 views

MySQL dump only has SET commands, no data

I've done an export of a Wordpress database. The MySQL file that was exported only contains the Host, Database name, server version and SET commands. Pastebin: http://pastebin.com/pFgdPDRa Another ...
1
vote
0answers
30 views

Command wbcopytables --table-range not working

I am migrating sql server tables in MySQL using wbcopytables command. I want to copy a specific range(id 1-10000) of data from MSSQL to MySQL, so I am using below syntax. wbcopytables --odbc-source="...
1
vote
0answers
35 views

Mysql replication, master_log_pos sync but tables not update

First, my replication config on Master: replicate-do-db = mydb binlog-do-db = mydb expire_logs_days = 2 max_binlog_size = 100M binlog_format = MIXED log-...
1
vote
0answers
45 views

MySQL table filed with text datatype inserting some script value automatically and ignored user input

In my MY-SQL database table having with text datatype. In that field having some unwanted script tag added automatically. If I given that any value also ignored. and also I tried to edit that value ...
1
vote
0answers
29 views

MySQL basic query question

I have a table as follows: k | Ecode | Typ | Score | ---+------+-----+-----------+ 1 | 1 | NYS | 104.17 | 2 | 2 | NYS | 201.55 | 3 | 3 | NYS | 213.22 | 4 | 1 |...
1
vote
0answers
29 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 '...
1
vote
0answers
45 views

How to export views and import it in other DB?

I am trying to export the database and everything is fine but I am not able to export the VIEWS. Is it possible to export the views from sql queries and import it?
1
vote
0answers
31 views

Repair or force delete corrupt tables

I have an database with the name "build", and when I try to execute "USE BUILD" the MySQL server just crashes, it also crashes when I try to show the tables with phpMyAdmin and MySQL Workbench. I do ...
1
vote
0answers
37 views

MySQL partition on 2 tables one with millions of rows the other with 100's of millions

I have two mostly de-normalized tables in Amazon Aurora (MySQL). The first table had mostly dimensions that are used for selecting the proper data. Examples might be station, program name, operator, ...
1
vote
0answers
41 views

mysqldump show Table doesn´t exist when doing LOCK TABLES

Our server had power outage and after start some of mysql tables was inaccessible. I tried many things but nothing helped and currently i am at freeze point. I used command : mysqldump database ...
1
vote
0answers
25 views

Database Designs Alternative to Polymorphism in Establishing Relationships

I'm working on a database which handles replacement of parts in a machine. Rules A machine has many components A machine has a set of assembly instructions Many components have many part (screws, ...
1
vote
0answers
39 views

pub/sub database schema

I am having a hard time creating a pub/sub database schema with stateful metrics. Saying it aloud it sounds easy enough: "There are many organizations that will subscribe to checklists that are ...
1
vote
0answers
30 views

Add index to mysql table with ndbcluster engine

I'm having trouble while adding index on mysql table with ndbcluster storage engine below is the error . [mysqlcluster ver. 7.4 GA] mysql> alter table `sks_staff_office` add index `pid_index` (pid)...
1
vote
0answers
69 views

MySQL is using swap memory while I have plenty of free RAM

I have a 6 GB buffer pool size for my database; however, mysqld process is moving to swap while there is plenty of RAM available. I think pool size and pages along with pool of reads and pool of read ...