MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
0answers
44 views

Solved Mysql connection lost with HAProxy

I have master-master replication with mysql. and haproxy configured front of my master-master replication. When I connect my replication via HaProxy, mysql says that "MYSQL has gone away". But when I ...
0
votes
1answer
20 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 ...
0
votes
1answer
40 views

Is not in (a,b,c) faster than where != a, b, c

When writing a query which is faster? SELECT * FROM table where column not in (a,b,c); or: SELECT * FROM table where column != a AND column != b AND column != c ;
0
votes
0answers
33 views

Quick MySQL Backup (1 file per table) - v2

Improving bash shell script written by RolandoMySQLDBA. Continuing the following thread: Quick MySQL Backup (1 file per table) I tried to adapt your script, but after the first rsync was done, I get ...
1
vote
1answer
43 views

Innodb buffer pool and multiple joins

assume we have 1 Billion records and want to store them in One or Three tables by post_type. post_id -> primary key post_type -> ( page, group, user ) user_id -> index date -> ...
0
votes
2answers
36 views

How to use keys in a table so two columns are unique

I want to create a basic database that handles photos. Also, i want to show a photo of the day to the user. I´ve created a table called ´photo´ and another table ´photooftheday´, like so CREATE ...
0
votes
1answer
44 views

Slow queries with many self joins in variable-column database

I'm creating a table structure which needs to handle a variable number of columns. To handle that case the table structure is a listing of cells with a column and row number. To view the table a ...
0
votes
0answers
11 views

negative look-ahead workaround for replacing strings

I need to replace in MySQL all text that starts with href="SOMETHING" but not with href="/cnSOMETHING". My first solution was to use REGEX replace with DB (?<=href\=")((?!\/cn)[^]+?)(?=") ...
1
vote
1answer
36 views

MySQL: SLEEP injection

I was wondering if someone could help to understand this query, basically I'm aware about SLEEP() function but I've never seen this implementation before. Why there are no any results returned? ...
0
votes
0answers
19 views

Mysql: Add a slave to an already existing Master-Master setup

We already have a Master-Master MySQL setup running live in the network. Now we are asked to add a slave to the setup. Is it feasible. If yes, what's the steps I need to follow. Also what are the ...
0
votes
1answer
26 views

Is there any danger using binary data over an UTF-8 MySQL connection?

My application uses UTF-8 as the default encoding for all fields, and the connection itself; every connection starts with: SET NAMES utf8; I need to store a few SHA-1 hashes though, and for ...
1
vote
0answers
27 views

Master and slave tables with different character sets - will replication break?

We have some huge tables in our MySQL 5.6 database that have latin-1 as their character set, and want to convert them all to UTF-8 (along with converting the database's global character set). The ...
0
votes
0answers
12 views

Distribute records on different MySQL databases - MySQL Proxy alternative

My scenario is the following: Right now I am using one big MySQL database with multiple tables to store user data. Many tables contain auto increment columns. I would like to split this into 2 or ...
1
vote
3answers
41 views

Restore large MySQL dump thorugh EasyPHP

I am trying to upload large files on easyphp but as there is limitation on this software and large databases cannot be uploaded. Is there some other software that allows to import large databases? ...
0
votes
0answers
21 views

MYSQL 5.5 SERVER MULTI MASTER REPLICATION

Myself using mysql 5.5 in master side and in slave side(remote connection) It seems the configuration like log_bin,binlog_do_db are correct but it shows Slave_Io_Running : Connecting ...
0
votes
0answers
12 views

Analyze a Database to Find Failed Foreign Key Constraints

I aggressively deleted a ton of data after using this query: SET FOREIGN_KEY_CHECKS = 0; Is there any easy way I can analyze the entire database to check to see if I have any hanging records that ...
1
vote
0answers
40 views

RDS MYSQL instance rebooted and won't load INNODB table

So my production db in RDS apparently either crashed or was rebooted during a version update, and upon being restarted mysql couldn't load one of the innodb tables: as evidenced by the following error ...
3
votes
2answers
159 views

Does a MyISAM table locks if I copy it while MySQL is running? (READ DISCLAIMER)

DISCLAIMER: I'm very aware this is not supposed to be done, but time consistency between tables aren't a concert here and Im trying whatever pops in my mind right now to have alternatives for ...
0
votes
0answers
14 views

Dynamic chart data from MySQL

I'm building a chart with JS, where i'm doing a query with PHP and pass it to chart in JSON format. The problem is the whole table exported in json file gets up to 10mb, and it takes too much time ...
0
votes
2answers
49 views

Can CPU cores be separated for MySQL?

Is it possible to separate CPU cores in Mysql? I understand it is possible for Memory as we can tune it in innodb_buffer_pool_size or innodb_additional_mem_pool_size. How about CPU cores in ...
0
votes
1answer
33 views

How to query-and-increase a value (counter) in a thread-safe way? (avoid race conditions)

In a table where each row has a counter (just an integer value), I need to get the current value and increase it at the same time. Effectively, I want to do this: SELECT counter FROM table WHERE ...
0
votes
1answer
9 views

what is the best configuration for innodb_flush_log_at_trx_commit?

There are 3 different configuration is available for innodb_flush_log_at_trx_commit innodb_flush_log_at_trx_commit = 0 innodb_flush_log_at_trx_commit = 1 innodb_flush_log_at_trx_commit = 2 Which ...
1
vote
1answer
45 views

mysql import/drop very slow on pyshycal server

I have mysql installed on a physical server (name it Mysql A) and importing 1 MB .sql (from mysqldump) Magento file could take more than 5 minutes, and dropping database slow as well. whereas ...
0
votes
1answer
36 views

MySQL relay log rotates too soon and too often

I have a simple master/slave setup where the slave is just a backup. Sometimes I notice that the relay log on the slave rotates too often and too soon, when it is still very small: 4:00 PM ...
0
votes
1answer
43 views

MYSQL Stock Database Optimization

I am downloading a bulk of stock data: Ticker symbol, company name, industry sector, Open, high, low, close I was wondering performance-wise if separating the ticker, company name, industry sector ...
5
votes
3answers
208 views

Stock price database optimization in MySQL

I am downloading a bulk of stock data: Ticker symbol, company name, industry sector, Open, high, low, close I was wondering performance-wise if separating the ticker, company name, industry ...
2
votes
0answers
59 views

How to distribute a given database between multiple DBMS on a LAN? [closed]

Given a Database D, i need to distribute it over different DBMS in a LAN. D will be split into tables, and each DBMS will store a given table. Here is a sketch of what i need to do : I also need to ...
1
vote
1answer
45 views

one to one relationship

This is my database structure: Users {user_id, username} Profiles {profile_id, user_id, user_views} My question is: If I do it the way mentioned above, should I to set user_id as primary key or ...
1
vote
2answers
40 views

Linux command to kill all MySQL sessions from a specific User?

How can i kill all sessions from a user in mysql using a linux command line command? I have a user that is using all on my database connections and insted of killing one by one i want to make a ...
0
votes
1answer
25 views

How do I access a result set from a StoredProcedure… in another StoredProcedure

I have a non-trivial SELECT statement and I don't want to write it twice (standard SW development considerations). I want to use the results in two stored procedures. I am imagining something like ...
0
votes
1answer
54 views

How should I config the my.ini(or my.cnf) file for mysql?

Thanks for taking your time to look at my question, and I hope that you can help me with this. I have a Windows Server 2012 server, it has: Memory : 3840MB Ram Processor: Intel(R) Xeon(R) CPU ...
1
vote
1answer
60 views

MySQL: NOT EXISTS vs LEFT OUTER JOIN…IS NULL

Is NOT EXISTS or LEFT OUTER JOIN...IS NULL more efficient for finding records in one table that aren't in another? Specifically, I'm trying to figure out which of the two queries below is better: ...
0
votes
0answers
16 views

using another table column as array

SET @qdate := '2014-02-17'; SELECT com.trading_code, com.business_segment_id, dmkt.close_price, dmkt.cdate, dmkt.turnover, dmkt.volume, sh.total_no_share, ...
0
votes
2answers
65 views

How to drop table with all reference to this table

I want to drop a table, and this table has be many table's foreign key. So I want to drop all those reference (just refernece, not other table) within the drop table process. Is there any simple ...
0
votes
0answers
8 views

RAID 0 InnoDB speed - Comparing 8 x 7,200 RPM drives or 4 x 15,000 RPM drives [migrated]

I am planning to set up a RAID array for scratch space use in a computational server (16 cores, 128 GB RAM). The users will routinely be creating large (500GB) MySQL InnoDB databases and storing these ...
1
vote
0answers
102 views

MySQL - high CPU usage (MyISAM tables)

We have a server running LAMP stack on CentOS release 5.6 (Final) MySQL is having high CPU usage constantly which causes server to lag as shown top - 13:50:47 up 80 days, 13:53, 1 user, load ...
0
votes
0answers
15 views

RDS did not restore to a specific point-of-time on my MySQL instance. Why did that happen?

I'm using a MySQL 5.6.13 instance on RDS and accidentally wiped all the data in it (something like 2.5GB). I used the restore to point-in-time feature to recover all the data and it only recovered the ...
0
votes
0answers
16 views

Correct Syntax to use a Foreign Key as Part of a primary key

I'm interested in making part of the primary key of one table foreign key. What is the syntax to do so in mySQL. I'd like to create the following two tables: Person Table : {person_ssn} -> name, ...
0
votes
0answers
24 views

Writing a Query to enter and update multiple data in a table [closed]

I am new to mysql and trying my best to learn. I was able to develop a solution for my needs but it is taking hours to update the records. till now only 10000 records are updated in past 3 days and ...
0
votes
1answer
22 views

How do I “link” two or more rows of the same table with a unique “link” id?

I am looking for a better way to create a link between two or more rows of the same table, but the link itself must have a unique ID. What I am currently doing seems rather convoluted. I have a ...
0
votes
1answer
27 views

Is it safe, and how can I delete mysql.sock before mysqld start?

I have CentOS running on virtual machine on my desktop. When my desktop unexpectedly restarts (blue screen, power failure, restart after updates), virtual machine faces the same problem - unexpected ...
1
vote
1answer
46 views

MySQL 5.1: Upgrade innodb plugin

My application is running on MySQL 5.1.58 community edition. As I studied on SO websites that After acquisition by Oracle, new InnoDB plugin has been released and MySQL 5.1 with InnoDB plugin is the ...
-3
votes
0answers
41 views

SQL Server or CSV to Mysql which is faster? [closed]

I am going to purchase some data from a data vendor and they provide data in both CSV as well as SQL Server format. I intend to use Mysql for my data storage needs. Which one would be easier and ...
0
votes
0answers
37 views

Conceptual data model for a billing system

I am working on existing MySQL database, my task is to create a new data model for a billing system on that existing application, I have created a conceptual data model, as given below, My ...
0
votes
3answers
57 views

How MongoDB indexes differs from MySQL indexes?

I am a newbie to MongoDB. I know how Indexes works and what it's importance in MySQL. Are MongoDB indexes are the same as MySQL ?
0
votes
3answers
79 views

Database update query for split and sum in another field using mysql

I have one table test ID text sum ----------------------- 1 1_2_3 0 2 2_3_4_5 0 i want to update this table as ID text sum ...
0
votes
0answers
29 views

Which RDBMS do return better error messages?

When you have some syntactical error in a query you will be a error message like: SQL Error (1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server ...
3
votes
1answer
100 views

Searching 500 million records of binary data

I will inserting into a database the signatures of 500,000,000 pictures. The signatures will be generated using libpuzzle. Each signature is 338 bytes. (so 160 GB) plus a table for searching (read ...
0
votes
1answer
40 views

NVARCHAR issue when migrating from SQL Server to MySQL with MySQL migration wizard

My issue is similar to this one but and I have tried what has been suggested but I still get the error. I have set the target column from VARCHAR(5120) to TEXT (tried LONGTEXT too) but the issue still ...
0
votes
0answers
13 views

Best way to store combobox options for an EAV table

I don't know if this question belongs to StackOverflow, but here it is: I have an EAV table: mysql> describe keywords; +-------------+--------------+------+-----+---------+----------------+ | ...