MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

1
vote
2answers
9 views

Master/Slave desyncronisation

Some manual operations (writes) have been made on SLAVE instead of MASTER resulting in the replication being stopped. Could not execute Delete_rows_v1 event on table xxx.newsletter; Can't find ...
0
votes
0answers
18 views

mysql eating RAM without queries?

Somehow MySQL eats up 50% of my RAM on the server being used. I checked and there are no queries, show full processlist is empty. I restarted the mysqld and within a couple of minutes the RAM usage ...
0
votes
0answers
5 views

What does “Latest Restore Time” says in AWS RDS(Mysql) instances page

I have two RDS mysql instances and when I look at the instances page, I have seen a field named "Latest Restore Time" and the value for it is some time stamp in IST time zone. I would like to know ...
0
votes
0answers
9 views

Writing to a AWS database given User Name, Access Key Id and Secret Access Key [on hold]

I'm new to AWS. I've been given a User Name, Access Key Id and Secret Access Key and told to write data to it from a GoDaddy server. Is this all that's required to make queries ?
0
votes
0answers
33 views

Is it ok to query Mysql every second [on hold]

We have a debate with a coworker and I can't seem to find a straightforward answer to this anywhere. Here is a scenario, we have a service, a kind of Deamon that has to check certain things in our ...
1
vote
1answer
29 views

Is it possible to create a foreign key with a condition?

I have a table site that has a field categoryid_root and a table category which has the fields id and parentid I want to create a relationship between: site.categoryid_root and category.id but with ...
1
vote
1answer
15 views

mysqldump doesn't restore database. why not?

Why doesn't my restore operation work? I created a dumpfile for a database using: mysqldump -u root -p databasename > /home/databasename_bkup.sql I then opened the dumfile and confirmed ...
1
vote
2answers
18 views

Calculate row value based on previous and actual row values

Hi everyone and thanks for your help. I have the following situation: a table called statements that contains fields id(int), stmnt_date(date), debit(double), credit(double) and balance(double) I ...
0
votes
0answers
14 views

Problem moving database to new server

I am currently running into two problems. First, when viewing tables using MySQL Query Browser, it keeps displaying "Could not fetch columns". Second, when attempting to go in an edit any of the ...
1
vote
1answer
14 views

MySQL Replication/Backup

I'm a new DBA working with a MySQL(5.6.19) instance I have running on a Mac Pro, I'd like to back it up with the Percona tools, but there isn't a distro for Mac, so my plan is to create a copy of the ...
0
votes
2answers
32 views

What is more efficient: text(765) or varchar(765) to store a freeform searchable description?

EDIT : To paraphrase quesiton - at what point do I switch from varchar to text and back? A little background on the question. Let's say we have sales_orders table and we want to be able to keep a ...
1
vote
1answer
22 views

join table or cte

First off, I've tried to find a suitable solution on the internet, but I really didn't find one that worked for me. What seems to be my problem? Well... At my new job we use MySQL. I'm used to ...
0
votes
1answer
12 views

Will a static MySQL database become bigger in file size over time, even without anyone writing to it?

I backed up a database a few weeks ago, then for comparison downloaded it again. It was about 10,000 kB larger. There should not be anyone writing to it, but there are lots of reads. Will a static ...
0
votes
0answers
18 views

Table Design for Student Attendance hourly for each day

I have created a table(attendance_details) for storing every day attendance of Students in MySQL. Need to capture attendance for hourly(1-8hrs) for every day. I have the student details in separate ...
1
vote
1answer
33 views

What is InnoDB Buffer Usage and how to clear it?

In Mysql Workbench when I go in Server > Server Status there is a field called "InnoDB Buffer Usage" It is "95%" even if there is no query running. Why? It affects my performance in my new queries? ...
3
votes
0answers
24 views

How to get the best write throughput during a MySQL import with Amazon RDS?

tl;dr - How can we get the maximum EBS throughput for a db.r3.2xlarge instance? We're only seeing about half of what it can supposedly do. Apologies for the long length of this question. We've had ...
1
vote
1answer
18 views

Delete Duplicates Leaving One of Two Identical Records [on hold]

Delete Duplicates Leaving One of Two Identical Records One of my MySQL database tables contains four BLObs in each row. When it was first set up the table had no keys. However when I now try to add a ...
2
votes
1answer
25 views

How should a numeric value that is an external key be stored?

This is something I was pondering recently. trying to determine how to store certain values. The best wide spread example I can think of is Federal Employee Identification Number - more commonly knows ...
0
votes
1answer
20 views

How to select only the first distinct value in a column, but have blanks in that column in the other rows otherwise

Is there any way that I can turn a table like this with a query like SELECT name,child from People |----------------------| | name | child | | John | Jack | | John | Jerry ...
0
votes
0answers
8 views

Replication broken after copying .frm .myd .myi files

I copied .frm .myd .myi files for MyISAM tables from old_prod server to new_prod. Then I did a mysqlcheck on DB and repair tables whenever necessary. All is good for MyISAM tables in the new_prod. ...
0
votes
1answer
27 views

Help converting a MySQL query to postgres

Is it possible to do this query in postgresql? SET @p:= 0; UPDATE t SET x=CEIL((@p:= @p + 1) / $n) ORDER BY id DESC; I'm struggling with the variable syntax. I tried: \set p 0 update t set ...
3
votes
0answers
31 views

Is it a waste to set innodb_buffer_pool_instances greater than the # of CPUs?

I set the innodb_buffer_pool_size to 20GB on a server with 12 CPU cores. My full database is 11gb, however most of it is archived tables that are almost never used. The total queried data is around 3 ...
0
votes
0answers
17 views

Multiple Selects Into Multiple Columns Encrypted [on hold]

I am trying to do two select statements on the same table. However I get errors. The reason for this query is one of the columns is 256 bit CRC encrypted. Here is my query: SELECT (select COLUMNA ...
4
votes
3answers
134 views

How to detect inactive tables?

I started working on a project whose former developer ragequited, and it left a complete mess both in the code and database. The server is using MySQL 5.5 There are a lot of tables created for backup ...
1
vote
1answer
26 views

Need help rectifying IN/NOT IN clause

Hi there everyone! I have built a link/content sharing site. The way it works is that each link can have multiple categories assigned to it. A video of a motorcycle race might have motorcycle, ...
1
vote
2answers
13 views

MYSQL to other DB migration using MYSQL workbench

is it possible to migrate MYSQL to other database platform like MS SQL 2012 using the MYSQL workbench migration wizard?. Everywhere the only destination DB is MYSQL, the reverse process is not ...
0
votes
1answer
14 views

Filter mysql group by negative having contains

How can I get all of the values from 1 column, which do not (or do) have a specific value in one of their rows? For instance, consider example table: | ColA | ColB | --------------- | aaa1 | zzz1 | ...
1
vote
1answer
30 views

Add multiples of rows till they satisfy an arbitrary sum then return the rows that do

Am not sure if this is possible. Let's say I have an arbitrary figure like 200, I have a table with two columns (both ints). Lets call the columns col_a and col_b. I need to perform one query such ...
0
votes
2answers
45 views

Recommendation for the mysqldump?

I have approx 90 GB of database, I need to schedule a mysqldump backup , thats why I Required a recommendation how much time it takes for the full hot backup? Because I didn't taken that much size of ...
0
votes
0answers
11 views

Auto created accounts mysql

i have a small question about accounts auto-created after a fresh mysql install. there is an account with Host = localhost, user = 'No user name specified', password = 'No password specified' if i ...
0
votes
0answers
16 views

Concurrency Problem in Inserting data

In a PHP-MySQL app we have a memeber table that we use to store our members data. Before inserting a new member we check member existence based on mobile number and if there is any record we update ...
0
votes
0answers
15 views

Manage duplicate records and other entries based on duplicate records in MySQL

I have following list of tables for my PHP Application. wi_individual_g(ind_id,ind_name,ind_father_name,ind_spouse_name,is_employee,org_id,ind_dob,...) wi_individual_p(ind_id,prg_id,...) ...
0
votes
0answers
16 views

show remaining products

I want to show remaining stock after selling. I can use view table to show the remaining stock but its not a good practice.Is there any other possible way to work on??
0
votes
1answer
20 views

set global variable parameter?

My prod_server version is 5.1.47 and want to set the slow query log dynamically for certain period of time. I refered one site(http://toastergremlin.com/?p=276) there is mentioned below 5.1.6 we need ...
2
votes
1answer
13 views

pt-table-checksum says there is a difference but pt-table-sync with --print says nothing

I am using pt-table-checksum to ensure master-slave is synchronized. When I run pt-table-checksum, I see some differences on employee_profile.trigger_log but when I use pt-table-sync with --print, I ...
-1
votes
0answers
23 views

I have a plan to make a database synchronizer using JOOMLA! and I don't how to start it. Can you help me with this? I am stocked in this part [on hold]

This is the interface I made for my synchronizer. It will first query source databases and their tables and the attributes of the table and then select the target database.
0
votes
1answer
17 views

performance of handling many inserts into an Amazon RDS instance; are there other options? [on hold]

I am looking at using Amazon RDS for MySQL. However, the performance has not been acceptable. Using SQLite, I get about 1000 inserts per second whereas on Amazon RDS, I'm getting about 5 inserts per ...
1
vote
2answers
23 views

MySQL, RAM disk for tmpdir - how to figure out what size it should be?

We regularly run a few large SQL queries to generate reports. It seems that the bottleneck is the amount of time that is spent writing to the tmpdir, which is currently on disk. We are upgrading to a ...
0
votes
2answers
29 views

Transaction has set autocommit = 0, but still the update happens before I commit

I have multiple MySQL InnoDb tables, I am trying to alter/insert/modify many of them in a SQL transaction, I set autocommit to false, so that if some SQL statements fail, I do commit the rest of ...
0
votes
1answer
22 views

what will happen to the binary log if it reaches its maximum value ? Does it reset to mysql-bin.00001 again?

what will happen to the binary log if it reaches its maximum value ? Does it reset to mysql-bin.00001 again ? I know the below points exist means, there won't be any reset happen in binlogs. I ...
0
votes
1answer
26 views

Possibly a silly question: Can I install MySQL on an External HDD connected to my Router?

I have a 1TB Western Digital External HDD and I was wondering if I can turn it into a MySQL Database? The HDD itself is connected to my router via USB (BT Home Hub 3) and I would like to experiment ...
1
vote
1answer
26 views

MySQL 5.5 Replication to Galera/Percona XtraDB Cluster

We are currently investigating moving our current MySQL 5.5 Master > 5 x Slaves (with Statement Based Replication, apx 250GB data and growing) to a HA clustering option. Mainly to provide greater ...
1
vote
2answers
23 views

Number of connection running within certain period of time?

Is there any way to capture number of connections or processes which is running on the prod server each 10 mins of interval? And MySQL version is 5.1.47.
0
votes
1answer
15 views

Is there any way to perform atomic updates of stored procedures in MySQL?

I know that MySQL does not support atomic updates of stored procedures yet and it is bug which was reported on 2005 but not yet resolved.(http://bugs.mysql.com/bug.php?id=9588). In our project ...
0
votes
0answers
14 views

Prevent Reconnections During Application Cluster Restart

I have a large cluster of application processes (>5000) spread out over multiple EC2 servers. When I attempt to restart them or deploy new code (with a restart), they all attempt to reconnect to the ...
1
vote
2answers
31 views

InnoDB row metadata size (minimum row size)

I'm trying to decide whether to normalize a thing further, and need to know what the smallest a row in InnoDB can be (I've got MySQL 5.6). This is not exactly my case, but for simplicity, let's ...
0
votes
1answer
44 views

GROUP BY on two large joined tables

I have two tables: Person ------ PersonID (PK) GroupID DeletedDate PersonData ---------- PersonID (PK) FieldID (PK) Value The fields are custom-created; hence the schema. I am trying to run a ...
0
votes
1answer
38 views

SQL error: Unknown column in 'where clause' [on hold]

I have following very simple PHP MySQL Query: $sql = 'SELECT * FROM bundesland WHERE bkuerzel = ' . $_GET['q']; $result = mysql_query($sql, $con); When I execute the query with a click on a item ...
0
votes
1answer
38 views

MySQL: Get comma separated values from a table, should not exist in another table [on hold]

I have two tables, table structures as below. Table: items Id item_name item_ids 1 pens 10,11,12,13 2 books 20, 30 3 computer 50, 60, 80 Another table : ...
0
votes
2answers
26 views

SELECT that is null if there is one more register in this date that is not null

I'm trying to make a query that I can't produce... This is my table capturainfo captureid int(11) userid int(11) date date dateinit datetime datefin datetime I need to select ...