MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
0answers
11 views

Soundex on a Large Table

I had a table of names, containing 200,000 rows. This has now been updated to include over 11 million rows. The table is queried using a SOUNDS LIKE 'str' and the result is then passed through ...
1
vote
1answer
22 views

Are Blob Sizes Fixed?

I'm using sqlalchemy to store objects in a database. The kind of object I'm creating is unknown until run time. I could be storing something as simple as a string. I could be storing a jpg. I ...
1
vote
1answer
14 views

MySQL Host 'host_name' is blocked - Which Database?

We are getting the error that a host is blocked on MySQL Host 'host_name' is blocked because of many connection errors. Unblock with 'mysqladmin flush-hosts' I understand how to clear this error ...
2
votes
1answer
31 views

Is it mandatory to enable --log_slave_updates with MySQL Replication using GTID? [duplicate]

I'm setting up 5.6 Percona Mysql, in order to enable GTID should I have to enable log_slave_update on both Master and Slave ? If I should enable log_slave_update, then I'm counting this to CONS for ...
1
vote
1answer
28 views

How to force MySQL/MariaDB to show numbers in scientific notation?

I have a local MariaDB server 5.5.37 where I have some numeric data in it stored as DOUBLE. I need to perform some queries on this data (things like AVG(...) or STD(...)), and I also have a MySQL ...
0
votes
1answer
23 views

How to union tables into a new table in mysql? [on hold]

I have a table as following: id col1 col2 col3 type 1 12 12 23 1 2 23 33 1 0 3 333 2 21 1 ..... I try to select 1% sample of where type=1 and all the data where type=0, I ...
-1
votes
0answers
14 views

Autoupdate MySQL database from form entries?

I'm trying to build a student course-registration system, something with the following features : Autoupdate entries/registration The student fills in a form with checkboxes representing the ...
0
votes
0answers
22 views

MySQL show rows that have a match in another table [closed]

I have two tables, where 1st table is all my data, while table 2 has a list of dates (and some other stuff) I'm interested in. How can I filter data in table 1 so that only rows which contain dates ...
0
votes
2answers
25 views

MySQL excessive tmp disk tables after Upgrade to 5.6

After upgrading two MySQL-Servers which run Master-Slave replication from Percona MySQL 5.5 to Percona MySQL 5.6 an excessive amount of temporary Tables gets created on the slave. The Master seems to ...
0
votes
4answers
141 views
+50

Amazon: How to change database name in Amazon RDS MySQL?

I want to change MYSQL database name of the DB instance of Amazon RDS. How it can be possible?
0
votes
1answer
19 views

Error 1236 From Master After Restored Replication

I've been trying to restore a broken replication caused by power interruption. upon checking the slaveDB, it was already broken so I setup a new replication. And upon supposedly completing the ...
1
vote
1answer
45 views

Group by age range and gender with aggregation function on some columns

In Mysql, I have a patient table with id, birth_year and gender. Next table is transactions in which I have id, patient_id [FK from patient] and checkup_date. I need to select rows such that I get ...
0
votes
1answer
25 views

Create relational database with same table items [on hold]

I am having trouble building a database. I'll explain below what I am trying to acheive and show you an example of my current table layout. I have an accounts table and each account can have one club ...
1
vote
0answers
35 views

GROUP BY multiple columns

I'm trying to draw stats out of a table and depending on the increment, group them by year, month, date. The table is as follows CREATE TABLE `channel_stats` ( `channel_id` int(10) unsigned ...
1
vote
1answer
23 views

How to update MySQL data within intranet from MySQL data in cloud?

I am currently using a MySQL DB located within the intranet. Only the people within the LAN can access the information. I'm trying to re-create the MySQL DB in a cloud provider. This can be accessed ...
3
votes
1answer
53 views

How to migrate from MySQL to MariaDB or Percona with minimum downtime?

I want to migrate my MySQL 5.1 database to one of these databases: MariaDB, PerconaDB or MySQL 5.6 Is there any way to do this operation with no downtime or with minimum downtime possible? How? The ...
0
votes
1answer
24 views

Solutions to migrate databases

I'm working in redesign an application. This application has a MySQL database and has approximately 50 tables (there are no relations , there are not standars, etc). We want to migrate to Postgresql ...
0
votes
1answer
24 views

MySQL FullText search on string shorter than 3 chars returns no rows

I have a MySQL table with some addresses in it. Let's say I have the following 2 rows: "10 Fake Street" "101 Fake Street" I'm trying to use fulltext search with MATCH() AGAINST(). I have set ...
0
votes
1answer
14 views

Update table from another database

I have two databases database_a & database_b with the exact same structure, but different email data. How do I update all of database_b's email field with the ones from database_a based on the ...
1
vote
0answers
9 views

Tuning MySQL On Azure Windows Server Setup

I have a MySQL 5.5 running on Azure VM Windows Server 2012. Once per second the log db gets about 2K inserts through LOAD DATA INFILE... once a day I need to run stats and when the stats are crunching ...
0
votes
0answers
21 views

How to figure out how to split a table using the proper scheme

If you have a big table that you want to partition and you have 2 candidates as the partitioning key (in the sense that 50% of the queries use one column and 50% of the queries use the other column ...
0
votes
0answers
16 views

Unaccounted for MySQL Processes

I am running a MySQL 5.5.38 on a VM running Ubuntu server 12.04. At certain times of the day around 12 mid day, CPU Utilization and loads spikes to over 90% with the MySQLD Process accounting for most ...
0
votes
1answer
34 views

Selecting default value query returns blank

I am trying to select the default value if a row do not have a value with this snippet 1 SELECT IFNULL((SELECT as_title FROM all_scheduled_messages WHERE id = 1 LIMIT 1) ,'lorem ipsum'); When i ...
0
votes
1answer
26 views

MySQL select data over time that matches pattern over several rows

We currently log data from our plants running remotely for diagnostic purposes on MySQL. I have been asked to come up with a typical running profile for several variables. For this, I would require ...
-1
votes
1answer
17 views

How to select different format of the date in mysql

0 down vote favorite i have this table and i cant change its format to yyyy-mm-dd because i have so many scripts that are related to this format dd-mm-yyyy , it would be a mess if iam gonna change ...
0
votes
2answers
23 views

select rows where timestamp is a multiple of n seconds

I am logging live data to a database where it is then selected by a php script and posted to a graph on a webpage. A new datapoint is added every second and I have been graphing the most recent 300 ...
0
votes
1answer
16 views

Use mysqdump to backup table with a new table name

Is there a way to back up a table using mysqldump so the table that is being backed up can have a new name in the sql script created by mysqldump. So that If I back up the table 'test_table' like so. ...
0
votes
1answer
60 views

Why does mysql give different result for this summations?

Can someone help understand the following behavior? mysql> select (1/3 + 1/3 + 1/3); +-------------------+ | (1/3 + 1/3 + 1/3) | +-------------------+ | 1.0000 | +-------------------+ ...
2
votes
1answer
39 views

Which database technologies to consider for a data search application?

I'm designing an application that only does read queries to some database tables (it's a kind of search application); the queried data is updated at night by the system (so speed is less critical, ...
-1
votes
1answer
45 views

Select latest record for each ID

I have three tables that contains data as below: Users Id Name Other_Columns --------------------------- 1 John Blah 2 Ricky Blah 3 Stella Blah 4 Bob Blah Saldo Id ...
0
votes
1answer
30 views

Merge 2 SQL statements into 1?

Can anyone help me transforming these 2 SQL statements into 1? $query2 = "SELECT DISTINCT `UID` FROM `ratings`"; $query3 = "SELECT `RID`,`rating` FROM `ratings` WHERE `UID` = $uid"; original php ...
-1
votes
0answers
23 views

How to copy the database file stored in Ubuntu

I have created many databases in MySQL. Now I want to copy the files to store them on another computer. Is this possible? How?
0
votes
0answers
25 views

many to many relationship tables for four or more master tables

We are developing a database for storing licensedetails of source code, archives, shareobjects, binary. We parse a detailed build and extract list of source files that make objects, list of objects ...
0
votes
1answer
36 views

forloop for a-z

I need to alter a database by a simple pattern. An value starting with /aa get turned into '/a/a/aa', and /ab get turned into '/a/b/ab', and /ba get turned into '/b/a/ba' and so on 0-9 and a-z. This ...
3
votes
2answers
42 views

Is this substring_index behaviour documented or a bug?

mysql> show variables like 'version'; +---------------+-------------------------+ | Variable_name | Value | +---------------+-------------------------+ | version | ...
0
votes
1answer
33 views

alternative to trigger. Cascade

I have 2 tables: table_a: id int, user_id int, job_id int and table_b: id int, user_id int, job_id int I would like achieve something like when I delete a row from table_a it also delete a row ...
0
votes
3answers
46 views

Cannot start MySQL server following upgrade

I've just upgraded MySQL from 5.1.59 to 5.6.20 (OSX 10.7) and now the MySQL server will not start. In MySQL Workbench (v6.1.7), in the startup/shutdown view, upon trying to start the server, the ...
0
votes
1answer
16 views

Importing Data with Single .ibd file

I have one ".ibd" file with me. I have configured my local Database server with FILE_PER_TABLE option. i have two question here. When i was trying to restore/import the IBD file, the engine expect ...
-2
votes
1answer
19 views

What is the correct format to do this?

SELECT DISTINCT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME.value = 'Diwali' AND TABLE_SCHEMA='database_name'
0
votes
0answers
34 views

mysql select latest per group using 2 different tables along with self join

I have a query SQL Fiddle which contains 2 tables tbl_data CREATE TABLE tbl_data ( id int(10) unsigned NOT NULL, type varchar(32) NOT NULL DEFAULT '', title varchar(255) NOT NULL DEFAULT ...
0
votes
2answers
44 views

mysql - query records to fetch by time stamp

I've a MySql 5.6 DB with a simple table (MyISAM) . | UniqueKey | TimeStamp | ------------------------- | 1 | 1024125412 | | 2 | 1024125413 | | 3 | 1024125414 | My table ...
0
votes
1answer
12 views

MySQL table replication on the same server

I have one the same server (Linux) two databases: db1 and db2 and I want to replicate db1.table1 to db2.table1 I added the following lines to my.cnf and restarted mysql service replicate-do-table = ...
0
votes
1answer
18 views

Monitoring MySQL performance

I have been updating an old MySQL php app for a while now. It doesn't really request much data, maybe 20kb per request. But originally the timer on it was set to update every 60 seconds. This was made ...
0
votes
1answer
20 views

MySQL 5.1.73 to 5.6.17 structure + data export

Are there any known issues to export structure and data from MySQL 5.1.73 to 5.6.17? Nothing fancy and to export-import user will use phpMyAdmin. Thanks
0
votes
1answer
12 views

For two triggers(before insert and after insert),is it allowed for you to use where in the NEW keyword

I have two triggers.One after insert trigger and the other before insert trigger.The two triggers are using the NEW keyword to get the last inserted message. Both triggers are watching a table called ...
1
vote
1answer
23 views

Multiple User Types - DB Design Advice

I'm developing a web application that will support user authentication with corresponding roles for each user. Also, my users can be of different types and have different fields associated with them. ...
2
votes
1answer
21 views

Is it possible to enforce a Unique Constraint on a Dataset comprised of joins

I am playing around with an idea to describe friendships in a system, and I am wondering about constraints. I currently have a database that looks like this: Users: ...
0
votes
1answer
34 views

How to generate a sequence in mysql

Consider this table in mysql create table numbers (number int); insert into numbers values (3), (2), (9); select * from numbers; +--------+ | number | +--------+ | 3 | | 2 | | 9 | ...
0
votes
0answers
20 views

Replicate/Sync Production database with Development database (no Master/Slave)

I currently use ClearDB MySQL DaaS for my production database, and a local MySQL database on my dev server for development. I need to have the production database replicated/copied/synced to the dev ...
0
votes
0answers
27 views

Packet and N-SubPacket Msql query ( same as catgeory and N sub catgeory )

First of i am PHP Developer , and working on huge project alone .i think i have made many mistake in creating table. and below is one of those. I am making packet type system when in my Packet Table ...