MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
0answers
7 views

mysql synchronization databases

hello, i have 5 MySQL servers masters each one have mysql slave , and i have to synchronize data from those masters to one other mysql(central mysql who contain the common data : it can be ...
0
votes
0answers
19 views

Can I set a lower_case_table_names value for a specific database?

I'm running a MySQL 5.5 on Linux (Debian 7) with several databases. I need to import a database originally maintained in Windows MySQL using sqldump. My issue is that this database is used by a ...
0
votes
0answers
29 views

Why does the delete/update block each other in this case?

The following drives me crazy. I have: session1>begin; session2>begin; session2>update dummy set salary=1000 where id=11; session1>delete from dummy where id=1; id is the PK ...
0
votes
0answers
23 views

Big Mysql table optimization

I have a table that I use to cache google translate API answers. Table structure is orig_string and group are indexes Now it has more that 1million rows with 35000 distinct values in group field. ...
0
votes
0answers
30 views

MySQL - How to get multiple/batch averages from daily data

I'm really not sure how to tackle this so let me explain my goal... Lets say I have 30 people that enter a piece of information into a table and let's also say that 20 of these people do this between ...
0
votes
0answers
34 views

MySQL: How to calculate potential wait time?

I'm trying understand the relationship between WAIT_MS and COUNT_STAR. Is this saying the average wait time is 3.2s and occurred 11,543 times for a total of approximately 10.5hrs of aggregate wait ...
0
votes
0answers
24 views

MySQL Replication with Tungsten

I am trying to setup a multi-master type of replication with each master having an additional slave using tungsten. As an example, lets say I have 4 hosts (A,B,C,D) and Hosts A and C are the Masters, ...
0
votes
0answers
17 views

Get categorie, subcategories and number of products assigned to each

I have a list of products, and a list of categories, and a join table. Products can be assigned to multiple categories. Categories can have one level of subcategories. The tables look something like ...
0
votes
0answers
31 views

Efficient way to fetch/update X records in a loop

What I need is a simple process that handles requests. I have setup a simple table as follows: CREATE TABLE Requests ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, request_param VARCHAR(250) ...
0
votes
0answers
27 views

MySQL import gets slower and slower until it virtually grinds to a halt, what can I do to maintain constant speeds?

I'm importing a large set of sql data into a MySQL (MariaDB 5.5) database, the files are from 200mb to 3g. I'm importing it one after the other, and it starts importing at speeds around 1MiB/s to ...
0
votes
0answers
23 views

How to update Status using IF Condition in Mysql trigger

I'm trying to write an update trigger that will Design_Update_Status to Customized when a date is entered in Custom_Design_Update_Date field and if nothing is entered that field it should update ...
0
votes
0answers
26 views

Need help with data model

Schema does not list all fields, but only the relevant ones User adds credits/funds to his account using paypal or Internet Banking (which has to be verified manually, and approved, so the 'status' ...
0
votes
0answers
19 views

Which tool to use to generate an ER Diagram that will allow navigation between tables

DB= Mysql 5.X , OSX/Windows I have a DB with over 400 tables. I want to use a tool to reverse engineer the db to an ER diagram that will allow me to navigate between tables. So for example, when I'm ...
0
votes
0answers
24 views

Converting UUID's from CHAR(32) to BIN(16)

I have a few questions relating to UUID's, but before I go on, let me explain our schema a bit, first, we're on MySQL 5.5 (Percona's version to be exact)... In each applicable table, we use a two ...
0
votes
0answers
11 views

MySQL/MariaDB CLI limits max password?

I've got strange problem - my MariaDB instance CLI (Linux) does enforce limit on how long password can be. For example, setting password like this UPDATE mysql.user SET ...
0
votes
0answers
10 views

specify database while executing mysql binlog

We have different mysql servers with same database names, is it possible to restore their binlogs into one server (different database names) ?
0
votes
0answers
45 views

MySQL 5.1 replication broken after crash, duplicate key error, why? No redo log corruption

What do you think is the reason for the duplicated key errors in our MySQL 5.1.61 replication slave, after the slave machine crashed? It's not corrupted redo logs. Details follows: We have ...
0
votes
0answers
17 views

MySQL error 1241 operand should contain 1 column

I'm trying to write the following query, which gives me error 1241 saying operand should contain only 1 column: SELECT mobobj.description AS Description, mobID AS ID, location.description AS Location ...
0
votes
0answers
28 views

Alphanumeric field in MySQL

I need to create a character field with some rules, they are, Field name: contract_number. Rules: Contract Number Contract number must be alphanumeric. Contract number must be unique. Contract ...
0
votes
0answers
13 views

How to Replicate data from read only sql database to Active one

We are applying logs in every 30 min to one SQL db which has to be in Restoration Mode/Read only mode as we are applying logs continuously. Now we have to Set up Replicaion of this Read only Db to ...
0
votes
0answers
37 views

How can I create a view in a stored procedure on MySQL?

I am trying to dynamically create views based on an SQL query and have a trigger recreate them when the fields in the view are to change. When I call the procedure I end up with a permission denied ...
0
votes
0answers
14 views

mysqlcheck -o --all-databases does not finish

I have a problem with my MySQL Databaseserver. I have many tables and there is quite some traffic going on there (around 4 connections per second). Since the phpMyAdmin advised me to do a OPTIMIZE ...
0
votes
0answers
15 views

MySQL setup - different users for different programs using the database?

I'm setting up a MySQL DMBS for my webserver & CraftBukkit servers that are hosted on the same computer. The Bukkit servers have several plugins that will be accessing specific tables on the ...
0
votes
0answers
43 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
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 ...
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)[^]+?)(?=") ...
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
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 ...
0
votes
0answers
20 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 ...
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
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
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
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
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 ...
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; +-------------+--------------+------+-----+---------+----------------+ | ...
0
votes
0answers
18 views

MariaDB : Larger innodb_buffer_pool_size causing SQL updates to be slower

Has anyone here encountered such scenario before where and update statement took longer time to run when innodb_buffer_pool_size is bigger. I've run a few tests using the same statements on around ...
0
votes
0answers
19 views

Is US/Pacific timezone in MySQL automatically adjusting to DST?

I'd like to define a view in MySQL which will convert some system data always written in UTC to our headquarter time, which is San Francisco. If I use CONVERT_TZ(..., 'UTC', 'US/Pacific'), will it ...
0
votes
0answers
29 views

How can the performance of a query that has a condition on two fields of each row be improved?

I have an images table with approximately 5 million rows in it. For the purposes of this question lets say the table looks like this: CREATE TABLE `images` ( `id` int(11) NOT NULL AUTO_INCREMENT, ...
0
votes
0answers
17 views

How to recover data in a MySQL DB?

Log file says: Recently disk space on my VPS got filled up. Now my DB looks corrupted, MySQL error log says: 140319 01:28:57 mysqld started 140319 1:28:57 InnoDB: Started; log sequence number 0 ...
0
votes
0answers
9 views

Using mysql without --skip-grant-tables

I have some problem with my mysql server, after an upgrade to mysql5.6 faild, Once the reinstallation to mysql5.1 succeeded I was only able to see one table "information_schema" and the rest hidden ...
0
votes
0answers
26 views

MySQL: Large data slow reads

I have very large table with 17,044,833 Rows and 6.4 GB in size. I am running the simple query below and it takes like 5 seconds. Any ideas what optimizations can I do to improve the speed of this ...
0
votes
0answers
19 views

SQL Error while restoring big database in Mysql

I have successfully created a MYSQL dump on RHEL 6 machine. The dump file is having 40 GB. When I try to restore it in an UBUNTU machine I got this error.
0
votes
0answers
53 views

Opimizing Mysql

Below is a Snapshot of my Server info. And the results of mysqltuner.pl Some help with commands would be appreciated. I'm new to this and have gotten pretty far, but I'm having issue with Mysql ...
0
votes
0answers
21 views

Why is adding a FK constraint slow in MySQL?

I'm doing some experimentation in MySQL 5.1.53 and I've run across a case that I just don't understand. CREATE TABLE A ( `pk` INT(11) NOT NULL, `fk` INT(11) NOT NULL, PRIMARY KEY `pk_A` ...
0
votes
0answers
46 views

How to maintain MySQL performance at high concurrency

The following has been observed using "mysqlslap". mysqlslap -u root -p --create-schema=matrix --query=monthly_kpi.sql --iterations=1 --concurrency=1 --delimiter=";" Benchmark Average number ...
0
votes
0answers
30 views

How to run different MySQL-statements with parameters in a loop using Powershell 2.0?

I am new to Powershell and would like to do the following in a shell script: 1.) read some filenames out of an file with filenames 2.) execute some SQL-statements for each file read Here's my code: ...
0
votes
0answers
24 views

mysql id sequencial problem

I create 3 records with the id 1,2,3 I delete record 3, then in the future add another record, it then goes 1,2,4. how to id get sequential order when it is deleted the record like 1,2,3
0
votes
0answers
28 views

Multi language where this feature never existed

I need to implement multi language system in an existing system that was not developed for this. The number of entries in the tables that will hold data that has to be translated will not exceed 5 ...