MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

3
votes
2answers
139 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
1answer
3 views

Auto_increment value needs to be set as S1

Hi I need to set auto increment for a table as S1. I tried by altering the table and also by creating by new table I am aware how to set auto_increment but when i try to set auto increment as S1 i am ...
0
votes
0answers
3 views

What is the differnent between transaction log and redo log in MySQL

I have read about MySQL. In my opinion, I see two log type is very similar. MySQL save how and when data is changed in log. Information is used for recovery of MySQL. I am confusing the function of ...
0
votes
1answer
15 views

How to get “mysqlbinlog” utility for Ubuntu?

I can't find "mysqlbinlog" utility in my Ubuntu server, i can see mysql, mysqldump, mysqlshow etc... command line utilities but not mysqlbinlog utility. Can someone please help me from where I can ...
0
votes
1answer
125 views

MySQL 5.1.x: Performance improvement in Enterprise edition Vs community edition

My application is running on MySQL 5.1.58 community edition. I tried to search enterprise edition of MySQL 5.1.X but only MySQL 5.6.X version of enterprise edition is available. Is it possible to ...
1
vote
1answer
14 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
101 views

primary key: username+current time or serial

I need to choose a primary key, but I'm not sure what the best option would be. Currently I'm in a scenario where a user has machines (workers) calculating hashes. For each user I track the current ...
0
votes
1answer
52 views

Mysql 5.6.17 drop large table locks the server for minutes

We run Mysql 5.6.17. Dropping a large InnoDB table 10GB caused the whole server to lock for about 40 seconds. We have 55GB innodb buffer pool size. I read bunch of old bugs that could be the source ...
3
votes
2answers
140 views

Problem in Fetching Result set in Desired Format

I have 2 tables having the following columns Person ------ person_id, first_name, middle_name, last_name Items ----- person_item_id, person_id, item_type, status, ordered_date The query is ...
11
votes
7answers
13k views

Is it possible to mysqldump a subset of a database required to reproduce a query?

Background I would like to provide the subset of my database required to reproduce a select query. My goal is to make my computational workflow reproducible (as in reproducible research). Question ...
3
votes
3answers
9k views

MYSQL ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol ref used (client option 'secure_auth' enabled)

when I tried to restore all database dump which is in 5.0 version to 5.6 version, it got restored and after that when I tried to reconnect, am getting the following error ERROR 2049 (HY000): ...
1
vote
2answers
104 views

MYSQL joining 3 tables with left join

I have these tables: pupils: (id_pupil, name, surname, email, user, pass, level, class) incidents: (id_incidents, date, time, type_incident, comments, id_pupil, id_user, subject, id_trimester) ...
0
votes
1answer
20 views

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. ...
2
votes
1answer
186 views

SQL table architecture

I'm looking for a SQL architecture solution for the following problem. The idea is that I have a validation form that contains the client's data. Each client can log in to his account and edit his ...
0
votes
1answer
69 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 ...
0
votes
4answers
78 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
4answers
233 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
1answer
489 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
1answer
124 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 ...
0
votes
1answer
14 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
25 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
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
640 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
41 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
58 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
577 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
32 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
115 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
219 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
30 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
14 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
26 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
30 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 ...