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
430 views

Why does importing a MySQL dump cause so many I/O?

I imported 100 SQL-format dump files. The total size was 20 GB. The resulting .ibd files after the import had a total size of 40 GB. mysqld.exe wrote 1.1 TB and read 120 GB on the disk. Why so many ...
6
votes
1answer
3k views

What are the drawbacks of using Galera Cluster instead of Master/Slave Replication?

What are the drawbacks of using Galera Cluster instead of regular Master/Slave Replication? Galera's 0 slave lag time, Synchronous replication and no Single point of failure seem very appealing then ...
17
votes
2answers
27k views

InnoDB: Error: Table “mysql”.“innodb_table_stats” not found after upgrade to mysql 5.6

I upgraded to mysql 5.6 from 5.5, and now my logs are littered with such messages on startup I found a possible solution here, but it does not seem official. ...
0
votes
2answers
976 views

Warning before issuing delete/update command in mysql/oracle , then executes

Is there any utility , function either in mysql /oracle that if i issue some delete/update command wrongly , a message must prompt at command_line* (if possible in ubuntu) asking whether "you sure to ...
1
vote
0answers
243 views

Cumulative Function in MySQL

i have a problem creating cumulative function in mysql database. let say i have a stored procedure which getting data and counting quantity/sum_quantity example A table consist of consumer goods ...
0
votes
0answers
81 views

mysqldump file size changes drastically with repeated runs

I've been performing some maintenance on a server that I have and part of that was cleaning up a script I had for creating mysqldumps on an automatic Windows Schedule. The only change I made to the ...
1
vote
2answers
1k views

MySQL query log

I wonder if there is an alternative for MySQL general query log. I would like to log (mostly) DDL statements, so I could trace what user DROP database/table etc. I know that enabling general query log ...
1
vote
1answer
787 views

MySQLdump on specific db date

I'm new in here and i don't really know where to start but here is my concern. I need to backyp a MySQL DB running under windows once a week. For e.g every friday i need to backup and transfer to ...
-1
votes
1answer
39 views

Server down after PDO connection

I don't know is this off-topic for this site but I have site that run on PHP and MySQL. And I want to change my MySQL connection to PDO. This is my connection file that I include in every file at the ...
0
votes
1answer
51 views

Export database in one file with every dataset existing

I've got a unusual question. The human resources needs to export an old DB to a new one. And the guys managing the new DB wants one csv file with every dataset existing. I did a Relational database ...
1
vote
2answers
2k views

Determining what algorithm MYSQL View is using

When creating a MySQL View, the algorithm is set to UNDEFINED. How do I see which algorithm MySQL is choosing for the query ? I tried using "EXPLAIN", but it is not obvious from the results what ...
0
votes
1answer
420 views

Max allowed packet changed still replication not starting

Suddenly I notice my replication stopped and first I got some primary key duplication error when I checked using the show slave status\G. Then I remove those lines and restarted and ending up now with ...
0
votes
2answers
228 views

Should we explicitly lock MyISAM tables or is it implicit…?

Does MyISAM tables automatically lock a table for each select or insert statement .... I mean if I query the database as select * from tablename then does the MySQL engine first lock it for read ...
0
votes
1answer
300 views

mysql start and stop error

I install a mysql 4.1(Ok it's very old version) on debian. the service start and stop correctly but show this error. root@VM03:~# /etc/init.d/mysql start /etc/init.d/mysql: 63: /etc/init.d/mysql: ...
4
votes
2answers
26k views

How to migrate Oracle database to MySQL server? [closed]

Currently our application is running using Oracle 11g database. We are developing newer version of the application which runs on MySQL cluster. We need to migrate the data from Oracle database to ...
0
votes
1answer
708 views

InfoBright LOAD DATA INFILE Wrong data or column definition

I'm using BRIGHTHOUSE engine. I have a column defined as varchar(100). When loading data into the table, if the column data exceeds 100 characters, the engine will throw 'Wrong data or column ...
2
votes
1answer
376 views

Design advice regarding a users/groups/tasks database scheme

Here are my requirements: one user can have many tasks one group can have many task one group can have many users only invited user by a user can be added into a group Does this db design appear ...
1
vote
1answer
17k views

node unable to join a galera cluster; it fails during state transfer

It looks like the node is joining the cluster and then it fails… I have tried with both rsync and xtrabackup and it fails during state transfer. I seems to me that I am missing something real simple ...
4
votes
2answers
1k views

Architectural Help Needed - MySQL or NoSQL for a table with 54 million records

We have a table with 54 million records. Here is the table structure. CREATE TABLE `metaplay` ( `track_id` int(11) NOT NULL DEFAULT '0', `user_id` int(11) DEFAULT NULL, `completed` int(11) ...
0
votes
1answer
30 views

Change MySQL 4.1 Windows to MySQL 4.1 Linux- Problem with the key Sensitive in query

I need help to resolve this problem. change the server MySQL 4.1 run on Windows to MySQL 4.1 run on Linux(debian). This all working, but same query not return the correct data because key ...
2
votes
0answers
1k views

Analyzing MySQL crash due to corrupt InnoDB page. Failed page checksum

Lately we have been pestered by infrequent sporadic database crashes on one of our MySQL instances. Each time it is due to a failed page checksum. It happens on a specific database but spans multiple ...
2
votes
2answers
4k views

Difference between show status and show global status in mysql

When I execute "show status" and "show global status" in MySQL at interval of 5 seconds , I got set of 291 results each time. But, value of some parameters are different. Below are the list of those ...
0
votes
1answer
10k views

INSERT / UPDATE to merge data, when empty data is an empty string

Consider a table of some family members: mysql> SELECT * FROM some_table; +--------+--------+--------+ | f_name | l_name | work | +--------+--------+--------+ | Meirav | Cohen | school | | ...
0
votes
1answer
13k views

How to Replace (“ ”) with no space(“”) in one column mysql?

I have table Like This ID | Propinsi | Kota | _________________________ 1 | Aceh | Denpasar 2 | Aceh | Banda Aceh 3 | Sumatera | Asahan This table have many rows The Problem is I want ...
0
votes
1answer
385 views

Mysql query stress testing program [closed]

We are writing queries for our website, and when we test the queries in a dev environment, the queries run pretty fast. The problem that we are having is the dev environment has less that 10 active ...
0
votes
1answer
109 views

On which fields to index? Fields queried (WHERE) or fields returned (SELECT)

I have a large MySQL database table (~1 million rows and growing) on an AWS RDS Medium instance: mysql> describe clients; ...
3
votes
1answer
470 views

How to upgrade MySQL (5.5) production DB to 5.6 with minimal downtime

Our existing Database size around 200GB. We want to use consistent, parallel backups methods. For testing, I migrated my Development DB from 5.5 to 5.6 by running mysqldump with option ...
0
votes
1answer
1k views

Insert but ignore if duplicate AND set a value different if exist in another table

I'm trying my make an invitation system together with the Facebook PHP APK. What I basically want is when you have invited your friends, Facebook redirects back to your website with an array ...
-3
votes
1answer
694 views

error querying data with apostrophes [closed]

I'm getting empty sets from running the following query permutations: select * from gsapi_articles where article_title = "James Dean On Merilyn: 'This Woman Is A True Marvel'" select * from ...
0
votes
0answers
120 views

Slave fail first due to duplicate primary key then corruption error

I have a mysql db running the slave very well for few months. Suddenly today I notice it stopped since 18Nov. I check the status it was showing me the primary key duplication error. SO i stop slave ...
4
votes
2answers
6k views

Adding index to large mysql tables

I have a table | base_schedule_line_items | CREATE TABLE base_schedule_line_items ( id int(10) unsigned NOT NULL AUTO_INCREMENT, installment int(10) unsigned NOT NULL, on_date date ...
4
votes
1answer
12k views

MySQL crashes randomly with “Database was not shut down normally” message in log

I am having an issue where, for no apparent reason, my MySQL server crashes and has to restart. Essentially, the error log has entries like this: 131128 12:16:35 mysqld_safe Number of processes ...
2
votes
1answer
3k views

how to set bulk_insert_buffer_size in mysql?

I want to set bulk_insert_buffer_size variable for insert. I searched from other pages too, all they are saying about my.cnf. But there is no my.cnf in my system. I checked my.ini and there is no such ...
1
vote
0answers
628 views

is it good to add index on column used in group by clause?

I have a query like- select x, sum(y) from xyz where z>=100 group by x order by sum(y) desc; will it be faster if I am going to add index on x?
9
votes
3answers
63k views

select rows where column contains same data in more than one record

I have a table that has a column called article_title. Let's say the table name is articles. I need to find out the records where the article_title data is the same on more than one record. Here's ...
0
votes
2answers
2k views

How to get rid of using temporary when using DISTINCT in MySQL?

When I do the following, I get Using where; Using index; Using temporary. How do I get rid of Using temporary? http://sqlfiddle.com/#!8/f61a2/3/0 CREATE TABLE `test` ( `a` varchar(45) NOT NULL, ...
0
votes
1answer
71 views

Query Result Not Perfect on Mysql?

I have table Like This ID | City | Prize _______________________ 1 | Surabaya | Notebook 2 | Surabaya | Notebook 3 | Surabaya | 4 | Bandung | NoteBook 5 | Bandung | PC 6 | Bandung ...
0
votes
1answer
2k views

Date of birth saving to MYSQL DB with timestamp or date column type [closed]

i am using MYSQL database and would like to know which of this is a good practice. way 1 - use column type in DB as timestamp. i.e will contain values like 2012-11-13 00:00:00 way 2 - use column as ...
3
votes
1answer
1k views

Mysql Performance optimization, max CPU load, low qps

I would like if anybody could look into performance optimize this: I have a Ubuntu 12.04 running on VMWare 5.1, with 32 GB RAM and 8 Cores (No problems regarding cpu scheduling as the VM is almost ...
2
votes
2answers
22k views

How to empty a column in mysql [closed]

I have table Like This ID | name | prize | ____________________ 1 | Mike |Handphone 2 | Josh | 3 | Sony | PC 4 | Jack | let's say my table have 1000 rows. If I want To Empty only the Prize ...
1
vote
1answer
597 views

Identical query, tables, but different EXPLAIN and performance

I have two tables levels and users_favorites +--------------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | ...
1
vote
1answer
4k views

Can I see the status of a “repair by sorting” in mysql?

I am running an alter statement on a very large table. show processlist shows the state as "Repair by sorting". Is there a way to see the status, or get an estimate of how much work has been ...
0
votes
1answer
378 views

Why the table gets deleted by the server in mysql?

I have a table in mysql. I have one java application which will keep inserting the data into this table. So the size of the table grows drastically and at one point it gets deleted automatically by ...
0
votes
1answer
96 views

Migration of MySQL to SQL Server

I need to migrate a MySQL database to SQL Server 2012. Found enough information about it -- looks like it can be done either with SSMA tool or via Data Import utility in SQL Server Management Studio. ...
0
votes
1answer
328 views

Does size of one particular column in a database affect query performance?

I have a table user_list CREATE TABLE IF NOT EXISTS `user_list` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `username` varchar(40) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `email` ...
0
votes
2answers
316 views

Improve performance on write-only table?

I am using MySQL 5.5 with innoDB. The basis of my server is Netty, JDBC and BoneCP. I have a log table that contains user inputs(HTTP header, request body etc). This table will only be read very ...
2
votes
4answers
3k views

How To Update Random ID to a table in mysql?

I have table like this: ID | City | Prize | ---------------------------- 1 |Surabaya | HP 2 |Surabaya | Watch 3 |Surabaya | Bag 4 |Semarang | 5 |Semarang |Watch 6 |Semarang | 7 ...
1
vote
1answer
10k views

Mysql backup from ibdata1, ib_logfile1, ib_logfile0

I accidentally deleted my word press mysql DB. Below is the list of log files that i see in my directory where i am hoping i can get back some of my data. I actually converted the first file ...
0
votes
1answer
638 views

Is that possible to group result on 3 months period basis?

I am trying to group results by 3 months period starting by the current month as shown below: row1 15 -- This should contain November, September and October row2 25 -- This should contain ...
0
votes
1answer
92 views

Is it any good for performance to have master and slave on the same server

There are similar questions on this site, but they mostly cover server failure and data backup aspects. I'm concerned only as far as query performance. If master and slave share the same resources, ...