MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

2
votes
1answer
43 views

Active-active Cluster In MySQL

I'm planning to go for a 3-node active-active MySQL cluster which will not have more 100 databases. Many experts here have already told there are issues with MySQL 5.6 and 5.7 where circular ...
1
vote
1answer
38 views

ERROR 1146 (42S02): Table 'db.tablename' doesn't exist [on hold]

I have a two databases, when I prompt SHOW DATABASES I can see a list of the databases, including mysql, performance_schema and informations_schema. I can prompt 'SELECT DATABASE_NAME' on both of ...
7
votes
2answers
89 views

Why NOT partition?

When would one NOT want to partition a database? (thinking MySQL partitioning) In my case I'll be starting with a couple millions rows, it should grow from there. Primary key on a character field ...
2
votes
1answer
33 views

Help wanted: Special case of changing columns and rows MySQL

Im beginner in MySQL and want to convert this table Any help? Thanks
1
vote
0answers
24 views

Can an insert procedure trigger unintentional loops?

Is it possible for a stored procedure like this to produce a loop of unintentional inserts? I'm asking since this exact procedure produces this resulting loop. (I'm pretty convinced it isn't within ...
0
votes
0answers
11 views

Spreading out iops use at Aws

Is there a way to store event info, such as those triggered by a listened to Dom event, and feed that info into a database at a specific rate? Using Aws databases usually means provisioning a set ...
0
votes
1answer
19 views

mysql max_binlog_size is not working

I have a weird problem. I am currently using mysql and have defined 100M of max_binlog_size. However, I have hundreds of files created every day and each file is of no more then 2MB or 3MB each and ...
1
vote
0answers
24 views

Speeding Up Query - Hangs at Sending Data - Indexed Correctly

I am looking for ways to speed up the below query. I currently have indices on FIRST, LAST, UNIT_PARENT, HomeAddressLine1, HomeAddressLine2, HomeCityNAme, HomeStateAbbreviation, HomeZipCode, HomeZip4, ...
3
votes
2answers
91 views

View with parameter IN

I'm creating a view in which I have a where with an in clause and I want it to be a parameter. Unfortunately views can't be created with parameters, so I tried replacing it with functions, but ...
1
vote
1answer
27 views

Allow multiple users to see procedures and functions

I have GRANT ALL PRIVILEGES ON `test1`.* TO 'admin'@'%', GRANT ALL PRIVILEGES ON `test1`.* TO 'devel'@'%' (from SHOW GRANTS FOR some_user) and I have created simple procedure as admin in test1. And ...
1
vote
0answers
27 views

Taking Backup of a database in mysql

I have database but somehow it has been deleted. Can i take the back-up of deleted database. Please Help. Thanks In Advance
1
vote
2answers
137 views

Sending a database dump

Quite new to db admin here and I have a quick question. I am collaborating with another colleague off site and they would like me to send them a dump of our (1.5GB sql db) database via email as they ...
1
vote
3answers
49 views

How to merge two large mysql tables into one with similar data keeping the latest record

I have two similar large tables with below table structure CREATE TABLE tableA ( col1 varchar(20) NOT NULL, col2 varchar(40) NOT NULL, date date NOT NULL, time time NOT NULL, PRIMARY KEY ...
0
votes
1answer
32 views

Count in an other table and show only theese records in query which has more than they used in other table

I have for example 2 tables: used(us_id, code_id); codes(code_id, amount) I want something like this: If for example I have 5 eggs, and egg code is 1, then if the used table have reached 5 of ID ...
2
votes
1answer
32 views

How to suppress specific warnings in mysql error log when ignoring a table to replicate

Is there a way to make the mysql error log less chatty with certain warnings? I just threw in the replicate-ignore-table option in my.cnf so our health check table doesn't get replicated. However now ...
2
votes
2answers
90 views

Query: How to get both Question and multi Answers in one query

For this question, Question and Answer are just my example tables for one-many relationship. For example: Question(QuestionID, QuestionTitle, QuestionContent) and Answer(AnswerID, AnswerContent, ...
2
votes
2answers
30 views

Information schema not showing reliable information?

I'm currently migrating from SQL Server to MySQL. When i try to match the number of rows i query information_Schema.tables. I noticed that there are some differences between the migrated information ...
1
vote
1answer
56 views

Index based on another index [closed]

Assume a mysql table with columns A, B, C, ... . There are one composite index based on columns A+B+C. Combination of values A, B and C is unique, so this index forms the primary key. Now, a second ...
0
votes
0answers
20 views

Setting up mysql replication (Master->Slave one direction)

I am struggling with the setup of a one way replication for a single mysql table. What I have done so far: Master: Added this into my my.cnf: server-id=5668439 log-bin=mysql-bin ...
1
vote
1answer
24 views

Unable to remove permission for mysql.user

I am trying to remove permission from mysql user to not be able to delete specific database. But if i run this command: revoke all privileges on test.* from 'demo'@'localhost'; or this revoke drop ...
1
vote
3answers
33 views

To trigger or not to trigger- That is the question

I have a mysql table that tracks page views. Each row includes a date stamp. I want to remove all rows that are over 30 days old on a regular basis. Could, or should, I trigger an action on each ...
1
vote
1answer
28 views

Hardware specs for MySQL database with millions of records

For 35 million records I have this table CREATE TABLE IF NOT EXISTS `records` ( `code` varchar(12) NOT NULL, `type` varchar(255) NOT NULL, `used` set('y','n') NOT NULL default 'n', PRIMARY ...
1
vote
1answer
26 views

How should I design a specific needs mysql table

I am planning out a mysql table to record page views. None of my options seem very efficient. I plan to have the pages send a +1 update to the table when loaded. What I want to be able to do is query ...
3
votes
1answer
39 views

Allow multiple users to change functions in MySQL

I want to make multiple users and allow them to change procedures,functions and triggers in same DB. There must be user devel for developers and admin for admin, both can change developers DB, but ...
2
votes
1answer
21 views

MYSQL: log the query executed on certain table

I am writing a trigger that suppose to fire on inserts for a table and log the exact query used to insert. However, using below SELECT info INTO original_query FROM INFORMATION_SCHEMA.PROCESSLIST ...
0
votes
0answers
28 views

MySQL Db design: Optional data in separate table or as NULL values in original table

I am having following problem: User fills out the form, which consists of two sets of fields - header (basic information about biological observation) and detail (measurements and advanced ...
1
vote
2answers
34 views

MYSQL: Creating a table with same columns on remote machine [closed]

I am trying to create a table on my local machine which has the same description as some other table on a remote machine. I just want to create the table with same columns, don't worry about the row ...
1
vote
2answers
55 views

mysqld_safe mysqld from pid file /data/mysql/mysqld.pid ended

MySQL is restarting by itself, but it's crashing most of the time. I am unable to restart the instance due to a pid issue. Tried to restart MySQL moving original ib* files to _old - this time ...
1
vote
0answers
33 views

MySQL returns Function does not exists randomly [closed]

//UPDATED - Added Sample Function at the bottom I have a linux server on which I have MySQL, a Middleware and a Siverlight Portal hosted and I have an Android application. The application is running ...
2
votes
0answers
32 views

MySQL memory is keep on increasing , any reason?

On one of our production host MySQL memory is keep on increasing day-by-day. I tried reboot of MySQL instance but still no avail. System has 16Gb of RAM. TOP output top - 13:05:13 up 35 days, ...
0
votes
1answer
35 views

mysql.sock not generated when starting MySQL server using XAMPP

I have XAMPP installed, and I want to use mysql.sock file for my rails app. Now, when I start the MySQL server (from xampp control panel), it starts, I see it's PID, I can access the mysql command ...
3
votes
0answers
35 views

type ALL in explain [closed]

I have tables like these: items +-------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | ...
1
vote
0answers
35 views

Migrated servers… Innodb tables stayed innodb, but database is showns as MyISAM. Problem?

I moved servers. I exported DB on old, imported to new. Kept getting syntax error on import until I tried no compression. Weird, but it worked. I was skeptical so I compared the two carefully and ...
3
votes
0answers
73 views

Table cannot be converted from type 'int' to type 'bigint(20) unsigned'?

I have a percona mysql cluster, with master and few slaves. Each of them is running "Ver 14.14 Distrib 5.5.40-36.1" of mysql. Replication is row based. I ran an alter query on one of the tables of ...
1
vote
1answer
30 views

current_timestamp default column value working in Windows but not in Linux

This MySql query runs fine in Windows: CREATE TABLE `posts`.`table` ( `idTable` INT NOT NULL AUTO_INCREMENT, `Column1` DATETIME NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`idTable`)); In ...
0
votes
0answers
34 views

Is it a good idea to have too many named locks?

I am using MySQL as a data store and a Java App on the top. There are many state changes that happen, and I am seeing some concurrency bugs in there. I wanted to know if I can use named locks ...
1
vote
1answer
27 views

Decimal or Point Data Type for storing Geo location data in MySQL

I want to store Geo location for each Address in my MySQL(Innodb) "tblAddress" table and I think I have 2 Options: 1) 2 columns for Each Address: Latitude DECIMAL(10, 8), Longitude DECIMAL(11, 8) ...
2
votes
1answer
68 views

Why is ORDER BY LIMIT 1 so much faster than MAX?

Here are my two queries: select sts_in from sta_session where sts_user_id=2006 AND sts_sessid!='0jitkt80gg3avere03tqk4lhi6' order by sts_in desc limit 1; And select max(sts_in) from ...
1
vote
0answers
23 views

prioritize one query over the other in mysql

Is it possible to prioritize one thread over the other in mysql. The scenario that I'm trying to address is as follows :- 2 threads T1 and T2 are both trying to acquire a lock on a table. T1 is a ...
1
vote
1answer
22 views

executing command prompt command in MySql trigger

I have one table called table1 in that there are two fields, let say field1 and field2. What i am trying to do is that, when there are records inserted into table1, the values of field1 and field2 get ...
1
vote
0answers
44 views

selecting from information_schema increases free disk space

Some background: There are 3 database servers - two in a master/master replication config with only one server accepting writes. And one other slave replica replicating from the write-master. The ...
0
votes
2answers
54 views

Multiple WHERE IN on multiple columns

I am not very experienced with sql queries and looking for an efficient way to perform the same WHERE IN condition on multiple columns. More specifically, i'm doing the following: SELECT a, b FROM ...
1
vote
0answers
20 views

Creating a dynamic database

I'm using mysql server connected to Access, and I want to do a form, to fill the table. My question is how to do it. I need to select the data from a listbox, that's okay this is already done. And I ...
0
votes
1answer
25 views

Incremental backup in mariaDB mysql

I am using 5.5.41-MariaDB and ENGINE is MyISAM on CentOS 7. Please help me for Incremental backup command of mariaDB mysql on CentOS 7.
3
votes
0answers
27 views

Running Triggers on Slave with Row-based Events in MySQL >=5.6

We would like to have a setup where a slave has triggers that are not present on the master for the purpose of updating some summary tables or run a specific udfs.sys If one uses statement-based ...
2
votes
2answers
56 views

Any way to speed up reorganize partition of a very large table in MySQL?

So we have this massive 1.5TB+ table with billions of records that has been neglected for the past few months and needs to have new partitions added. The partitions are based off a timestamp which are ...
1
vote
1answer
33 views

Most efficient table storage for determining recurrence

What is the most optimal table structure to store schedules / recurrence definitions so that we can efficiently query it for all events that will occur within a date range (min:1 max:32 days)? My ...
1
vote
1answer
43 views

MySQL Enterprise Connector/PHP Plugin for php 5.4 [closed]

I'm trying to setup mysqlenterprise.so. I have installed the native driver and loaded before mysqlent, but when I try to start it I got: Starting php-fpm: [14-Jul-2015 14:27:40] NOTICE: PHP message: ...
1
vote
1answer
41 views

import CSV into mysql table via command prompt (MySQL 5.6.25)

I'm trying to load CSV's into a mysql database with this command: LOAD DATA LOCAL INFILE '\Users\userName\Downloads\tableName.csv' INTO TABLE tableName FIELDS TERMINATED BY ',' LINES TERMINATED BY ...
0
votes
0answers
23 views

How do I import data to Spotfire and ignore some columns?

I have SQL pulling in data from an MS Access database and/or MS Excel for the purposes of updating a Spotfire library. Sometimes new columns are added in the source Access/Excel. How do I configure ...