MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
1answer
28 views

mysql variables are inconsistent

Just started out with MySQL 5.5 on Ubuntu Server 14.04 and ran into a strange issue. I always show the settings of the variables by typing mysql --help. Just to get familiar with MySQL-Server I ...
0
votes
2answers
43 views

Killing a process without login to MySQL

Here is the situation: I was running a very complex query on a database which was expected to execute within a few hours over night(server configuration is not good and data set is large). This ...
0
votes
0answers
10 views

Mysql Cluster Don't save data on data node

I am using mysql cluster. This is my setup [ndbd(NDB)] 2 node(s) id=2 @192.168.64.236 (mysql-5.6.23 ndb-7.4.4, Nodegroup: 0, *) id=3 @192.168.64.235 (mysql-5.6.23 ndb-7.4.4, Nodegroup: 0) ...
0
votes
0answers
47 views

How to make search faster using LIKE in mysql with over 3m row?

I looking for a solution to solve this. Any idea help me plz? My table over 3m record Data in search column like '0123456789' => cannot use Full Text Search. I try put innodb_buffer_pool higher ...
3
votes
1answer
46 views

Adding NotNull FK field in existing DB

Context: We’re building a web application to manage business-data. Each “client” of the application has a separate DB (this wont change), and each DB is based off a model (so they are all identical in ...
1
vote
0answers
20 views

Get n data based on the same day (timestamp) [migrated]

I have this table "sensor" which has these fields : id (int,PK) timestamp (timestamp) latitude (varchar) longitude (varchar) data (float) As in one query I want to get 5 rows that were on the ...
2
votes
1answer
47 views

MySQL Performance: conditionnal left outer join vs where only

I have three tables: FORUM ( id PRIMARY KEY, public BOOLEAN ) MESSAGE ( id PRIMARY KEY, content VARCHAR(255), user_id NULL FOREIGNKEY user.id, forum_id FOREIGNKEY forum.id) USER( id PRIMARY KEY, ...
0
votes
2answers
45 views

9 node percona xtradb cluster

We are looking to launch a 9 node percona xtradb cluster on Amazon where each ec2 node uses 20k iops disks. I was afraid if a 9 node cluster will work and mostly what I see is 3 node clusters. We ...
0
votes
1answer
10 views

Aruba-MySQL: can't create/change table to engine=INNODB

We have our database stored in aruba (mysql.aruba.it) where there is a table called "task". Because of many changes in the requirements we decided to drop the table and create it again from 0 with ...
2
votes
1answer
23 views

Handling Recovery of Disk Space in MySQL and MongoDB

So I have worked with MySQL all my life (not as a DBAdmin, but a programmer), and I have some limited knowledge about maintaining MySQL databases. Recently a portion of our database has been moved to ...
1
vote
2answers
33 views

MySQL server cannot be stopped

I am using Ubuntu release 14.04, MySQL 14.14 Distrib 5.5.43. To reset the MySQL root password, as described in the official MySQL doc How to reset the root password, I need to stop the MySQL server. ...
1
vote
1answer
50 views

How to copy one table data to another on different server?

I have country wise Mysql servers and one master server. The master server has all country data. In that I want to copy data of particular country data from master mysql server. Example : if any ...
1
vote
1answer
28 views

An event has run for certain amount of time. How to find the time for how long this event has run in mysql? [closed]

I am using MySQL. I ran one event it took long time. How to find the time for how long this event has run?
1
vote
0answers
62 views

Why my sql query run faster than my stored procedure?

I am trying to write a script in MYSQL Workbench to update my database every day using stored procedure but I find it too slow compared normal query or temporary tables. If i use temporary table the ...
1
vote
2answers
73 views

Is there's another function to optimize this query in MySQL?

I want to use a function that returns for me the same result in one line is that's possible?? MIN( CASE WHEN (data.pro LIKE '1 %' ) THEN 1 WHEN (data.pro LIKE '2 %' ) THEN 2 ...
0
votes
0answers
20 views

Should innodb_buffer_pool_size be much larger than the innodb_buffer_pool_bytes_data?

Our old server had 32GB total RAM, 18GB allocated to innodb_buffer_pool_size. It also had 10GB for the php_memory_limit. The new one had 16GB RAM, 9GB for innodb, 5GB for php. The same application ...
0
votes
0answers
39 views

Query EXPLAINed differently on MySQL 5.6 (or Amazon RDS) and is very slow

I have the following query: SELECT ld.idDataAttribute AS idDataAttribute, ld.instance AS instance FROM logs l INNER JOIN logData ld ON l.idLog = ld.idLog INNER JOIN dataAttributes da ON ...
0
votes
1answer
40 views

Tracking the update or changes in mysql table

I need to stream the changes to elasticsearch to keep in sync with my database(mysql). What will be best way to do this ? I have thought for below approaches Using trigger( but my table will have ...
0
votes
1answer
21 views

Read only access to Slaves from Server A

Here's a little scenario: Server A which is a Dev server needs READ access to the Mysql databases which are on slaves B and C. No WRITE access is allowed from server A to the slaves. How do i ...
1
vote
0answers
73 views

Limiting query to certain amount of rows evenly distributed

Given a table: id -- 1 2 4 6 8 10 I would like to be able to specify a limit and have that amount of rows returned evenly distributed across the entire set when it is ordered by a specific ...
0
votes
1answer
45 views

Duplicate record script | Efficiency boost

I have devised a script to search through my table for duplicate records and display their count. I am wondering if there is a way to improve the efficiency of the search, given the current search ...
0
votes
1answer
52 views

updating single row in MYSQL

We have a situation where we need to update on a single row several thousands time a second and this requirement lasts continuously for 5 hours every day due to the nature of the business. Design ...
0
votes
1answer
38 views

Get all possible parent ids only if has parent bigger than 0

Right now If I call get_parent_id(4) I will get all id parents. This means 3,2,1. Is not hard to guess that 1 has parent 0. This is my problem. I want to output all ids unless the parent is 0. To do ...
0
votes
0answers
21 views

Working with online users based on their IP address address - mysql database [migrated]

Right now I have a box (in footer) where I'm showing online users based on three types of url location, the user type and his Ip address. I'm using individual querys to delete, insert and show online ...
0
votes
0answers
31 views

Does galera cluster works in thecloud (Azure IAAS)

We are moving our infrastructure into the cloud (Microsoft) Our current MySQL master-Slave environments will be moved as Infrastructure as a service. At the same time I have been asked to look to ...
0
votes
1answer
41 views

Mysql - unknown variable 'table_cache=64'

I use Mamp Pro 3. I upgraded Mamp's MySql to 5.6.24 using this script https://gist.github.com/tobi-pb/b9426db51f262d88515c. After that I ran the Mamp Pro and MySql cannot be started. So I looked the ...
0
votes
2answers
23 views

Can data be replicated from a slave MySQL back to a master without the slave containing all the master data?

We have a PHP/Symfony 2 application using MySql as the database. The database contains a large amount of data. The application is deployed to a separate server(s) and an empty/clean version of the ...
1
vote
1answer
35 views

Is there a data type in MySQL similar to varchar(n) that not allow numbers or special characters in it?

Is there a data type in MySQL similar to varchar(n) that not allow numbers or special characters in it?
1
vote
0answers
54 views

MySQL - Preventing lock wait timeout when deleting rows from self

I have a table of around 500k rows (not big data), that I need to query against itself and then delete some of the rows which don't match the filters. At the moment my query looks like this: DELETE ...
0
votes
1answer
29 views

Table partition in aws MYSQL RDS master slave setup

we are looking to do a table partition in MYSQL RDS running 5.6, table size is large and takes around 6 hours to partition. Can we partition on rds slave and then later promote it to master. is this ...
0
votes
1answer
26 views

MySQL - Master to Slave setup question

i have now setup a Master => Slave setup, after hard fightning its now working and this is great. the next step is, how can tell the slave if i create a new table/stroed procured or function on my ...
1
vote
0answers
35 views

Mariadb support rtree index on innodb soon?

I was looking through mariadb bug list online (https://mariadb.atlassian.net/secure/RapidBoard.jspa?rapidView=24&projectKey=MDEV), but I am unfamiliar with JIRA so I am not sure exactly what I am ...
0
votes
0answers
18 views

Replicating from MySQL 5.1 master to 5.6 slave failing because 'INSERT … VALUES (NOW())' results in 'Error_code: 1062'

I am migrating away from some old MySQL 5.1 servers to some new MySQL 5.6 servers. During this process, I'm creating a new MySQL 5.6 slave from an existing MySQL 5.1 slave, using the procedure in the ...
-1
votes
3answers
50 views

Query to return zero entries with COUNT

I have a problem with one task. I need to display various information through two diferent queries.(or one if it could be possible) The table has these fields. Location is set to x ...
0
votes
0answers
12 views

Pat_ID Incrementing by 2 only after close

I am working on an internal project connecting my database to my application. I am using C# to write the program. I am still learning and this is more of a training tool than anything else. When the ...
2
votes
1answer
47 views

innodb , mysql Indexes difference when adding index

When I am altering one of my MySQL table to add an index I am getting below error in error log. Table a/b contains 4 indexes inside InnoDB, which is different from the number of indexes 3 defined ...
0
votes
1answer
36 views

Data extraction from 2 tables

Data in table A: X Y ------ m1 r1 m1 r2 m1 r3 m2 r1 m2 r4 m2 r5 Data in Table B: Z -- r1 r2 r3 r4 r5 Using a query I want a result like m1 r4 m1 r5 m2 r2 m2 r3 The data required ...
1
vote
1answer
36 views

Merge duplicate rows into one row

I have a table like below in MySQL: +-----+------+-------+-----------+----------+---------+ | #id | NAME | empid | c_lan | Java_lan | Dot_lan | ...
1
vote
1answer
51 views

Calculating percentage of count and adding it to the count in MySQL table with the query [closed]

I have following basic MySQL query and I my aim is to artificially inflate the amount of today's orders by 75%. Is there a more efficient way of doing this without using COUNT twice? SELECT ...
0
votes
0answers
60 views

How to make search faster in mysql DB with > 2m records, only numbers

I have a table with sim card data with over 2m-3m records. The design is a column sim_number = varchar(11) with data like number (0123456891) When the table is under 1m records it's still fast but ...
0
votes
1answer
42 views

MYSQL fulltext - What's the right way to get the relevance from one column?

I want to make one column more valuable than others like it's been done in query bellow.This example shows that only one fulltext index is needed And this answersuggests that three fulltext indexes ...
3
votes
3answers
71 views

Is it better to create another table to possible null values in relational databases?

I'm designing a relational database to use in MySQL. I have the next situation: In one table there are fields that in the most of situations are NULL. The fields would be like: Table name: tabla ...
1
vote
1answer
40 views

MySQL trigger level

I'm looking for a way to find out if a row in a table is updated by a trigger or by regular input. In example, I have two tables: TABLE 1 table1_id INT(11) name VARCHAR(255) last_date DATETIME ...
0
votes
1answer
19 views

Table1 ID is auto increment and i also want to store the information from table 2 against that auto generated ID

This table has an auto increment ID on back end. "INSERT INTO `test`.`personal_info` (`username`, `email`,`password`) VALUES ('$username','$email','$password')"; This was for signing up of one ...
2
votes
3answers
87 views

All My Databases Are Gone?

Today I changed my username and password in MySQL and I logged into phpmyadmin to see that all my databases were gone. I've tried changing the datapath but then I realized I didn't see any of my ...
1
vote
0answers
29 views

Update all foreign keys to a different primary key

In a MySQL database, I have a table full of business information. Lots of businesses have been inserted twice due to human error, so the same information exists with two different primary keys. ...
-1
votes
0answers
30 views

mysql/linux issue

My LINUX/MySQL app runs through an iteration of Selects on Child segments (10). The first time through it runs fine. On the second iteration, my app dies at the call to MySQL. I have checked the ...
0
votes
2answers
35 views

MySQL binary logging with just one log file?

I have a MySQL database running with binary logging turned on. Each time the database is restarted a new binary log file is created in the format : mysql-bin.00001 mysql-bin.00002 ... mysql-bin.0000n ...
0
votes
0answers
7 views

is it possible to get the lost data deleted from rails console?

The command I ran in rails console is Product.delete_all("id > 44 AND id < 51") Is there any way to get the records back? Thanks
1
vote
2answers
72 views

Is this db/table structure sensible?

I'm not very experienced in database design so bear with me. I've taken over a ruby/rails app. with a connected MySQL/innodb database. As I'm updating the server to the latest ruby/rails version I ...