All versions of MySQL (not Microsoft SQL Server). Please also add a version-specific tag like mysql-5.7 if that is relevant to the question.

learn more… | top users | synonyms

0
votes
0answers
18 views

DB Design - Advanced Permission Combinations by Per Content & Getting All Allowed Contents

I've been trying to develop an internal staff portal for our company. There are departments, job grades, working areas, roles (user, editor, admin, super admin, etc...) and special groups (executives, ...
0
votes
0answers
18 views

Database relation

Let's say I have 2 tables: A and B in relation one-to-one. CREATE DATABASE test; USE test; CREATE TABLE A ( a1 int, a2 int, Ab1 int, -- optional foreign key PRIMARY KEY(a1) ); CREATE TABLE B ( b1 ...
0
votes
0answers
105 views

Performance: Postgres (Read-Committed) vs MySQL (Read-Uncommitted)

I have a workload that involves very frequent writes and reads. It is very performance sensitive, but not accuracy-sensitive. Hence, to maximize performance and minimize locking-delays, my plan was to ...
0
votes
0answers
10 views

MySQL 5.5 exception handlers

Does MySQL 5.5 support handlers for exception handling? If not is there any other way to handle exception? I tried using handlers but it isn't working. Please help
0
votes
0answers
84 views

dropping index in a table that has 8 million entries

I am trying to execute the following: DROP INDEX idx_deletedAt_isLocked_testi ON app_instagram_shop_picture; DROP INDEX idx_id_deletedAt_isLocked ON app_instagram_shop; currently I am using mysql ...
0
votes
0answers
29 views

Modeling reference of two different table in same columns

I would like have advice to do the best choice to design my database model. Option 1 : I have 3 tables : Table descriptor : id_descriptorid_flowtype_flow Table real_flow : ...
0
votes
0answers
57 views

Trigger junction table to closure table on insert without infinite loop

I have a junction table for many to many relationships. I need to construct a trigger on insert to insert into a closure table that will NOT create an infinite loop. the DBMS is MySQL. My concept ...
0
votes
0answers
50 views

Mysqladmin shudown works, though mysql is still running. How is this possible?

I've had so many problems with this now that I'm hoping one of you knowledgeable folks will be able to help. Every time I install mysql and do a restart of the computer it doesn't let me connect: ...
0
votes
0answers
29 views

Generating INSERT ON DUPLICATE KEY UPDATE queries instead of REPLACE INTO

I have been using HeidiSQL to generate MySQL backups using 'REPLACE INTO' however have recently come across the problem this causes with foreign keys & have been told using to use 'INSERT ON ...
0
votes
0answers
18 views

1175 during UPDATE in MySQL Workbench

I have this error in Mysql Workbench when I update table without using key in where clause but update query fire from my Application using connectivity of database surprisingly I have no error . ...
0
votes
0answers
18 views

Cannot access libmysql.dll

I have installed MySQL server 5.6.23 and using Delphi 2009 to create applications. But when I create the connection to the server, it gives me an error message "Cannot access LIBMYSQL.DLL" Kindly ...
0
votes
0answers
75 views

Trigger (insert/update) and procedure Required to encrypt data in MySQL

Is there any good way of doing encryption/decryption by use of triggers and procedure in MySQL. Looking for following to achieve in sequence Unload data for specific column to some other ...
0
votes
0answers
67 views

wrapping point in innodb log file

I ran optimizing tables on a server and at the same time percona xtrabackup script started running on the same server due to a cron job. After some time i got below xtrabackup error. xtrabackup: ...
0
votes
0answers
23 views

How to get data from join only if all the services are available

I have created a service table that contains list of all services available with a vendor. For example suppose my vendor is a salon and it provides services like hair cut, massage, waxing, threading ...
0
votes
0answers
33 views

Are MySQL UDF ACID compliant?

I had a Client Requirement wherein i had to write a MySQL UDF to generate AlphaNumeric Values. The input parameters for the Function where 1.Prefix Character 2.The Length of the AlphaNumeric Value 3. ...
0
votes
0answers
69 views

Can't create TokuDB table due to incorrect “no space left on device” error

It doesn't matter how I create the table, as long as the engine is set to TokuDB I get this error. The error is definitely inaccurate as I'm certain there is plenty of free space left on the disk. ...
0
votes
0answers
35 views

Shared access database file connected with MySQL server

Currently I have an access database in a dropbox folder, used by a lot of people knowing nothing of IT and DBMSes (imagine them being grannies that just learned to use access after a course of five ...
0
votes
0answers
33 views

What is the fastest way to do a REGEXP find and Replace in MySQL database?

I have a table with 700,000 entries and I need to check each entry for 1,000,000 words and then replace the word if found from hello to #~hello~#. Words can occur multiple times in an entry and need ...
0
votes
0answers
12 views

Checking user right

Table's structure: id------username-----password------status 1---------derek--------123---------admin 2----------rob---------321---------worker I finished simple login page and its working. On the ...
0
votes
0answers
58 views

How to selecting data from two queries using union?

I have three tables. I am trying to taking the data with two times interval after then subtracting from first two second for every possible row and getting the ledger report. Solution is given by: ...
0
votes
0answers
31 views

How to Normalize dump table, Perform-query, Perform-database Mysql

I need to migrate information hosting provider to our own systems, in this context I pose the following: The vendor provided us with history of transactions totaling approximately 7.5 million ...
0
votes
0answers
26 views

is there a way to control mysql replication errors?

I have a mysql master server and a mysql slave server replicating the master, when an error occurs the slave replication stop's by default it's set this way. With "slave_skip_errors" flag you can set ...
0
votes
0answers
87 views

Database design recommendation for a workflow-enabled ticketing application

I am working on a ticketing application; tickets are created and they need to be resolved. A ticket needs to go through many steps (in this case 4 steps). Not just a single user in my application can ...
0
votes
0answers
79 views

Unable to set InnoDB buffer pool size >900Mb

On Windows server 2003 sp2 OS with 4 GB of RAM, running MySQL 5.6 it was previously running with 1000Mb but when I try to restart the service it was failing to start with this error: InnoDB: ...
0
votes
0answers
76 views

Mysql server does not start if binary logging is disabled

I have been trying to disable binary logging on a slave server, since I do not use it as a master for another one, I have no use for the logs and I am trying to reduce lag so cut out everything that ...
0
votes
0answers
46 views

Openssl issues with MariaDB

While trying to install Mariadb galera cluster through yum in my RHEL server I get the following error: [root@Arrac1 MongoDB]# yum install MariaDB-Galera-server MariaDB-client galera Loaded ...
0
votes
0answers
40 views

MySQL. If Then Across two tables print results into third table

So I have 2 spreadsheets on excel. Both containing the same information across different periods. In a third spreadsheet, I have written some formulas to query the first two sheets. The queries look ...
0
votes
0answers
30 views

Replication of MySQL databases, but only some of the data

I need to set up a system to do basically a partial backup/replication of a couple of MySQL databases (actually Percona XtraDB 5.5, all tables are InnoDB). There are a few hundred tables in one of ...
0
votes
0answers
39 views

Mapping view dependencies in a MySQL Database

I have a mysql instance with several views. Many of these views are used by other views. Is there a simple way to generate a dependency graph or just a list of objects that depend on a view or table?
0
votes
0answers
37 views

restart master == slave breaks

I have been struggling with keeping replication working. This is what happened before (also my topic): mysql 5.6 gtid replication slave stuck (system lock)? on top of this getting into system lock ...
0
votes
0answers
68 views

rows to columns using SQL , merge queries

I would like to merge these two queries: SELECT um.user_id, um.meta_value, u.display_name, u.user_email, u.user_url, t.name FROM wp_usermeta um INNER JOIN wp_users u on u.id = um.user_id INNER JOIN ...
0
votes
0answers
47 views

Can MySQL partially save a record?

I have a MySql database with a table that's about 20 Gb and about 2.5 million rows. At any one time, the max amount of users I have is probably around 300. The table is called 'content_versions'. I ...
0
votes
0answers
93 views

Fetching from parent/child table pairs

Let there are two tables: "parent" and "child" related by 1:n relation (to every "parent" row there correspond any number of "child" rows). Suppose we need to fetch a subset of parent table with all ...
0
votes
0answers
22 views

Server quit without updating the pid file

I have a problem with mysql for a pretty long time and i cant find any useful answer online. Sometimes when i try to shut down my mysql it shows the error in the header, and i cant connect or restart ...
0
votes
0answers
18 views

MySQL View cannot be executed via shell command

I have a PHP script (CakePHP framework) that makes this call $data_reports = Cache::read('get_data_reports', 'short'); if (!$data_reports) { $data_reports = $this->paginate('DataReport'); ...
0
votes
0answers
43 views

Create a mysql database with scheduled queries

I want to create a system where a database only returns the most recent select query every 20ms,and otherwise returns the most recent one in memory. I am not sure how this can be achieved. I am using ...
0
votes
0answers
25 views

MySQL import a sql file but login for which is different than localhost db

I have a SQL file which I want to import into MySQL using the command line but get an error saying that the username does not have access to it. The file is too big, like 35GB, so I can't open it and ...
0
votes
0answers
47 views

Searching/selecting database content and smart quotes

I have a utf8 encoded mysql table where the content has been entered using smart quotes. My client is complaining that when users search the site content, the relevant results don't show up. This is ...
0
votes
0answers
37 views

MySQL output out of order

I have a bash script which read locks all tables of two databases of a MySQL server, which have the same structures, flush the database and rsync the MYI, MYD and FRM files from one of the locked ...
0
votes
0answers
84 views

What happens if there is missing data in the slave MySQL server

At the data center there was electricity outage. And it appears that at that time my replication stopped syncing because it said something like this; "I cannot find the next position. Last proper ...
0
votes
0answers
20 views

this is my table i want to replace test4 from attribute to sec_attribute in place of test5,test6,test7; can any one tell me the sql query

+---------+-----------+-----------+---------------+----- | taxo_id | data_type | attribute | sec_attribute | +---------+-----------+-----------+---------------+----- | 1 | Key | test2 ...
0
votes
0answers
21 views

events not getting completely written in binary log file MySQL 5.0.32

referring this question : Records not getting replicate from Mysql 5.5.32 to MySQL 5.6 i found that binary log files which has been created at master database server , i see following surprising ...
0
votes
0answers
61 views

need help in optimising query

I need help in optimising the below query, I am not a dba and have no experience/knowledge of explain plan . Please suggest on which columns can indexes be created to improve the below query SELECT ...
0
votes
0answers
22 views

MySQL Workbench Ground To A Virtual Halt

I have been using MySQL Workbench for a while for both backups and to develop a database and associated queries. Over that time I have noticed that it slows noticeably if the SQL Editor has to many ...
0
votes
0answers
46 views

MySQL turn rows into columns without naming each single row in the syntax

I have a table that looks like this (d could be the day, and m1, m2, ..., m1440 the values of the single minutes of the day): d m1 m2 m3 ... m1440 1 1 2 3 ... ... 2 1441 1442 1443 ...
0
votes
0answers
94 views

Slow mysql query full text search tag database

In the database are ~700k images. Each image has its own tag(s). I want to be able to search images by the tags with a full text search query. The query does exactly what I want but it's very slow. ...
0
votes
0answers
31 views

Loop gets terminated in case of many SQL Insert Commands

I am executing SQL Insert commands inside a loop that runs for 1000+ iterations. The loop gets aborted without any error/exception in between after executing 700+ inserts. If I comment the DB ...
0
votes
0answers
56 views

How to compact mysql database size?

My folder mysql/data is huge. I have dropped some databases that have a huge amount of records, removed some logs tables but.. mysql/data size remains unchanged. What is the best way to compact it? ...
0
votes
0answers
41 views

MySQL Multi-source - Single Slave Setup. Adding Unique Master ID on Master's tables definition

this is a design question. I understand that Replication, is like mirroring. So this would mean, whats on the master, should be mirrored on the slave. (Is this always the case, like strictly same ...
0
votes
0answers
59 views

Restore a TokuDB table from main and key files only. (Status file missing)

I have a TokuDB table that for some reason has a missing _status.tokudb file. I am not yet sure, whether the file is missing due to a TokuDB crash or not. Question is: Is there a way to recover ...