MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
1answer
24 views

How to track only DDL statements executed in MySQL

Can we track only executed DDL statements in MySQL but not DML statements. I dont want to use either binlog/general log to enable. I just wanted to track only DDL statements. I had gone through the ...
0
votes
0answers
12 views

Ascii Symbols are Shown In varchar and Datetime Column Values of Mysql

Some rows in my database are shown in binary format. DateTime values are shown as below in Sqlyog. DC1203-68-58 51:18:72 Æ420-94-57 38:13:76 \722-49-30 63:17:35 ETB801-61-42 37:69:60 When i ...
2
votes
2answers
139 views

SELECT WHERE CASE

I have the following table (MySQL): -------------------------------------------------------- | id |product_id| store_id | stock_id | priority | ...
0
votes
0answers
20 views

Does automated backup performance suffer if backup completion time exceeds the backup window?

Is there anything "special" about the Amazon RDS Automated Backup Window, or is the backup window merely an arbitrary timespan in which the backup is expected to complete? That is to say, if I have ...
1
vote
1answer
37 views

How to insert the gathered dates into another table using INSERT SELECT in MySQL?

insert into rfdate (date) select adddate('1970-01-01',t4*10000 + t3*1000 + t2*100 + t1*10 + t0) selected_date from (select 0 t0 union select 1 union select 2 union select 3 union select 4 union select ...
0
votes
3answers
43 views

GROUPING BY multiple columns/reqs

Say i have the following table | type | date | count | +-------------+--------------+-------------+ | cat | 2014-2-5 | 2 | | horse | 2014-2-7 | ...
0
votes
1answer
17 views

Update multiple meta_value with single query

Here is a similar structure of a table that I am working on. |--ID--|--user_id--|--meta_key---|--meta_value--| |--1 --|--444444---|--first_name-|------NULL----| |--2 ...
1
vote
0answers
26 views

MySQL - Cannot add new Foreign Key

I'm using magento and it does some re-index for a product flat table structure. In this process a new table is created. The SQL for that table is something like: CREATE TABLE ...
0
votes
2answers
35 views

Is it a good idea to add a reserved field to a large MySQL table?

As you may know adding a new column to a MySQL table with millions of records is hard and in some cases impossible. Is it a good idea to add a text column to each table (say, meta) to save some ...
0
votes
0answers
30 views

How to get max value of a column for a second column

I have this code which produces the following result but I want to get the week_day for every customer with highest count. So instead of two or more rows with customer_id, I want one row with week_day ...
1
vote
1answer
29 views

Does the length of the index name have any performance impact?

This may seem silly, but in trying to stick to my standard nomenclature when naming indexes in our DB, the latest one was a little lengthy, and like all things DB I wondered if it in any way could ...
0
votes
1answer
26 views

Large query with subquery runs indefinitely after mysql update

We recently did a big server update, in the process migrating from mysql-5.0 to 5.5.40 Several of the queries, which had been running well on the old server, now grind everything to a screeching halt. ...
1
vote
1answer
54 views

Optimizing Amazon RDS - MySQLTuner Recommendations / Feedback & Suggestions

I'm currently trying to optimize a database I've inherited for speed. The server is an Amazon RDS db.m3.large instance: 2 VCPUs 7.5 GB Memory 500 GB HDD My current strategy is to do the ...
0
votes
0answers
33 views

Restore MySQL DB from mylvmbackup to .sql dump

Backups of MySQL innodb databases are taken using mylvmbackup and the resulting backup contains the whole mysql folder as per example below: ibdata1 ib_logfile0 ib_logfile1 mysql/ mysql_upgrade_info ...
1
vote
1answer
52 views

What happens if two mySQL queries both try to lock the same row at the same time?

So this isn't exactly my strong suit, but here's my basic understanding of the situation: If two threads of the same application both try to execute the same query at the same time, mySQL will ...
0
votes
0answers
22 views

Data containing list of all the domain names. MongoDB or MySQL?

Data containing list of all the domain names (currently present in the Internet world), along with few attributes (5-6 or maybe 10, each attribute being a column) will be considered as Big Data? ...
0
votes
0answers
20 views

Percona Cluster 5.6 (PXC) and replication filters

I wanted to double confirm the following information: Percona Cluster 5.6 implements Galera for syncromnous replicatrion. Does Galera replication support any replication filtering rules? such as: ...
0
votes
0answers
28 views

MySQL Database Restore Failed With Obscure Error

I was importing a dump from another system into a MySQL database running on 64-bit Linux Mint when I got the error below.:- 12:42:37 Restoring Patient (Results) Running: mysql ...
0
votes
1answer
29 views

Dump with special characters in table column name

I'm taking over an old database, and while doing recovery tests from my dump I found out a table is wrongly backed up, the table definition is truncated. Looking at the live db I've found a column ...
0
votes
0answers
28 views

54M InnoDB keeps shutting down unexpectedly [duplicate]

I have a mariadb server running several databases with very small load. From time to time, when I have 20+ users browsing one of the wordpress websites i have, the daemon just shuts down with the ...
0
votes
1answer
25 views

MySQL Cluster error on UPDATE: increase MaxNoOfConcurrentOperations

I had a table with ~0.5M rows and tried to exec simple query, something like UPDATE table SET col1=-90 + RAND()*90, col2=-180+RAND()*360 WHERE col1=9999 but result was ERROR 1297 (HY000): Got ...
2
votes
3answers
257 views

UPDATE waits for lock too long after SELECT in MySQL (Innodb)

I have PHP function Pics::getPicture (yii2 ORM) which selects one row from table and then updates one field from this row. The table structure contains only id (PK), path (VARCHAR(500)) and seen ...
1
vote
1answer
40 views

How to select all Mondays (or any day combo like MTW, WTTh) between two given dates in MySQL?

What I see over the internet is just counting how many days occur whenever you input the day of the week you need. Like between May 1 to May 31, how many mondays are there in it. What I need is to ...
0
votes
1answer
13 views

how to display parent items with thier child items in mysql data base

i am using my sql data base i have table with following data and table name is account id name parent-id 1 aaa null 2 bbb 1 3 ccc 2 4 ...
0
votes
0answers
23 views

All in one table or separate tables for each categories for a clasifieds website?

I am developing a classified website by using ASP.net and my DB is MYSQL. In there I am using a header table to store common records of an ad. like ad title, description, published date like wise. And ...
0
votes
1answer
40 views

Query gives correct answer on second run

I have the query SELECT * FROM ( SELECT sort.*, ( CASE concat(question_id,`type`) WHEN @curType THEN @curRow := coalesce(@curRow,0) + 1 ...
1
vote
1answer
32 views

What's the best way to structure logging application data in MySQL

I may be overthinking this but: I have an API; I want to log calls to the API for stat/debugging purposes. Ideally the speed of reads should be quick but is not essential (as will primarily be read ...
-1
votes
0answers
16 views

Where do i imploment old password

Where do I imploment the old_passwords=0; Cant find a tutorial on how to import it please help me and sorry for my badness
0
votes
2answers
28 views

MySQL Image Queries

I have table employees in MySql database with Id, Name, Gender, HireDate, Photo. Photo field is blob. Now when I run this query: SELECT id FROM employees WHERE Photo IS NULL ; it takes forever to ...
1
vote
1answer
22 views

Recommendations for my.cnf on MySQL Replicant

I have replication environment running in a master-slave configuration. The replicant is doing all writes and doing selects only very rarely - and none in which high performance is a requirement. ...
0
votes
1answer
32 views

MySQL Workbench can either Dump or Restore - How Do I Configure To Do Both?

I have previously posted this question on Stack Overflow, but have not solved the problem. Hopefully it is not incorrect to post it here in the hope that it will be seen by a some different ...
0
votes
1answer
53 views

How to update a (very) large table without locking in MySQL

I have a large table (58+ million records) which represents a relation between two records (player and target) in a second table. Unfortunately, whoever designed our schema didn't think things ...
0
votes
1answer
24 views

What's the minimum privilege needed to alter a foreign key constraint?

What's the minimum privilege needed to alter a foreign key constraint? My migration script stopped working after MySQL 5.5.41 fixed this bug: InnoDB permitted a foreign key to be created which ...
3
votes
0answers
34 views

Transactional DDL workflow for MySQL

I was a little surprised to discover that DDL statements (alter table, create index etc) implicitly commit the current transaction in MySQL. Coming from MS SQL Server, the ability to do database ...
1
vote
1answer
31 views

Which of these structures are good for maintaining history data?

Iam creating an application which is being used to send reminders. Here is the requirements. We have set of Students. Every student has a Student Pass, this need to be renewed in every month. ...
0
votes
0answers
22 views

Ranking and assigning points in single query

Extending this question here as I get further into statistics based tables for this system. Selecting, ranking and applying a point score based on rank The scenario is as such. Users vote on players ...
0
votes
0answers
11 views

MySQL - Use group_concat function in another group_concat function

Alright i have this beautiful piece of code who help me obtain information about a post like user name, date posted, comment etc. My problem is i want to extract 4 of last posts, i obtain only one row ...
0
votes
1answer
57 views

How to change a web application that now needs to become OLTP and OLAP application?

Previously, I did a simple web application for an enterprise client using PHP and MySQL. After some time, it has grown to a point where I realized after talking with people here that I need to treat ...
0
votes
1answer
27 views

Changing data source on Access front end

I feel bad asking this, as I am only using an Access front end temporarily, but I have been asked to migrate an access 2007 db to mysql with a php front end. I have moved the data to mysql and am ...
0
votes
1answer
34 views

Optimizing a stored procedure

I have done some optimizations on the below mysql stored procedure, however it still runs pretty slow: CREATE DEFINER=`xxx`@`%` PROCEDURE `testing`(IN _MONTH INT, IN _YEAR INT, IN _PRODUCTS TEXT) ...
0
votes
1answer
25 views

mysqlbinlog recovery table wise

I am going to restore my MySQL database table using log files. My database name is "decsys" . I have already created sql using log files C:\wamp\bin\mysql\mysql5.5.8\bin>mysqlbinlog -d decsys ...
1
vote
1answer
29 views

MYSQL : unable to add privileges to newly created user

I am just trying out Google Cloud SQL. Created a SQL server and white-listed one of my IPs to connect to it. I am able to connect as root@'%' there and do everything I wish, other than granting ...
0
votes
0answers
6 views

Connecting/Synching MYSQL with SQL Anyqhere 10

We have a database on our network that uses SQL Anywhere 10 with and ODBC connector as a database for customer and product information. Our intention is to sync this database with a newly created ...
0
votes
0answers
10 views

Mysql keep shutdown after few restart on fresh Centos installation [duplicate]

I have restart a few times - systemctl stop mysql and systemctl start mysql on my Centos 7. After some time, all my application on this machine will face this error SQLSTATE[HY000] [2002] Can't ...
0
votes
0answers
30 views

How to add External data source into MySQL?

I have two database. One is FileMaker database and another one is mysql. I want to use this database in mysql.I created odbc data base connection so that I can sync both database e.g when I maker ...
0
votes
2answers
20 views

finding text in a string

I am trying to find records where the post code starts with a certain set of characters from some 10,000 records, 1300 or so of which meet the select below. My code is Select * from table where ...
0
votes
0answers
13 views

getting an error in trigger while invoking a procedure in it

i have created a procedure name 'prd' which contains 3 parameters (pmat_amt,pstartdate,pstopdate) which is used to update a column in the table rd_details contains 3 columns which are ...
1
vote
1answer
36 views

Can MySQL log lock waits?

Is it possible to have MySQL log queries or transactions where lock waits occur? One can debug specific application errors generated from lock wait timeout errors from the DB but without the ability ...
0
votes
1answer
55 views

MySQL always writes simple temporary/memory tables to disk (both tmp_table_size and max_heap_table_size are set to 8GB)

I'm struggling with this issue and just can't figure out why this is happening. CREATE TABLE sitecache._test ENGINE=MEMORY SELECT * FROM website.gallery_likes WHERE 1=0; Every time I execute this ...
-1
votes
0answers
64 views

Install mysql udf sys_exec to call php file on trigger

Can anyone explains complete details of installing sys_exec function to call php file on mysql trigger over the SSH. I tried solution given by various links but not luck. please suggest if anyone has ...