MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
2answers
20 views

lot of relay log formation in mysql5.6

Reason for lot of small relay log file formation. I Have setup a slave and it relay log rotates to soon and creates thousands of relay log file.whats the reason for more relay log formation.
1
vote
3answers
102 views

Reset of root password not working?

Our previous DBA left and didn't note the root password down, and I've been pressganged into doing part of his job until we can hire someone. So I create a file : /root/mysql.password Inside that ...
7
votes
4answers
16k views

“Can't find file mysql/plugin.frm” when starting up MySQL

When I start my MySQL server, I get this error: /usr/libexec/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13) [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create ...
1
vote
2answers
23 views

Awful execution plans after migrating from MySQL 5.5.11 to MariaDB 5.5.41

We just migrated our web site database from a server running MySQL 5.5.11 to one running MariaDB 5.5.41. Everything is working mostly fine, except there's at least one query from our storefront that's ...
3
votes
1answer
896 views

Insert Speeds for large batches

In my application, my INSERTs seem to be taking a major chunk of the time. I have a large number of objects in memory (~40-50,000) which i want to insert into a table. Lets take a sample table ...
0
votes
1answer
4k views

Select from a list of values from JSON encoded data

I have saved the details of the product in JSON format. I am wondering how to select from a list of values from a "JSON_ENCODED DATA" For Example I want to select TV with screen_type as LED or LCD. ...
1
vote
1answer
25 views

Correct 'lines terminated by' for query

I am trying to query two tables of data and send them to a csv file for upload to a website. However i am having trouble getting the formatting to play ball. I want headings to separate into columns ...
0
votes
1answer
30 views

'USE db_name' takes too long to change when login remotely

I gave SELECT privilege to a user on a particular database, Now whenever I try to connect remotely $ mysql -h ip-of-remote -u username -p with that user credentials and try to change the database ...
0
votes
0answers
7 views

table with reference to 2 other tables for ORM [migrated]

I need to have a comment table which references 2 other tables, posts, and article. 3 in total including the user_id. Comment ------- comment_id user_id article_id post_id Is this possible? I ...
2
votes
1answer
309 views

Mysql HY000 the table table_name is full when adding new column

I can't add a new column innodb table which size's 16MB. when I try to add, mysql says HY000 the table table_name is full. I changed my tmp_table_size and heap_size but mysql still says same error. ...
3
votes
2answers
58 views

Mysql Index for concat select

For Below Query SELECT MAX(CONCAT(date, ' ', last_entry)) AS LAST_LOG FROM entry_log WHERE TRIM(LEADING 0 FROM card_no)='2948' I've index on date card_no date,last_entry ...
0
votes
1answer
33 views

What is a good size to accommodate a single-use database for a small application? [on hold]

I'm looking to provision out arbitrarily many sandboxed MySQL databases for anyone to use, similar to how SQLFiddle does, but permanent and with API keys (one database per key), which would allow ...
0
votes
1answer
135 views

MySQL over total memory allocated usage? memory leak?

i'm using 5.6.21-70.0 for performance test. when i run mysqlslap -a --concurrency=40 --number-of-queries 1000 --iterations=500 --engine=innodb --debug-info -utest -p do some performance test ...
0
votes
1answer
978 views

SQL Server to MySQL sync, using Workbench, FreeTDS, and iODBC on 10.9

I've been struggling to get the MySQL Workbench to behave properly to complete the following: With Mavericks (OS X 10.9), connect to a SQL Server and create a migration job to a MySQL server. The ...
0
votes
2answers
821 views

Why is my RDS mysql slow query log full of server restarts?

One of my RDS mysql databases is giving me warnings about the slow query logs taking up significant space. The logs are rotated once an hour, and contain a dozen repetitions of: ...
0
votes
1answer
137 views

mysqldump 5.5.25 use swap instead of memory

mysql version 5.5.25, while use mysqldump to dump big tables, it eat lots of swap while there is lots of free memory. # free -m total used free shared buffers ...
4
votes
6answers
1k views

How to find the nth highest salary in SQL?

I have found a query to find the nth highest salary from Employee table , but i don't understand the logic of (N-1)? EmpID Salary 1 90000 2 80000 3 54000 4 ...
0
votes
1answer
426 views

Could not start mysql or MariaDB. Permissions were ok, but mysql-bin.index permission error

Using MariaDB 5.5.36. Here's what I got while trying to start MariaDB: # syslog Dec 14 09:40:52 vps1497 mysqld_safe: Starting mysqld daemon with databases from /var/lib/mysql Dec 14 09:40:52 vps1497 ...
2
votes
2answers
726 views

What is default MySQL binlog retention in AWS RDS?

I tried to retrieve my MySQL RDS binlogs in order to run manual "rollback" for some SQLs. Unfortunately, I noticed that only 2 binlogs for the last 30 minutes are available. "call ...
2
votes
3answers
1k views

Mysql datatype for username of maximum 15 characters

I currently have a database with the "user" table having username as one of the columns. I allow a maximum of 15 characters for the username in my system... Is it fine to have the username column as ...
2
votes
1answer
586 views

Why would the size of MySQL MyISAM table indexes (aka MYI file) not match after mysqldump import?

I've been archiving some MySQL (version 5.0.96) MyISAM tables locally and deleting from my server after checking the data. Every time the process has been pretty similar and comes off mostly without a ...
3
votes
2answers
196 views

MySQL - Creating a user and specifying a password

How do I create a user and specify a password in one line: I thought CREATE USER 'foo'@'2.2.2.2' IDENTIFIED BY 'bar'; would do it but apparently it doesn't. Any thoughts? I'm on version 5.1.49 of ...
0
votes
0answers
19 views

SQL Error 1452 : Cannot add or update a child row: a foreign key constraint fails

I am trying to install Zabbix by following this guide. I ran into the following problems when trying to run data.sql after running scheme.sql successfully mysql -D zabbix -uzabbix -pPassword < ...
0
votes
0answers
17 views

Update MySQL column from column in another table

I have a table, products2013, with column upload_id which I would to contain the value upload_new_name from correlating table uploads (also containing upload_id). I tried putting together the follow ...
1
vote
1answer
621 views

MySQL relay log rotates too soon and too often

I have a simple master/slave setup where the slave is just a backup. Sometimes I notice that the relay log on the slave rotates too often and too soon, when it is still very small: 4:00 PM ...
0
votes
0answers
22 views

Most efficient way to store a large, changing number of properties

I have an entity with a large number of boolean properties. It currently has ~100 properties It will periodically get new properties The number of properties will grow to 400+ There will be ...
0
votes
1answer
132 views

Please suggest my.cnf configuration based upon mysqltuner findings

I have been facing a lot of slow browsing on my site nerdeky.com. My server administrator suggested me to use mysqltuner.pl to find and tune my databases. Can anyone select me what should be the good ...
0
votes
0answers
8 views

MySQL - Update vs. Replace Into — why is Update non-parallel, and Replace Into allows multi-threads?

In trying to optimize a query that does (Insert ... on duplicate key update) .... someone suggested I do "Replace Into" to optimize performance. I'm not 100% certain the difference other than ... ...
0
votes
1answer
21 views

Shell script for backup binlog files for every 8 hours in MySQL

I'm writing a shell script for point in time recovery for MySQL Instance. Our requirement is backing up Binlog for every 8 Hours (Daily 3 times) using mysqlbinlog and it should backup binlog starting ...
0
votes
0answers
19 views

With certain queries cpu at 100% after database update [closed]

Recently I updated my online shop database table with newer data. Table contains typical columns like - status, total, currency, email, address etc. Table has 15569 rows = orders. After update if I ...
0
votes
1answer
38 views

How do I perform a query on a dynamic list of tables?

I have a database named as ( conntrack ) with unknown amount of tables.I have a static table "tabidx" which has one column "date". The following table is static and its name is tabidx which provide ...
0
votes
2answers
26 views

Get a user's rank from an equation, and then store it in the table

I'm working on a project for my database class, and I have a table called "accounts". It looks like What I want to do is have a stored procedure where it calculates the new ranks for each account. ...
0
votes
1answer
10 views

Update Column in table on midnight daily

I am designing a simple 1 table database in mySQL that will have two columns. One column will be the name of a specific restaurant on the webpage I will be using this database with. The second column ...
3
votes
3answers
49 views

How to generate documentation from stored procedures? [closed]

I'm working with a new set of tables and an increasing list of stored procedures. Is there a way to generate documentation out of the comments on tables and stored procedures, like autodoc or ...
0
votes
0answers
43 views

Best way to restore 400GB+ worth of data in MySQL 5.6

So I'm trying to figure what the best/quickest way would be to refresh a massive amount of data. We're wanting to copy 3 months worth of data from a replication server to a QA server for product ...
0
votes
0answers
26 views

How to avoid data fragmentation in a MySQL table

We have a table in MySQL that contains several years worth of hourly time series data. A few thousand rows get added to the table every day. We're using the InnoDB storage engine. At this point we'd ...
3
votes
1answer
36 views

Select Column value based on two values in another column

I am using the below table: 1 0051ML66220600132482 06:00:00 06:00:00 1538 100 0 1 2 0051ML66220600132482 06:00:00 06:00:00 1540 200 0 0 3 ...
0
votes
0answers
11 views

Can anyone explain TokuDBs seemingly large amount of data_free for an append only table?

I have a large table I've been maintaining replicating in parallel in innodb in one slave and tokudb in another. I'm seeing promising results in expected compression ratios but am noticing something ...
2
votes
1answer
454 views

Alter mysql database engine doesn't work from cluster to other

I got into this issue when I tried to alter my database table engine to InnoDB from ndbcluster, It did not work. But When I changed engine from InnoDB to ndbcluster it worked. It did not throw any ...
1
vote
1answer
166 views

If exists then update else insert

I am trying to create a STORED PROCEDURE that will be used to UPDATE a table called machine. This table has three columns (machine_id, machine_name and reg_id). In aforementioned table,reg_id (INT) ...
0
votes
1answer
203 views

Get child record from specific root

I have two tables articles and topics and I am using MySQL 5.6 Articles id topic(fk on Topics.id) featured 1 1 1 2 2 0 3 3 ...
1
vote
1answer
19 views

Updating databases that user's can manipulate

I have a product that includes a MySQL database with some defined countries (very few, not all of them). The user has some control over this table - they can add / edit / delete countries. When we ...
0
votes
1answer
26 views

Sync Data Without Replication

I have a database server I am using an old dump from to restore due to the need of older records that must be brought back. I also need to sync to this database the new entries from the current ...
20
votes
1answer
29k views

What is the best way to reduce the size of ibdata in mysql?

I have some Production servers whose ibdata files increases in size day by day. It has already consumed 290GB of space. The tables in the servers are mostly InnoDB and there are high read and write ...
0
votes
1answer
35 views

How to determine if an Index is uselss in Percona MySQL?

Using Percona Server 5.5 I've a table which stores user activty (lets call it user_activity). It was created quite a few years ago when I had only a little bit of knowledge about database ...
-1
votes
1answer
21 views

SQL Error 1054 Unknown column in 'where clause' [closed]

I've created an database with 5 tables and each of the tables have various rows and columns as data. When I try to select some of that data, I'm getting that error in the title and I have no idea how ...
0
votes
1answer
53 views

Does my ERD look well designed?

I am making a database at no cost for a local dance school. I'm still very new this would like to be sure that I designed it appropriately. From the front end, the parent will: fill out their ...
0
votes
1answer
18 views

Does having no brackets at “WHERE” produce same results as having brackets? [closed]

Does having no brackets at "WHERE" produce same results as having brackets? I have same result, just wanted to confirm, because from my memory it always best to use rounded brackets. SELECT ...
0
votes
1answer
168 views

Very slow update with subquery (different tables)

I run this query to update "domains" table based on "log" table: UPDATE domains SET domains.mx_collected = 0 WHERE domains.domain IN (SELECT log.mail as domain_name FROM log WHERE `time` >= ...
0
votes
0answers
14 views

Memory consumption of production MySQL

The MySQL database on one of my production servers consumes a lot of memory. The problem is that I cannot trace what causes that kind of high memory usage. Following values illustrate the problem. ...