MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
0answers
9 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 ...
0
votes
0answers
8 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 ...
0
votes
3answers
10 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 ...
1
vote
1answer
17 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 ...
0
votes
0answers
21 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 ...
4
votes
2answers
27 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 ...
1
vote
1answer
19 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` ...
0
votes
1answer
26 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 ...
1
vote
2answers
22 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 () ...
1
vote
1answer
19 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
25 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 ...
0
votes
1answer
35 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
15 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 ...
0
votes
1answer
10 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
0answers
19 views

Problems with foreign keys in a mysql database

I am trying to link both these tables with a foreign key. But I keep getting error message "ERROR 1452: Cannot add or update a child row: a foreign key constraint fails " the foreign key is pwalk_id ...
1
vote
0answers
17 views

Replication of a remote MySQL database to local MySQL database

I'm the developer of my employers corporate private website, a HTML5/PHP/CSS powered site for company reports etc. The site, hosted on a shared hosting package, connects to a remote read-only MySQL DB ...
1
vote
1answer
20 views

Using MySQL Workbench, what is a good way to do development on an alternate server and copy changes to the main server?

This is a noobie question. I'm taking over a database project from someone who recently left the company and I'm looking for advice on how to do some development on a test platform before making ...
0
votes
1answer
33 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
0answers
21 views

MySQL Optimisation

I am running mySQL 5.6.16 on a server running Centos with 20Gb RAM ad 1TB disc space. when running SELECT scripts wiht order and group by statements and a number of joins, the results can be very slow ...
0
votes
1answer
25 views

Intermittent connection errors

I am experiencing occasional connection errors from my webserver to one of my databases. The code attempts to connect. If it fails, it sleeps for 1 second, then retries, then (if it still fails) ...
0
votes
0answers
19 views

How to make changes to MySQL database settings

I'm a real DBA newbie and have learnt everything in the last day, so need basic guidance on how to implement the recommendations from MySQLTuner (which i eventually managed to do!) >> ...
1
vote
1answer
52 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 | ...
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 ...
1
vote
1answer
23 views

Determining Homogeneity by Common Foreign Keys

I manage a MySQL database of ten or so tables. In higher code, I have a list of primary keys belonging to entries of some table A. These A entries have foreign keys to entries in another table B. The ...
1
vote
0answers
26 views

Conceptual model vs Logical model vs Physical model

I'm doing a work about database, and now I need to show three different images, one image with the conceptual model, other with logical model and other with physical model of a database. I'm looking ...
1
vote
1answer
23 views

mysql server cannot launch in windows 7

I have been using MySQL as a windows service successfully on my windows 7 machine for perhaps a year. It has always worked fine. Here are the steps which I think caused it to no longer launch: ...
2
votes
1answer
28 views

WHERE attribute having two relation lines in the same SQL

I have a database designed with tree tables: checklist (id, name) tag (id, name) checklist_tag (checklist_id - FK, tag_id - FK) Running this SQL: SELECT cc.id as checklist_id, cc.name as ...
0
votes
1answer
14 views

Problem with MySQL Cluster in practice

I am researching MySQL cluster. For the purpose, I do a demo with 4 virtual machines. I have some problems in practice. Topology My topology contains four nodes Node 1: management node, ip address ...
1
vote
1answer
25 views

In MySQL how do I grant a user access to a read replica only?

I have some users that I want to grant read only access to my database so I setup a replica server, but I don't want to grant them access to the master. I'd assume that this is a common use case, but ...
0
votes
1answer
64 views

Need to get the first 15 rows from 200k rows of data fast [on hold]

I have 3 tables with a lot of data (each one has 100k rows). I used UNION to get data from that. It takes more than 5 seconds as wait time in server to load the first page. I need only 15 rows from ...
0
votes
0answers
17 views

wp db issue, need help selecting table values

Hey I am trying to figure out how to select only those items that have same ID but different values in another column. it's Wordpress database structure. My table sample would look something like ...
0
votes
1answer
20 views

Get the most present elements from many fields

Here is my table: id|item0|item1|item2 --+-----+-----+----- 1 | 10 | 12 | 12 2 | 12 | 68 | 13 3 | 15  | 13 | 10 I just want to get the most present number of all itemX columns. The query ...
0
votes
1answer
25 views

MySQL Syntax Error When Creating a Trigger

I am trying to create a trigger but I am getting a syntax error and I am not really sure why I am. CREATE TRIGGER Section_Insert AFTER INSERT ON Section -> FOR EACH ROW BEGIN -> INSERT ...
1
vote
1answer
34 views

Why does adding a column to a MySQL table take incredibly long?

I am using MySQL version 5.6 and I have a database that is in total around 110 GB in size. One of the tables, "outputs" is 49 GB in size. I tried to add a simple BOOL column to the outputs table with ...
0
votes
0answers
23 views

Should I separate my preferences table?

I have a hobby site where users can find other hobbyists of similar interest. Each user can set a series of preferences that get saved into user_prefs. Right now there are 4 types of preferences, an ...
15
votes
2answers
3k views

Why would SELECT * be magnitudes faster than SELECT foo?

Consider a table of values and hashes, like so: +------------+----------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | ...
0
votes
1answer
49 views

Enforcing minimum cardinality in One To many design?

If we have the following One to Many database design. Team +------+-----------+ | t_id | team_name | +------+-----------+ | 100 | germany | +------+-----------+ FootballPlayers ...
0
votes
1answer
15 views

Can I Create a Database and Tables in One SQL Command From PHP?

I tried separating the CREATE DATABASE and CREATE TABLES commands into different mysqli_query statements. The Database gets created but I get an error with: $create_tables = "CREATE TABLE ...
1
vote
1answer
40 views

MySQL CHAR(500)?

I have a table in which one of the fields is always going to be exactly 500 ASCII characters. I'd like it to be saved inline in the database and be as efficient as possible, as it will be a big ...
0
votes
1answer
25 views

How to query group for increase or decrease in value

In MySQl I have a table positions and I would like to find out if position of certain app for certain feed in a certain country type has been increasing/decreasing and by how much from the last ...
0
votes
1answer
31 views

How to safely add column to replicated mysql database

We have 2 databases, one is a replication used for read only, with around a million records, we want to add a new column to the master db, to one of the tables. Do I just go on MySql workbench and ...
0
votes
2answers
51 views

Database Design Help: MySql/PostgreSQL Single Database/Multiple Databases

We are planning to build a web based custom business analytics tool using PHP and MySQL/PostgreSQL. In our application, we are planning to upload customer’s data using a Excel sheet and these data ...
-2
votes
1answer
58 views

Errors writing MySQL Queries

I'm having trouble writing some MySQL queries. I have been having a lot of trouble getting these queries to work. a) For each class that has at least one qualified professor to teach, list the number ...
2
votes
2answers
21 views

credentials file for running mysql related jobs via script?

Is there a method to point mysql to a credentials file instead of entering account passwords directly in scripts? Example: mysqldump --opt --credfile /etc/mysql_creds mydatabase > output.sql ...
1
vote
1answer
36 views

Is my MySQL instance irretrievably dead?

I'm trying to install a JIRA instance on a MySQL 5.1.73 instance running on CentOS 6.5 for our developers. The install gets to the point where I need to create the database, and then FLUSH ...
2
votes
1answer
37 views

InnoDB: “Only one log file found” after binary import

My first one on DBA... After successful upgrading a master MySQL server 5.5 to 5.6.17 (CentOS 6 VPS serer), I done and moved my binary backups to a slave server (same version 5.6.17 but different ...
0
votes
1answer
36 views

how to create invalid utf-8 characters in MySQL

I'm trying to test some application level ruby methods and how they handle invalid utf-8. I'm trying something like to get invalid utf-8: mysql> update items set header=UNHEX('4D2AFF') where ...
1
vote
2answers
53 views

How to stop ROLLBACK in progress?

How do I stop a rollback in progress. I killed a very long running INSERT INTO table1 SELECT * FROM table2 statement. I want to commit what's already there but I can't since it's rolling back. This ...
-1
votes
1answer
29 views

mysql server is not starting

mysql server is not starting after modifying configurations key_buffer = 16M max_allowed_packet = 16M thread_stack = 192K thread_cache_size = 8 query_cache_size = 16M after ...
0
votes
3answers
26 views

Last mysql reboot

Is there a way to check the last restart of mysql server, in global variables or something else ? System : redhat Logging : not activated