MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
0answers
5 views

Compare two mysql databases mysqldbcompare

Can any one help me. How to use mysqldbcompare in mac. I need to compare two mysql databases to find differences in the whole structure (schema, columns...).
0
votes
0answers
4 views

what is the fastest way to restore MySQL database without using dump files

what is the best procedure to quickly restore the MySQL database without using dump files. can any body help me in this regard. Thanks in advance.
0
votes
0answers
7 views

Mysql 5.5 to Mysql 5.6 upgrade Insert query is breaking

Assume column with the following definition product_id INT NULL NO_DEFAULT product_id_nn INT NOT NULL NO_DEFAULT and query insert into table (product_id,product_id_nn) values ...
1
vote
0answers
9 views

MySQL SELECT blocking an INSERT?

Is it possible for a SELECT query to block INSERT / ALTER queries? I have the following (taken from ENGINE INNODB STATUS) on my slave database: ---TRANSACTION 26DA7060, not started mysql tables in ...
1
vote
0answers
5 views

Mysql transaction READ REPEATABLE and READ COMMITTED read view

I've come across something strage using Amazon RDS (MySQL 5.6.23). I had issues when concurrent transactions were locking and then calculating a value from multiple tables. The following is a quick ...
0
votes
0answers
11 views

MySQL - Seconds shown for query run time is incorrect

I came into work this morning, and first thing I noticed is that one of my Slave databases was running behind. I took a look at the processlist and could see that I had the following running. SELECT ...
-1
votes
0answers
5 views

mysql incremental backup using percona

Can anyone suggest me what are the pro's and cons of using percona xtrabackup to make incremental backups of mysql database..
-1
votes
0answers
20 views

How to check if all days of the month are in the database

This is my table wys_attendence: id studid adate amonth ayear acls_id attendence 1 28 02 07 2015 10 1 2 31 02 07 2015 10 0 4 ...
0
votes
1answer
10 views

Extract four digits from a column by regexp

I am sitting on a database where one column contains two data types ;) Example "1";"When the Wind Blows 0275";"James Patterson " "4";"The Reluctant Fundamentalist 1026";"Mohsin Hamid"; The ...
0
votes
1answer
19 views

Deleting near duplicates based on one varchar field

I'm getting around to cleaning a database but I need some help with deleting near duplicates in MySQL database but is only off by one character in a column. I've searched and found ways to remove ...
1
vote
0answers
17 views

Caching impression counts to avoid mysql inserts

We currently get a LOT of mySQL inserts/updates on duplicate daily (millions) and we're looking at speeding up the application by using some form of counter with memcached and then clearing it on ...
1
vote
0answers
5 views

Caching impression counts to avoid mysql inserts

We currently get a lot of mySQL inserts/updates on duplicate daily (millions) and we're looking at speeding up the application by using some form of counter with memcached and then clearing it on ...
2
votes
0answers
23 views

How to store data where various subcategories have specific columns?

I'm new to database designing. I'll use MySQL and PHP. I'm designing a database in which I have a lot of categories and subcategories like given below: Product Table p_id p_title category_id ...
0
votes
0answers
19 views

Tables not updating and deleting the entries

I am facing the below problem on updating the tables ROW OPERATIONS -------------- 0 queries inside InnoDB, 0 queries in queue 3 read views open inside InnoDB Main thread process no. 2376, id ...
-1
votes
1answer
17 views

Mysql: How does a rollback operation be performed inside InnoDB

I would like to hear in simple words Please answer me in simple words to the question on the below scenario. ============== Engine: Innodb Trx1 : started and a DML is executed at 10:00 AM and rolled ...
2
votes
1answer
64 views

select n values per group

Lets say I have the following table ----------------------------- | user_id | comment | ----------------------------- | 2 | thats cool | | 2 | awesome | | 3 ...
0
votes
0answers
22 views

Need to make sure database is fully normalised and all is accessible using MySQL and Java EE

So as per the picture: I need to create the roster table with all the data from the connecting ones - Each Roster entry will have the country,state and city, tech and subtech and client. Then ...
1
vote
0answers
35 views

Get average of multiple rows with criteria and return those rows

I'm attempting to get any items that are the same type, but are ranked one higher that have an average equal or greater than the item ranked below. I have a table and query like ...
1
vote
1answer
34 views

Speed up COUNT(*) when using an index

I have a table similar to this (simplified): CREATE TABLE books ( id INT AUTO_INCREMENT, category INT NOT NULL, PRIMARY KEY (id), KEY (category) ); This table has over 10,000,000 ...
1
vote
1answer
48 views

Delete rows where matched value is twice as much

I'm trying to match two tables with two columns, table1 and table2. Each has id and price columns. I want the query to match each id and compare the price, then delete the row if the price in the ...
1
vote
0answers
18 views

How to sort new data for display? [migrated]

I am new to SQL. I have a table called Categories with 3 columns: id int(25) category varchar(25) subcategory varchar(25) I would like to add a new subcategory "Real Estate Agency" in the category ...
0
votes
2answers
21 views

What is happening when Seconds_Behind_Master oscillates between two very different sets ov values?

I have a Percona 5.6 slave, newly set up, that is replicating from a server that is itself a slave to a third. The middle server (dbS2, the master for dbS3) is currently ~260000 seconds behind the ...
1
vote
2answers
28 views

Generating a sequence of values

How can I change 2,2,2,1,2 into 201,202,203,101,204 in MySQL? I have a table with data in the format of: +---+---+---+ | U | C | R | +---+---+---+ | 1 | 2 | 1 | | 1 | 2 | 2 | | 1 | 2 | 3 | | 1 | 1 | ...
0
votes
1answer
14 views

Error 1241 When Calculating Percentages

I am trying to get my percentages to equal 100%. As of right now they far surpass 100%. I need to account for the percentages in two different tables, ua_money_allocation and ua_expenses_by_school. ...
0
votes
0answers
12 views

How can I associate different not done continuation blocks with two cursors in the same scope?

If I have two cursors declared in the same block, how can I associate different not done continuation handler actions that are independent of one another and only execute with the cursor they're ...
2
votes
1answer
24 views

How to write a query that counts rows by date?

I have a database named emp1. There is a table named tx_feeder. I want to get the count of rows from that table. I have used the following query to get the data of single day, select count (*) ...
0
votes
1answer
8 views

mysqlbinlog: unknown variable ssl_key or ssl_cert or ssl_ca

I am trying to recover binlog from a remote server using mysqlbinlog client program, however it appears that mysqlbinlog doesn't recognize the SSL options that's required to establish SSL connect to ...
1
vote
0answers
23 views

How do you output field changes in mysql the most efficiently?

I have a rather large employee feed coming in and each employee has about 50 fields. I take the employee data and add on a bunch of other stuff and this gets outputted to one of our vendors. Most ...
1
vote
0answers
16 views

Select records where difference between datetime column1 and column 2 is greater than X amount of time

As the title indicates, I'm trying to return records where the datetime difference between two datetime columns is greater than X amount of time. I'm having trouble wrapping my head around this ...
2
votes
1answer
21 views

Recover mysql using data folder

One of our MySQL servers died but somehow we were able to recover all the files from it. This server was a slave at one time however we stopped it being a slave so we could use it for housekeeping ...
1
vote
1answer
13 views

Innobackupex: How to extract individual files from xbstream compressed backups

We are scripting a mix of full and incremental backup setup for our prodcut backend with sunday triggering full backup and incremental backup on all the remaining days. In this process, we should be ...
-2
votes
0answers
47 views

How to use multiple conditions using AND and OR in WHERE statement? [on hold]

how can I apply a multiple conditions in my WHERE clause using AND and OR? What is the best way to apply this? My scenario looks something like this. ...
1
vote
1answer
39 views

Is my shopping list database schema good enough?

So Im wondering if my schema is correct? It's basically suppose to hold shopping list items for each user, a user belongs to a household. Items will be added to the household. The stocklist is ...
1
vote
1answer
39 views

MySQL Query with good execution plan is very slow due to Sending data operation

I have the following query: SELECT a.borrowerId AS borrower_id, a.created, NULL AS initiator_team_id, NULL AS initiator_user_id, NULL AS old_team_id, NULL AS old_user_id, ...
2
votes
1answer
21 views

Plotting graphs for MYSQL

I was executing following command mysqladmin ext -i1 -c3600 It produces valuable output but I want to use the output to plot graphs so that I can visualize inserts, updates, buffer and other stuff. ...
0
votes
0answers
18 views

MariaDB multi-master replication (star topology) - Bizarre out-of-sync behavior

This may look familiar, I've been learning about this stuff for a few days - but this is a new question. I have a setup like this: Every node is a master, and I have them all replicating to each ...
1
vote
1answer
40 views

MySQL: is it more efficient to query for duplicate row or insert(update) on duplicate?

Just curious on resource efficiency. If I have a list of inserts that need to be accomplished repeatedly which may contain duplicates (there is no way around this, the API I have to work with sucks), ...
1
vote
2answers
19 views

MYSQL find if a default value has been set for a table (DateTime Specifically)

I am trying to internationalize a database, but there are places where the timestamp that gets set is using NOW() instead of UTC_TIMESTAMP(), and it's using Amazon's RDS with multiple MySQL servers. ...
0
votes
0answers
22 views

Write operations on the RDS Mysql Database becomes Slow during long run load test [on hold]

I'm having serious performance problems with MySQL and the InnoDB engine in long run load test. Even the simplest table makes writing operations.I'm using Amazon RDS m3.xlarge instance for performance ...
1
vote
1answer
28 views

MySQL connectivity error

I have a MySQL database on a Linux server that I am able to access through putty logging into servers terminal. When I try to connect to the MySQL database remotely, I get the error: Lost ...
1
vote
2answers
40 views

HeidiSQL: Import CSV

A few lines of my CSV: "id","date","date_","pow","ene","reac" "ES0134000563024539AM0F","2013-05-02","2013-06-05","62","43","43" "ES0134000573024539AM0F","2013-05-02","2013-06-05","62","43","43" ...
4
votes
0answers
84 views
+100

MySQL Commited data not seen to select query

Context: The framework used is Spring and all queries are run with JdbcTemplate. Mysql Server version is 5.6.19. The table is an InnoDB table and defaults like auto commit and isolation level ...
0
votes
2answers
57 views

Mac OS X 10.10 mySQL 5.6.26 accessible from CLI but not port 3306

I did a fresh install of mySQL 5.6.26 on my Mac today. I was able to access mySQL from Terminal.app as expected, however I could not get mySQL workbench to attach to 127.0.0.1 port 3306. What really ...
1
vote
1answer
51 views

Tuning MySQL query from explain

I am working on a search query in MySQL. I am getting this from explain: Original screenshot These are my indexes: Table definition: Original screenshot Query: SELECT `t`.`id` AS ...
2
votes
1answer
28 views

MySQL server won't start with foreign_key_checks=0

I'm running Ubuntu with MySQL version 5.5.44 mysqld Ver 5.5.44-0ubuntu0.14.10.1 for debian-linux-gnu on x86_64 ((Ubuntu)) I have a DB with foreign keys. I would like to have the foreign key ...
1
vote
0answers
21 views

Demoting a MySQL Master to Slave [on hold]

I recently had to fail my master over and promote a slave due to a network outage. All of that worked fine. Now that the network is back, I'd like to add my old master as a slave of the new master. ...
1
vote
1answer
24 views

Migrating all MySQL databases from from one server another. Getting error during import

I create a mysqldump on all the databases on the source server with this command: mysqldump -h mysql-01 -u root -p --all-databases > newdump.sql This takes about an hour, but runs fine. Now, ...
0
votes
0answers
21 views

How can I get the latest value per unique ID, then count the number of entries with that value? [on hold]

Ok, so I have a table that has device_id, lots of other stuff, and network_type. I currently run the following query: SELECT partner_name, COUNT( IF( network_type='ethernet',network_type,null )) AS ...
0
votes
1answer
23 views

inner join on true

My table: abc +--------+ | letter | +--------+ | a | | b | +--------+ Query: SELECT * FROM abc t1 INNER JOIN abc t2 ON true Result: +--------+--------+ | letter | letter | ...
0
votes
1answer
9 views

MySQL / DRBD / Pacemaker on EC2

I am trying to setup DRBD/MySQL/Corosync/Pacemaker on AWS EC2 instances, though I am not sure if it will work since how to integrate VIP is a problem for me. Anyone have any thoughts on what to do ? ...