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

0
votes
1answer
28 views

MySQL Backups - Full vs incremental - innobackupex

So I'm implementing a backup strategy for our project and came across some text which I need absolute clarification, false positives are the death nell of IT. I am looking to do your typical backup ...
2
votes
2answers
91 views

Is 3 minutes to join a 50 million table too much?

I apologize if this is the wrong place to ask, but I really need some opinion on whether or not my query is good or not. Basically, I need to get a count of old and invalid entries per group, which ...
0
votes
1answer
16 views

pt-table-checksum show wrong DIFF

I'm try to use pt-table-checksum tool. I have Master/Slave tables, and I add some rows to the slave to check it. pt-table-checksum --ignore-databases mysql S=/tmp/5.6.22_3306_Master/data/mysql.sock --...
0
votes
0answers
19 views

how to load columns in specific order while uploading csv file in Mysql [closed]

I want to upload a CSV file having 17 columns in a specific order from 1 to 33 into a MySQL database. Some of the columns need to be ignored as other files also have to be uploaded in same table. I ...
0
votes
0answers
11 views

sql query to insert the column for adding products in mysql [on hold]

We are trying to save the Multiselect options assigned to particular brand. we are using this table name : outthink_advance_brand_category I want to insert column to this database table name as i ...
0
votes
0answers
12 views

Galera segments relay node — is there a way to prefer one?

I have geo-distributed cluster with 2 segments. Main segment is in Singapore, secondary -- in Europe. Recently I found out, that one node of main segment has RTT to Eu node about 5 times less, than ...
0
votes
1answer
12 views

Restroring MYSQL databse from .frm and .ibd files (database does not exist error)

please help ... I want to restore MYSQL database using .frm and .ibd files (that's all I am having). here is additional information.. I reinstalled same version of WAMP without taking backup of ...
0
votes
0answers
22 views

mysql select duplicate columns for same row

Ok I'm trying to write a customized report for a preexsiting database(IE, I didn't design it and can't change the convoluted structure) that has a user table and 2 other tables that store user ...
1
vote
3answers
17 views

Fix double-encoded data

I have a field defined as Question VARCHAR(1024) CHARACTER SET utf8 NOT NULL. Our application stored double-encoded data into this field. For example, é shows up as é in phpMyAdmin. I've added a ...
1
vote
1answer
16 views

Alter TEXT column to NOT NULL when there is existing NULL rows

Mysql does not support default values for TEXT columns. I have a live database with NULL values What is the proper way to change all null values to a predefined value and change the column to not ...
0
votes
0answers
21 views

mysql pirate users logged in, what should I do

I'm using Mysql Server 5.1.73 and when I do a show processlists I can see some connections which shouldn't be there. In theory only the web app should be connected to this database. The connection ...
0
votes
0answers
15 views

MYSQL : Need Query How to update the NULL value for every next row of current row in MySQL table?

Example : Two table we can take, Table names are table1 and table2. Table1: It having 3 columns are id,date_s,value_s and the records are, 1 2005-01-01 25 2 2005-01-02 30 3 2005-01-03 10 4 ...
0
votes
0answers
23 views

Update Multiple Row's [migrated]

I would like to change one field of multiple row's at once by user input. Something like: I had some books at some branch, and i want to change some of them to other branch. The user select the ...
1
vote
1answer
25 views

Getting Error : [Err] 1615 - Prepared statement needs to be re-prepared with MySQL 5.6.30

Problem/Issue : Getting Error : [Err] 1615 - Prepared statement needs to be re-prepared I have a Stored Procedure which contains a Prepared Statement and a view DROP PROCEDURE IF EXISTS `sampleProc`...
0
votes
1answer
62 views

How could duplicate entry on unique key happen if only one master is active?

Say, I we have master-master replication with only one master active at a time. We have users table: create table users ( id int auto_increment, email varchar(255), primary key id(id), unique ...
0
votes
1answer
10 views

Create trigger that Find, Parse and Insert to another table After inserting on table

I want to create a trigger that will insert to another table after inserting on my table. Scenario: I will insert on my inbox table. Then, on my inbox table there is a field named Msg. Next, I want ...
1
vote
1answer
10 views

Mysql auto insert record in primary table if not exist

Is it possible to auto insert a record into the primary table if the record does not exist when adding a foreign key? For example, assume these tables: - user(id, name, age) - topic(id, name) - ...
2
votes
1answer
58 views

Calculating a percentage discount in SQL [closed]

Basically just started using sql and having a minor problem. Working out the percentage of a number. Example: What would I need to type in to work out: 2.75 - 5% Drink_price= 2.75 After 5%...
1
vote
1answer
19 views

MySQL 5.6 InnoDB doesn't work

We have been having issues with one of our Windows environments. It uses MySQL and has been running on MyISAM only. We need to create a few InnoDB tables but the engine won't start. We tried changing ...
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 ...
0
votes
0answers
30 views

MySQL replication: Master to Multiple Slaves with table filtering

I have 2 separate web systems (A, B) that will end up using the same 5 tables. I'm using MySQL. System A has only one database (A1). System B has at least 3 databases (B1, B2, B3) on different ...
0
votes
0answers
16 views

Error with grants when migrated to NDB cluster

we are trying to migrate the data from mysql 5.1 to mysql 5.6 NDB cluster 7.4.x. 1. we migrated the data using some scripts and restored the grants but the users are not able to login, We checked ...
-1
votes
0answers
18 views

ways to decrease physical memory usage and commit charge (Task Manager) mysql execute query

my tables are Myisam i want to know ways to decrease memory usage and commit charge while execute query because my server ran out of memory any cache service can i stop to reduce physical memory ...
0
votes
0answers
21 views

MySQL “stalling” when database grows in size

Having a problem where lots of queries timeout. From innodb engine output it looks like lots of queries are blocked? --Thread 139681112069888 has waited at btr0cur.c line 523 for 0.00 seconds the ...
0
votes
1answer
15 views

MySQL: Do killed query results get cached?

If a query is executed from the MySQL command line, then KILLed it while it is running will the query and its partial results* be in the query cache and usable to subsequent runs of the identical ...
1
vote
0answers
26 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 ...
-3
votes
2answers
89 views

How do I find mismatches in two tables?

I have a database where I'm trying to find inconsistencies across two tables. I'm new to SQL and would like some help. The other questions I've looked up are confusing and too convoluted for what I'...
1
vote
1answer
51 views

Percona: Backup preparation doesn't work (“cannot open ./xtrabackup_logfile”)

I've created a MySQL backup with PerconaXtrabackup tool via (thanks to this guide): innobackupex --user=backupmysqluser --password=xyz --compress --stream=xbstream ./ > /var/backups/db/firstBackup....
0
votes
1answer
8 views

Error 1064 during import

When I try to import my database on the production server, I get: SQL запрос: CREATE TABLE `articles` ( `id_art` int(11) NOT NULL AUTO_INCREMENT, `id_section` int(11) NOT NULL, `id_ct` ...
0
votes
2answers
36 views

Checksum of data imported from mysqldump not equal to the original checksum?

I'm tring to create a mysql replication instance. So I mysqldump --complete-insert --skip-dump-date -uuser -ppass db table > master.sql. Also I've imported the master.sql to the slave instance ...
1
vote
1answer
10 views

Process possessing lock crashes

I have two machines, M1 and M2, through which I am connecting to MySQL Database on machine M3 using Perl script (DBI.pm). So, here is the scenario that I am confused about: M1 places a table level ...
0
votes
1answer
34 views

Database ExecuteSQL(MySQL client run out of memory)

I've an online game the game server execute more than 1M queries [ SELECT , REPLACE , UPDATE ] every 10 sec the problem the memory usage still increasing i dun know why ?? i mean if we suppose that ...
-1
votes
1answer
40 views

Recovering a lost database [closed]

Before I start, there might not be a way to do this but I thought I would ask anyway.. I built a php application with Laravel 5.2 and have suddenly noticed I have lost the MySQL database for the ...
0
votes
0answers
16 views

Migrating SQL Blob to Server File System

I was given a MySQL database that was created by making a .sql dump file from an existing MS Access DB. During that migration I have an attachment column that was given a BLOB datatype and the ...
0
votes
1answer
23 views

Create a MySQL Database using a MS SQL database dump (.CSV)

I have a dump of a MS SQL database in the form of CSV files for every table in the database. There are 679 .csv files each for every table. The highest size of the table extract is 9 GB and the lowest ...
-1
votes
1answer
44 views

Most efficient way to log user login IPs

I am looking for ideas on how to log user's login IPs without compromising on performance in MySQL. There are few primary tasks which the log would be used for: Finding list of other users who have ...
-4
votes
1answer
39 views

I need to change the format of 'date' from yyyy-dd-mm to mm-dd-yyyy [closed]

My dilema, I was requested to populate a table of sample data and I completed the command to add a date. I entered '07-07-2016' as sample data. When running a query the "date_ordered" field came ...
0
votes
1answer
17 views

MySQL replication on slave server Broken/Stopped without error

(Hi; sorry for my English) My question is: how can I restart MySQL replication on a slave server. At first sight everything seems to be normal but when I check with SHOW SLAVE STATUS\G besides ...
1
vote
1answer
74 views

Primary Index VS Unique Index Performance

I have the following table: CREATE TABLE `actions` ( `user_id_from` int(11) unsigned NOT NULL, `user_id_to` int(11) unsigned NOT NULL, `action_type` int(11) NOT NULL, `counter` smallint(11) ...
1
vote
0answers
46 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 ...
-4
votes
0answers
39 views

Retrieving the data based on id from table contains 2 million rows [closed]

I have one table/collection contains 2 million rows/document (id(20 alphanumerical digits), name, ... etc). From that table I want to retrieve data based on the id within 1 sec Which database ...
0
votes
1answer
16 views

shrink ibdata1 in Galera Cluster

I'm having a Galera cluster (3 nodes, but currently using only one), MariaDB 10.0 Galera. However, my ibdata1 is growing HUGE (although using inno_file_per_table=1). Now i want to "shrink" it by ...
0
votes
2answers
24 views

How can I fetch parent table's value within a trigger?

I have a PARENT table and a CHILD table. PARENT ------ ID BIGINT PRIMARY KEY NAME VARCHAR(255) NOT NULL CHILD ----- ID BIGINT PRIMARY KEY NAME VARCHAR(255) NOT NULL PARENT_ID BIGINT NOT NULL I ...
-1
votes
0answers
12 views

how do we know if mysql server is overloaded [closed]

I am developing an application using PHP. Sometimes Mysql is overloaded. Is there anyway I can tell the user the database is overloaded & to come back later?
0
votes
0answers
20 views

SOLVED - How to import a text file with “,” value to Mysql

I have data in a text file that have value like this : _______________________________________ |id|name_item |value| _______________________________________ | 1|Luas ...
0
votes
0answers
10 views

Trying to recover a database with just .ibd and .frm files, but no idbata1 file

Trying to restore a WAMP database with just .frm and .ibd files. The uninstall of WAMP left .ibd and .frm files, but no ibdata1 file. I have read several posts here to figure out the process for doing ...
0
votes
1answer
18 views

MySQL - Upgrading from 5.5 to 5.6

I have MySQL community version 5.5.50 running in linux having 4-5 databases on it. Requirement is to upgrade to Percona Server 5.6.31-77.0. What are the pre-requisites that I need to check before ...
0
votes
0answers
27 views

Data Base Error

I have an online game. The game server every 2 hrs lost connection with data base & when i check the gameserver log i found this 2016-7-18 2:1:8 -- ERROR: Database ExecuteSQL(MySQL client run out ...
0
votes
2answers
33 views

General Database Optimizations - correct data types - why to avoid NULL? [closed]

Oracle recommends: Choose the correct data types and size to: – Avoid NULLs – Improve performance – Protect data – Use data compression where appropriate I don't understand why I need to avoid ...
0
votes
1answer
31 views

Why MySQL does not provide stddev(distinct expression)? [closed]

I ask the question because some other numerical aggregates, like sum, avg or count support the distinct modifier. And other databases like Oracle or MSSQL support distinct modifier for stddev.