MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
4answers
230 views

Database/Storage engine suggestion for a project involving heavy inserts?

I am looking into a project which involves large number of inserts daily.I will have a list of user's (for example a user set of 500k ) , for which I need to monitor daily certain activities ...
2
votes
2answers
480 views

Problem with mysqldump and view

When using mysqldump to backup MySQL, I got following error. mysqldump --all-databases --routines >> all.sql mysqldump: Couldn't execute 'show table status like 'hdkien'': SELECT command denied ...
2
votes
2answers
122 views

Can I execute an external process via MySQL on table change?

When using triggers, if an update is done to a table then a trigger is executed. This is very convenient. But what I would need is to execute an external script. Is it possible to configure MySQL ...
1
vote
0answers
8 views

pt-heartbeat showing “Host is blocked because of many connection errors”…but connections are well under limit

I'm running MySQL in a master-slave configuration. pt-heartbeat is showing "Host is blocked because of many connection errors"...but connections are well under limit (limit is 600 connections, MySQL ...
0
votes
1answer
7 views

MySQL replication issue when master gets restarted

I have the following environment: NodeA and NodeB in NDB cluster. NodeC InnoDB outside cluster. NodeB is replication master and NodeC is slave. I have set up replication and it works fine. The ...
0
votes
1answer
101 views

Need some advice creating this complex view

I need to create a view or query in MySQL to obtain if product has one or more product_detail. This are the create sentences for tables: CREATE TABLE IF NOT EXISTS `stock` ( `product` INT NOT NULL, ...
0
votes
1answer
21 views

Searching through ~1M slow

I've never had a database with this many rows, so I can new to keeping the search time to a minimum. I have a database table with 1.5M rows. The primary key is an auto-increment id. Then there is ...
0
votes
3answers
74 views

How to Identify the user who issued MySQL Shutdown command

We have had several situations when our production MySQL server suddenly became unavailable. The error log just shows "Normal shutdown" followed by the typical shutdown messages. How can I determine ...
0
votes
1answer
17 views

Mysql query for frequency of e-mail addresses in a field

Newbie here. I know the answer is out there, but lack the vocabulary to ask the right question... I am looking for a MYSQL query which gives me the frequency of addresses in the field emailaddress. ...
0
votes
1answer
37 views

MYSQL will not start

I am getting the errors below when trying to start MYSQL. I've deleted both the ./ib_logfile0 and ./ib_logfile1 files and still no success. I'm assuming is has something to do with not being able to ...
1
vote
2answers
638 views

MySQL Workbench Alter Procedure

i have a problem with my workbench program. I use Mac Lion OS X and mysql workbench program. When i want to do any procedure to alter that doesn't work. Which is show to the procedure code i right ...
0
votes
1answer
16 views

Migrating MySQL database structure with foreign keys fails

I am trying to set up a new testing server with a somewhat complex database structure by dumping the old database and importing it. But even though I use SET FOREIGN_KEY_CHECKS=0;, the import fails ...
0
votes
2answers
36 views

DB Design Payments Table

I'm working on a Desktop application that uses a DB to store information i.e (customers, houses, proprietors, payments). So the application must accept payments from customers to company, company to ...
1
vote
1answer
20 views

Cannot create foreign key on 2 VARCHAR(45) columns in MySQL Workbench 6.1

I'm trying to create a foreign key. The columns in both tables are VARCHAR(45) and neither is a PK, however I keep getting this error message: It is saying the PK of reference table is INT, which ...
2
votes
1answer
57 views

Does READ UNCOMMITTED have the same effect as AUTOCOMMIT=1?

AFAIK running transactions as READ UNCOMMITTED means that there is no lock, so every change caused by a transaction is immediately visible to other transactions. Is it correct to assume that this is ...
0
votes
1answer
576 views

Table Design - User Management

I have designed a database design for a simple User Management System, this system consist of the following things, User - A user may be a Vendor / Employee / Buyer. User - A user may have more than ...
1
vote
2answers
30 views

ib_logfile opened with O_SYNC when innodb_flush_method=O_DSYNC

mysql will open and flush data/log files as below when innodb_flush_method=O_DSYNC Open log Flush log Open datafile Flush data O_SYNC NONE NONE fsync () ...
0
votes
1answer
176 views

MYSQL Timezone support

We are having a shared hosting plan and they are saying that do provide MYSQL Timezone support in a shared hosting plan. I can create timezone related tables in our database and populate them with ...
0
votes
1answer
113 views

Improve MySQL Query Performance - Too many records

I am using MySQL RDMS for a contact management system. Now a days my database grew in size and contains more than 1 million records. Checking duplicate phone numbers became a big issue during ...
2
votes
1answer
213 views

Designing database with Category and Tags for Posts - Seeking for guidance/advice

I'm not really a database novice but I'm not an expert either. Problem: I'm having this difficulty on designing my Post, Category and Tags relationship. I've read Normalization many times but could ...
2
votes
1answer
2k views

MySQL requires FORCE INDEX on huge table and simple SELECTs

We have an application which stores articles from different sources in a MySQL table and allows users to retrieve those articles ordered by date. Articles are always filtered by source, so for client ...
1
vote
1answer
49 views

Can I estimate the row count of a large mysql table using the disk space?

Sysadmin here (not a developer by trade), so go easy please ;) I have a mysql table, on a linux server that uses innodb_file_per_table. When I try to do select count(foo) from table; It doesn't ...
0
votes
1answer
92 views

MySQL thread states when changing an in-memory temporary table to disk-based

In High Performance MySQL (3rd edition) they state that: You can't tell whether a table was created in memory and then converted to on-disk or just created on-disk to begin with... What I was ...
0
votes
2answers
186 views

How to migrate data from SQL database to MySQL including flat files?

one of my friend has asked some asp developer to make online application where user can upload files also. jpg, doc, pdf and all these files are saved in SQL database as flat file. Now my friend asked ...
0
votes
3answers
13 views

Disable MySQL binary logging with log_bin variable

Default MySQL config file /etc/mysql/my.cnf installed by some debian package using APT often set log_bin variable, so binlog are enabled: log_bin = /var/log/mysql/mysql-bin.log When I want to ...
0
votes
1answer
29 views

MySQL: How turning off the logging affect the performance?

OS: RHEL5 DB: MySQL 5.1.73 community edition DB size: ~1GB I have setup a testing environment and turned off all logging - general logs, binary logs, slow query logs etc. I am using Oracle ...
0
votes
0answers
13 views

Amazon RDS CPU Usage keep increasing without any long running process in Show Processlist

We are using Amazon RDS(db.m2.2xlarge), CPU usage is suddenly increasing gradually even after we reboot the DB Server. This is happening just past 2 days and we didn't give any new build recently. I ...
1
vote
1answer
21 views

MySQL server performance plummets

Part of our software solution is responsible for processing files that get uploaded to us by our clients. We want to process them as quickly as we can. Our system is architected so that there's a ...
4
votes
2answers
38 views

InnoDB import performance

I'm struggling with bulk importing a quite big InnoDB-Table consisting of roughly 10 Million rows (or 7GB) (which for me is the biggest table I've worked with so far). I did some research how to ...
0
votes
1answer
111 views

How can i import 150GB database after deleting ibdata1,logfile in MYSQL?

I have 150GB database and my ibdata1 file size is 240GB so i want shrink the ibdata1 file so for that i have to export the DB and then drop the tables and then stop mysql, delete the ibdata1 file and ...
0
votes
0answers
25 views

How to optimize having bit_or?

Let's start with SQLFiddle http://www.sqlfiddle.com/#!2/64fc5/1 I have some urls and I am making some tasks (crons) related to them. Task can be successful or not. I want to try to do it only three ...
1
vote
1answer
26 views

Schema design - Reference slightly different data in different tables

I'm trying to design a schema for a MySQL database and got stuck on the following. My database stores documents which should have relations with blocks of content. create table document ( `id` ...
2
votes
3answers
5k views

Is there a way to recover a dropped mysql database?

I accidentally dropped a MySQL database on my server. Are there any ways to recover a dropped database?
0
votes
1answer
29 views

Restore InnoDB to different machine

It was pointed to me from serverfault that the following question would be a better fit here so this is basically my original question from there. I currently have backups that were taken with ...
5
votes
1answer
2k views

Difference between count(*) and count(1) in mysql?

In MySql we can count the total number of records by using count(1) or count(*). Is there any technical difference between them?
5
votes
3answers
109 views

Find the user with closest taste of mine

I trying to write in SQL the following requirement: Each user can rate as much films as they like. (1= I don't like, 5=I love it) And the system should provide to the current user a list of films ...
0
votes
2answers
67 views

JOIN on variable number of columns

I have the two tables courses AND something_about_courses: courses course_code course_session course_type something_about_courses course_code course_session some_description To ensure that I ...
0
votes
2answers
81 views

MYSQL Optimize tables on Innodb in production environment advice

According to mysqltunner.pl I have 177 Fragmented tables. I have over 5000 tables and 200 databases. If I run optimize table on each of them, do you think I should take down the application to ...
1
vote
1answer
43 views

How to export a MySQLtable with a longBLOB column to an Oracle database?

In MySQL I have a table: Select * from Dummy; Columns like below: id name salary binary_col 1 a 100 A.pdf 2 b 200 b.pdf 3 c 300 c.pdf 4 d 400 d.pdf 5 e 500 e.pdf ...
0
votes
1answer
40 views

Database design suggestions for a data scraping/warehouse application?

I'm looking into the database design for a data warehouse kind of project which involves a large number of inserts daily. The data archives will be further used to generate reports. I will have a ...
0
votes
1answer
12 views

How to minimize the writes needed to update a counter field multiple times

I need to minimize the number of queries that are executed just for updating a counter field. One of my example counter fields is raised by 1 everytime a page is visited, I was wondering what could ...
0
votes
1answer
34 views

How to write a complicated query in MySQL

I use MySQL on Linux. My table is about 8,000,000 rows. The table has indexes on advertiser_id, activity_date and activity_date, advertiser_id, activity_type. The table looks like: activity_date ...
0
votes
1answer
146 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 ...
1
vote
1answer
53 views

Different column for different conditions when joining

I am using MySQL database and in that two tables, relation is one to many. One table is product table, sample data: +----+----------+ | id | name | +----+----------+ | 1 | product1 | | 2 | ...
1
vote
1answer
21 views

InnoDB internals - checkpoint, LSN, dirty pages

I'm looking into innodb internals regarding buffer pool and checkpoint, dirtypage. However there isn't enogh information to answer my question. When I run show global status, I can get ...
0
votes
1answer
121 views

Database design for mobile app

At first I would like to say hello to all of you, since it is my first post here on DB Administrators. I am writing an app which store drinks and their data. At the beginning it was storing all in ...
2
votes
1answer
65 views

Inconsistent MySQL query execution times

We run tests on two servers: one in production [Old Server] and the other one in tests [New Server]. Both tests used the same database. [New Server] Dedicated MySQL 5.6.17 server on Ubuntu 14.04 ...
0
votes
2answers
40 views

Msg 2627 Violation of PRIMARY KEY constraint

trying to make a database for teams in a tv show here. but when I try and insert data into tblShowteam the following error made its appearance. Msg 2627, Level 14, State 1, Line 2 Violation of ...
0
votes
1answer
17 views

MySQL Referential Integrity Issue

I'm having a lot of issues and don't really know where to look. I'm pretty sure it's a referential integrity issue and has something to do with the addition of the Professor table and the Foreign Key ...
2
votes
1answer
690 views

MySQL - run SELECT statement on another server without defining the table structure

In MySQL I can query information on another server using federated tables, as long as I've defined the same table structure locally. In MS SQL Server, however, I can run any SQL statement against a ...