MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

2
votes
1answer
65 views

Migrating Oracle 9i database to MySql database on a different Windows Server

I need to migrate my Oracle 9i database with all its tables from windows server 2003 to MySql on another Windows Server 2012. The oracle database is connected to Visual Studio web project. I have ...
2
votes
1answer
77 views

DB Schema for Timesheet

Hi I want to create a web based resource tracking system which will be used by my manager using php and html. The db i am using is MySql. I have already created tables for employee, project etc. I ...
2
votes
1answer
66 views

MySQL v5.1.73 - can the binlog_format betweem Master & slave be different?

We are in the process of testing MySQL replication before using it in production. The MySQL is being setup by Puppet in our case and I noticed that the binlog_format setting is different between ...
2
votes
1answer
29 views

Starting MySQL with SSL option using systemd

Can someone explain how to start a MySQL server with SSL options enabled using systemd? I've generated certificates and edited the my.cnf file to enable SSL but I'm not sure how to restart MySQL so ...
2
votes
1answer
42 views

Strategy for setting up a 60gb MySQL database from a dump?

I have been trying to set up a 60gb MySQL database from a dump. I loaded it into MySQL Workbench on my standard-issue dual-core 2.4 Ghz, 4gb RAM, 2011 Macbook Pro. After roughly 24h, it had only been ...
2
votes
1answer
180 views

Remove duplicate records from table, leaving one copy

I have inherited a MySQL table from one of my colleagues, and am in need of a little advice. The table has the following structure: | PHONE_NO | ACC_NO | GET_MAIL | DATETIME_CRE | INT_ACC ...
2
votes
1answer
41 views

Insert into a DB that was selected via other DB?

I have a table that stores what database should I use for a given device( specified by its IMEI), like this: imeiDB( IMEI VARCHAR(15), db VARCHAR(100)); Let's say I have the database ...
2
votes
2answers
60 views

How to have one Auto Incremented id for two separate tables in mysql?

I have 2 different tables, each having its own id column. I need that if one table is using a specific id, the other table will not use it. This is needed because the object in both tables will later ...
2
votes
2answers
71 views

INET6_ATON returns NULL for input parameter

I'm making a MySQL Stored Procedure which takes a string representation of an IPv4 or v6 address and converts it to binary using INET6_ATON. I know that my version of MySQL supports this function ...
2
votes
2answers
84 views

Can't select 2 tables at the same time

I have a pesId (peopleId) column at pessoas (people) where is stored data from medics and patient. Also I have a table that stores medical consult information like Date, patient id, medic id and ...
2
votes
1answer
51 views

Query to flatten schema

I have the following tables and columns: Users id | other-non-important-columns Containers id | Users_id | other-non-important-columns Content id | Container_id | other-non-important-columns ...
2
votes
2answers
76 views

Optimal engine for small lookup tables in MySQL

I have following question: I am designing web application with several dozens of small lookup tables: These tables usualy contain three columns (ID, Name, Description) and a couple of rows (mostly ...
2
votes
1answer
111 views

How MySQL Queries and Questions status variables are calculated?

I have a mysql server running on 5.6.19 version and I got confused with the status variables Queries and Questions. show global status like 'Queries%'; | Queries | 28058738 | ...
2
votes
1answer
110 views

How to write a query, with multiple foreign key in mysql

I am working on a simple PHP and MySQL college level clinic management system. There 4 main table which relation with foreign key. I'm little bit confusing multiple foreign key in table .. what would ...
2
votes
1answer
71 views

MySQL auto increment column increases after insertion error occurs

I was doing some insertion tests in my database and I realized that when the INSERT statement fails, due error 1452, causes the auto_increment value increase by 1. Even though, there wasn't any row ...
2
votes
1answer
154 views

Levenshtein vs MATCH vs Others for best MySQL string match

I've a database with around 1.9 Million rows. My DB details Server: Localhost via UNIX socket Server type: Percona Server Server version: 5.5.42-37.1 - Percona Server (GPL), Release 37.1, ...
2
votes
1answer
114 views

Why do these concurrent MySQL inserts deadlock?

I am baffled by this deadlock: ------------------------ LATEST DETECTED DEADLOCK ------------------------ 150511 18:42:43 *** (1) TRANSACTION: TRANSACTION B8972CA4, ACTIVE 0 sec inserting mysql ...
2
votes
2answers
39 views

Mysql slow slave

Background: We have our main databases at a data centre which are all working fine. I wanted to add a slave server at our office for backup purposes. I have copied all of the data from an existing ...
2
votes
2answers
138 views

Mysql slow query log always include “# Time:”

I am trying to parse the mysql slow log with logstash so it's important that the format is consistent. I have noticed that if statements execute at the same time, the line # Time: yymmdd is only ...
2
votes
2answers
49 views

MySQL - SELECT on MyISAM Table on index - Does table size (rowcount) matter?

I was arguing with a coworker if SELECT * WHERE t BETWEEN ? AND ? on a MyIsam table where t is an index is significantly slower for huge tables. The hypothetically returned dataset is always the ...
2
votes
1answer
36 views

Strange Availability Problem with MySQL

I am trying to troubleshoot an e-commerce site problem that seems to be database related. In my investigation so far, I noticed that the server seems to have an unusually high numbers relating to ...
2
votes
2answers
92 views

longtext in select makes query extremely slow, even if not used in where clause and empty result set (MySQL)

As soon as I include a "longtext" type in the select clause, the query times go from 8s to 3min (Amazon RDS t2.small). The longtext isn't used in the where clause, and the result set is empty. See ...
2
votes
1answer
33 views

Is using MySQL views a good translation mechanism?

We want to use a foreign vendor MySQL database, but the whole schema is barely understandable by our development team. We could alter the schema to rename tables and columns once for all, but the ...
2
votes
1answer
23 views

Attribute-Attribute Dependency

So as part of our college project, I'm working on CENSUS Database. I stumbled upon a problem wherein if an individual is below the age of 18, his/her marital status should only allow 'NA' and anyone ...
2
votes
2answers
108 views

An easy way to select one db dump from multiple db MySQL dump

In an urgent situation another person made a backup of all the databases from my webserver to one *.sql file (MySQL dump). Now I have a ~700 Mb file with about 20 different databases. As I only need ...
2
votes
1answer
58 views

Find string of decimal digits in Pi

I am trying to find the first occurrence of "12345" in the decimal expansion of $\pi$ by using MySQL. Possibly by using the Instr function? But I am stuck because it only displays the first 7 ...
2
votes
1answer
42 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 ...
2
votes
1answer
73 views

BLObs – Should I Store In Database Or in Directory Structure?

BLObs – Should I Store In Database Or in Directory Structure I have been developing a database to replace an ageing data structure that contains 1000's of files within a directory structure. The ...
2
votes
2answers
861 views

Merge multiple columns into one column in different table?

I've done this before, but I don't remember how. I need to select all rows from several columns in one table and insert them into one column in a different table while keeping them all on separate ...
2
votes
2answers
97 views

Question About Large InnoDB Table with Deleted Rows

Our server has a DB that's over 600 GB - we are deleting older rows that are non-essential to contain the growth. We can't optimize the table due to possible downtown on the table but we are ...
2
votes
1answer
80 views

What's causing this ERROR 2000 (HY000): Unknown MySQL error

I have a MySQL server with version 5.6.12-log (it's running on OpenSUSE). I can connect to it from another server (CentOS 6) using: mysql -h **** -u **** --port **** -p It prompts me for my ...
2
votes
1answer
80 views

Is it possible to gain the precise position of a live mysql database when performing full backup

I have a production database that I usually run fullbackups on once every week. I have bin logs turned on for incremental backups. The production server is on the west coast while business hours are ...
2
votes
1answer
542 views

MySQL ssl setup failed

I am following word by word of http://dev.mysql.com/doc/refman/5.0/en/creating-ssl-certs.html for creating SSL certificates to setup SSL enable replication but it is not working for me. Steps which I ...
2
votes
1answer
112 views

Order by where conditions

SELECT * FROM table WHERE key REGEXP 'some long regular expression' OR key REGEXP 'some other long regular expression' ORDER BY key REGEXP 'some long regular expression' DESC, key REGEXP 'some other ...
2
votes
1answer
232 views

What's the best way to structure logging application data in MySQL

I may be overthinking this but: I have an API; I want to log calls to the API for stat/debugging purposes. Ideally the speed of reads should be quick but is not essential (as will primarily be read ...
2
votes
1answer
2k views

#2014 - Commands out of sync. you can't run this command now. Query was working before. But now it is not working

My table structure is ... There is Counter which has many Box in it. Box has a one BoxType. and Collection stores Box datewise revenue and data. I need data of particular 1 COUNTER (Data of All the ...
2
votes
1answer
118 views

Compare the structure of two MySQL Databases

I have two MySQL databases that are very similar to each other. How can I find out the differences in tables, and the differences in columns in each table? the databases are in different schema. ...
2
votes
1answer
79 views

Efficient manual cleanup of foreign keys in MySQL [closed]

I have an all-InnoDB database in MySQL (Percona) 5.6 that was previously using FK constraints. I had to give up on them as I kept running into locking issues, so I removed the constraints and added ...
2
votes
1answer
290 views

MySQL : Avoid Temporary/Filesort Caused by GROUP BY Clause in Views

I'm planning on creating a view using this SQL SELECT, but the explain for it shows it's using temporary and using filesort. I can't figure out what indices I need in order to fix this problem. ...
2
votes
1answer
162 views

SQL aggregate function performance in a table with many records that is well-indexed

My question is about 3 tables that stores data of a single entity, and there is a report generation feature that refers these tables and calculate COUNT and AVG information. There are three tables: ...
2
votes
1answer
110 views

What is the difference between select and fetch time?

In this article MySql vs MongoDB performance benchmark, they defined two measurements: select time run time (select + fetch) I do not understand what the difference is between these two. Can ...
2
votes
1answer
69 views

Only InnoDB databases locking up

I'm trying to troubleshoot my MYSQL in a LAMP and have an interesting situation. At first I thought MYSQL itself was locking up, but it turns out to be ONLY innodb databases that are locking up. ...
2
votes
1answer
376 views

Sorting Table and get Position of row

I have a Table with 3 rows. Player, Time, Server. Now, I want 2 things and I don't know how. For Server there are 3 worths available. 1, 2 and 3. Server and Player are a Primary Key together. User ...
2
votes
1answer
70 views

How to store a 64-digit key of alpha numerical values into MySQL Database

I am student studying in Database Administration (first year), one of our task requires a to design a login form for corporate and regular users. Below are the requirements for the username and ...
2
votes
1answer
442 views

How to speed up slow query using GROUP BY and CASE?

I'm not very experienced with MySQL and and trying to figure out how to speed up a slow query using GROUP BY and CASE statements. CASE 1 -- GROUP BY and CASE SELECT SQL_NO_CACHE m.id, m.sku, ...
2
votes
1answer
31 views

MySQL InnoDB restoration from hardware failure

One of my server went down due to old hardware failure on a old Dell server that's over 10 years old. I was able to recover the files and got it to a local machine. I want to restore a MySQL instance ...
2
votes
3answers
94 views

Drop Tables with Bigger size

We have a mysql database with a size of 2 TB, in which we have for to five big tables ranging from 110GB to 350GB. When we try to drop these tables the mysql goes to the defunct mode and hangs in that ...
2
votes
1answer
1k views

Unknown column in 'where clause'

I've a query in my php script $result = mysql_query("SELECT State_Id FROM state_master WHERE State_Name='$statename'") or die(mysql_error()); $row=mysql_fetch_assoc($result); return $row['State_Id']; ...
2
votes
1answer
272 views

How much space is needed to reclaim space from a table in INNODB

I inherited a MySQL InnoDB table that has approximately 200 GB worth of data, as well as several unneeded indices that amount to approximately 500 GB. I've archived approximately 75 percent of the ...
2
votes
2answers
153 views

Joining two Mysql VIEWs takes a very long time

I have a textbox (for which I used jQuery auto-completion) in my PHP form where user can insert an actor/actress name and then by clicking "Search" button, a new window is opened showing list of ...