MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
0answers
9 views

Rich text: VARCHAR, TEXT or BLOB in MySQL

Question: In my web application (php/MySQL) I will be saving rich text. This may be anything from a couple words to several pages length essay. I’m sure I could get away with using VARCHAR, TEXT or ...
0
votes
0answers
11 views

Using SESSION sql_mode = 'NO_BACKSLASH_ESCAPES' before running query to remove backslashes in database

See this post: How do I remove backslashes from records in MySQL I have similar issues in that code that was developed before me did not use strip slashes with magic_quotes_gpc on before inserting ...
0
votes
0answers
9 views

A design pattern for category features [on hold]

I work for a system which has these tables: products , categories , features User wants to add some feature like color dynamically. Which of this following ways are true? First one: Product ...
1
vote
1answer
122 views

How to remove leading zero from date mysql [on hold]

I have a query in which i have used the following date_add(DATE_FORMAT(ss.week_startdate,'%y-%m-%d'),INTERVAL (tt.day_id- 1 )DAY) as date Datatype of the field is datetime and the result date is ...
0
votes
1answer
7 views

Merging / Importing different and same structure databases [on hold]

I have a question involving restoration (importing and merging of database – 2 having same structure and one having different structure). Our department is using a software which underwent an ...
0
votes
0answers
6 views

how to install lib_mysqludf_xql?

Can any one provide me a steps how to install lib_mysqludf_xql? OS version is REHL 6.5(64 bit) and MySQL version is 5.5.27 we installed MySQL with the source code.
1
vote
0answers
8 views

How does mydumper's ''--use-savepoints" option reduce metadata locking

MyDumper 0.6.1 add a new option --use-savepoints. From the manual, it means: Use savepoints to reduce metadata locking issues, needs SUPER privilege I don't understand. How does it "reduce ...
0
votes
1answer
13 views

MySQL GTID replication: is it possible to make DDL changes to a slave and then catch it up to a master?

Here's what I would like to do: 1. hang a slave off my production master. 2. stop replication 3. adjust some data types and create some indexes on the slave (no data mods) 4. restart replication 5. ...
0
votes
1answer
12 views

MySQL on Ubuntu consuming almost all RAM

I've been having an issue with MySQL crashing randomly, apparently as a result of not having enough available memory (as discussed here: ...
0
votes
0answers
7 views

With certain queries cpu at 100% after database update [on hold]

Recently I updated my online shop database table with newer data. Table contains typical columns like - status, total, currency, email, address etc. Table has 15569 rows = orders. After update if I ...
1
vote
1answer
18 views

Insert/ Update Scalability (more records, continually longer lookups — solution?)

posted this before but never received a clear answer. I'm working on an ETL project and am basically feeding JSON records of "tickets" into a MySQL database. (actually come to think of it, may be ...
1
vote
3answers
32 views

Query 'optimizing' state is taking too long

I have a MySQL 5.6 on Amazon RDS that I'm using for testing some data archiving scripts. I'm removing oldest data based on a "updated_date" column and index. Curiously, after removing a few million ...
1
vote
1answer
39 views

Does MySQL support querying for the current running transaction id

PostgreSQL supports retrieving the current running transaction id using a query like this: select txid_current(); Does MySQL have any such equivalent?
1
vote
2answers
69 views

grant select on all databases except one mysql

I have user called test_user created under MySQL 5.5.17 under MS Windows 2008R2, I want to grant this user select privileges on all databases except MySQL database, note I have around 200 database ...
0
votes
0answers
7 views

SQL Server to MySQL data transfer using Talend Open Studio - recent performance drop

I have a problem with data transfer speed from SQL Server to MySQL server using Talend Open Studio. Normally my job has been able to transfer about 5000 rows/sec-7000 rows/sec. But lately the job ...
0
votes
3answers
42 views

Schema Design with “Seasonal” Data

I am developing a SaaS web application for School Management. What I need help is this: The whole application is purposed for the current year that the School is in. However, some data and ...
0
votes
1answer
26 views

Can I update one table from another table? [on hold]

I need to create a database in MySQL and in that I need to create a table that will get updated when I insert data into another table, eg, I will enter a name of person in persons table so this name ...
1
vote
1answer
18 views

Duplicate delete query in binary log of MySql Master

We are facing strange problem, while replication data from master to slave. Same data is being deleted twice in log(How ever only one row is deleted and one time),due to which we are getting error ...
0
votes
0answers
18 views

Order by using an Inner Join not working in Linux environment of Mysql

As I have to do an order by, on a column for a table having millions of records, I found an approach which can do faster sort in the following way. It is like doing an Inner Join with a result set ...
0
votes
0answers
11 views

Mysql copying from varchar column to a decimal coulmn [migrated]

I have a column in MySQL table (First table) has varchar data type, I used JDBC driver to insert data of numerical data type on the mentioned column . Why I choose varchar data type of this type? ...
1
vote
0answers
21 views

Write-lock a whole table during transaction

I need to perform a delicate operation to my table in which I will solely insert, delete and select upon all of my rows and no God may interfere with the table during this operation: the table will be ...
1
vote
1answer
28 views

Search functionality using joins

I have three tables as mentioned below. I need to implement basic search functionality where the user will search for a keyword which could either match 'title' (from Proposal table) or 'msNumber' or ...
2
votes
2answers
36 views

Mysql slow query log always include “# Time:”

I am trying to parse the mysql slow log with logstash so it's important that the format is consistent. I have noticed that if statements execute at the same time, the line # Time: yymmdd is only ...
1
vote
0answers
15 views

creating deadlock for distributed database in mysql-(Testing purpose)

I need to create a deadlock for distributed database in MySQL for testing purpose with a simple sql query(without front end), can anyone good with MySQL query help me out in this with sample query. ...
0
votes
1answer
21 views

Use Create Trigger to create New table using calculated values from common groupid column values

I have a TABLE_A in Database1 the contains rows with a common group id. I am wanting to use the CREATE TRIGGER function to generate a new TABLE_B in the same Database1 that contains calculated values ...
0
votes
0answers
14 views

Database Importing Collation

Migrating from DB2 found this error message: Error message: Incorrect string value: '\xF2\xAC\x9F\xB0or...' for column 'column_name' This is when trying to import an XML to MySQL. I should have a ...
4
votes
1answer
30 views

MySQL overhead of calling a Stored Procedure

Within Java, we access MySQL (v5.5.40) via JDBC -- a prepare statement, setting parameters then calling the stored procedure. It appears that every execute() has the overhead of 4 meta-calls (per ...
0
votes
0answers
6 views

MySQL log shows excessive meta queries on SP calls [duplicate]

We access MySQL via JDBC -- a prepare statement, parameters binding then invoking the actual stored procedure. It appears that every execute() has an associated "overhead" of 4 meta-calls (per MySQL ...
1
vote
1answer
38 views

Is there a performance hit for querying two different databases?

I have two tables, A and B, which are located in different databases on the same MySQL server. I would like to create a derived table C from tables A and B, as an inner join between the two tables. ...
0
votes
2answers
14 views

Structure database(s) dealing with different time points

I have few data sets that give a score for a specific account at a specific point in time. So, account A might have a different score each quarter going back 5 years so. There aren't a ton of data ...
0
votes
1answer
22 views

mysql prevent update other salve-master db while any record update in slave db

I have master and 3 slave (slave1,salve2,slave3) db in same host. So when I update any record in slave1 db its affected on all other master and salves db. My Question is: How to prevent update all ...
1
vote
0answers
9 views

MySQL performance of trigger when many rows are affected

I have a question on MySQL triggers which I hope someone might be able to help with. As part of our platform, we have a table (accounting), which grows rapidly. We also have an archived version of ...
1
vote
0answers
61 views

Getting count of visits for multiple different outlets

I'm trying to get the distinct count of id that visited different outlets. I have more than 50 outlets so I don't think I can use the IN operator. CREATE TABLE transact ( year int NOT NULL, card_id ...
0
votes
1answer
21 views

How to enable queries logs in MariaDB

I'm running mysql Ver 15.1 Distrib 5.5.42-MariaDB, for Linux (x86_64) using readline 5.1 in CentOS 6.6 server. I'm trying to get queries logging info and I'm doing by enabling log support at ...
0
votes
2answers
15 views

MariaDB/InnoDB: What to do on “Locks in Status-Log but no locked table found”

We migrated lately from MySQL to MariaDB. SELECT VERSION() 10.0.13-MariaDB-log When executing this: SHOW ENGINE INNODB STATUS I get (shortened): ... ---TRANSACTION 279257007, ACTIVE 23981 ...
0
votes
1answer
26 views

How to join tables without identifiers?

For school I have to do this: Query what salary scale an employee belongs to displaying these collumns: s_schaal.schaal, werknemer.name, werknemer.salaris. But there are no identifiers between the ...
0
votes
1answer
16 views

How does one create a Matrix Report to convert sql columns as rows? [duplicate]

I'm trying to create a product listing. Naturally Sql prints the data vertically forming rows after rows like this: Rowa. product_img#1|Product_name|Product_price|Product_short_description Rowb. ...
2
votes
0answers
61 views

Why is this MySQL query “using where” instead of “using index”?

Could you help me with this query, please? SELECT p.patid, MAX(c1.eventdate) as eventdate from patient as p left join op_adv_effects._clinical as c1 on p.patid = c1.patid left join ...
1
vote
1answer
21 views

MySQL Brute Force Defense

I was wondering what defense MySQL server uses to protect against brute force attacks on the user credentials? I hope this isn't too simple of a question! I have tried to Google it, but can't seem to ...
1
vote
0answers
25 views

Can I populate a table in mysql without ending up with duplicated entries [migrated]

I have a database. However whenever I am trying to add products to the cart table from a shopping page, I realize that the same item is added multiple times to the table if the add button for that ...
2
votes
2answers
26 views

MySQL - SELECT on MyISAM Table on index - Does table size (rowcount) matter?

I was arguing with a coworker if SELECT * WHERE t BETWEEN ? AND ? on a MyIsam table where t is an index is significantly slower for huge tables. The hypothetically returned dataset is always the ...
0
votes
1answer
30 views

Speed up procedure

I was wondering if this procedure can be executed faster. There are indexes on the joins and where's. Depeding on the size of product_id_CSV it takes approx. 2.5 sec. CREATE ...
1
vote
1answer
27 views

Is it possible to restore a MySql database only using files from Data directory?

I have a mysql installed inside a windows virtual machine. The hard drive was crashed and the system is not able to restore all again. But I can have access to entire c: ROOT. So I went to ...
0
votes
2answers
72 views

Write a query to create skill table. Please note that the field description can be NULL and the default value is NULL [closed]

I wrote this query for this question. but it does not work create table skill ( id bigint(20), description varchar(255)DEFAULT NULL, name varchar(255), primary key(id) );
1
vote
1answer
10 views

mysql dump import incredibly slow on my developer's machine

I have an SQL dump, it's pretty big (411 MB) and it took 10 minutes to import on server A, the same import on my workstation B has an estimate (pipeviewer) of 8 hours to import (it imported 31 MB in ...
1
vote
0answers
31 views

MySQL method for inserting data from JSON using Python Connector

I have been using Python to insert parsed data from a JSON server response into a MySQL database. The JSON data consists of around 10,000 responses, each holding around 40 nested pieces of ...
0
votes
2answers
17 views

How to deny connections to localhost and force to use FQDN instead

I have a server running Apache and MySQL. Connections to MySQL work fine when using localhost in the connection settings. Now I'd like to force our developers to use a FQDN instead of localhost. This ...
0
votes
1answer
17 views

Mysql's internal mysql database in replication

I searched around but the word game seems to delude any valid result and could not find anything relevant. Mysql (the RDBMS) has an internal database named mysql, this database has information about ...
0
votes
0answers
7 views

Restoring a Full Backup with innobackupex with “innobackupex: completed OK!” but do not start mysql 5.6 [closed]

i am unable to start mysql, followed process given below Operating System: CentOS 6.6 (64 BIT) MySQL: Ver 14.14 Distrib 5.6.24 Percona: percona-xtrabackup.x86_64 (2.2.10-1.el6) mysql> CREATE USER ...
0
votes
0answers
11 views

Insert in PXC Cluster are not equally distributed

I have another query with regards to pxc cluster i have 4 nodes in pxc cluster all nodes have the same cnf file and one server as haproxy. Config File Detail [mysqld] datadir=/var/lib/mysql ...