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
41 views

mysql and varnish restarting frequently [Wordpress website]

I have a wordpress site on godaddy vps.On wordpress i have installed varnish also. The problem is that varnish and mysql are restarting frequently. I am not able to find any logs also.On website i get ...
0
votes
0answers
50 views

Travel Card for travel in public transports of a city

The Card should allow travelling in public transports registering the stops of arrival and departure, the kind of transport (bus metro or train) and price of each trip. The price varies according to ...
0
votes
0answers
62 views

MySQL prepared statement error

Good afternoon, I'm trying to use a prepared statement within a stored procedure in MySQL, but when I attempt to link the variable I get a syntax error. Here is the code SET _sql = ...
0
votes
0answers
97 views

Join on “poor” table

I have some data on same legacy tables that we've inherited. From those tables I need to make a query from 3 them, but the seems like the join for one of them is taking for ever! The query itself in ...
0
votes
0answers
15 views

user privilege and connection with mysql client

Why this user cannot connect to mysql using the client CLI: show grants for 'user'@'localhost'; ...
0
votes
0answers
26 views

Taking a mysqldump from a specific point in time

Is there a way I can take mysql dump from a specific point in time until the latest? Let me explain the need of such requirement, maybe someone could suggest a better option: I took a mysqldump ...
0
votes
0answers
47 views

Our app lags “randomly” due to Disk I/O spikes?

Our database (InnobDb) is spiking at 99% I/O at random times. After the spike it goes down to about 2% until it spikes agian. There aren't any spesefic, huge queries running in these intervals that ...
0
votes
0answers
301 views

How to create domain in MYSQL

As far as I know, domain cannot be created in MYSQL. Is there any disadvantage for that? Is there something to be used instead of using create domain?
0
votes
0answers
73 views

MySQL 5.7.9 multi-source replication

I am trying to set up multi-source MySQL replication. I need to replicate only one database to one slave instance and another database to another slave instance. If I use replicate-do-db in master it ...
0
votes
0answers
10 views

MySQL - Remote Connections - In what format are credentials sent across the internet

Situation I have 3 MySQL servers on 3 machines. Sometimes they have to interact with each other which requires a remote connection from one machine to the other, usually via a PHP PDO connection. ...
0
votes
0answers
19 views

Need some advice on db layout

I have some data that gets exported from a different system that I want to suck into mysql for some analysis. Currently, the export consists of 2 files, essentially file1 is the list of transactions ...
0
votes
0answers
41 views

adding new column slows down select statement

I have a table with a single column that is the primary key Here is the create table statement: CREATE TABLE `test` ( `phone_number` varchar(18) collate utf8_unicode_ci NOT NULL, KEY ...
0
votes
0answers
10 views

MySQL editable reports from multiple identical tables

Let's say I have two sets of four identical tables for my sales that are generated by our apparatus. The first set represents each sales made in a region. Sales_Canada_Est, Sales_Canada_West, ...
0
votes
0answers
47 views

Why the MAX function (MYSQL) does not work as expected?

I have the following table: tbScheduling +---------+----------------+----------+---------------------+ | id | code | customer | date | ...
0
votes
0answers
38 views

Generate N x M random sample table from normal distribution in MySQL

Is there an easy way to produce a table of, say 10000 (rows) by 500 (columns) of numbers from normal distribution with parameters mu = 1, std.dev = 5 ?
0
votes
0answers
67 views

Mysql FULLTEXT index not used in Many to Many table join search

I've got a set of data in the Books table, with BookID as the primary key. I've also got Subject and Location tables, each of which is joined to the primary Books table with a Many to Many table. ...
0
votes
0answers
121 views

MySQL Crashes on a freshly installed XAMPP

I've been working with MySQL for a couple of years, but something really changed happened today. While I was working on a project, my MySQL server suddenly crashed. mysql_error.log didn't make me any ...
0
votes
0answers
19 views

Importing reference ids from csv only imports unique id

I am importing a very large table into my database. I have group_id which references another table containing the names linked to the id. When I import only entries with group_id 1 gets imported. I ...
0
votes
0answers
27 views

Multiple child records in a single row in MySQL

I have one master table (teacher) structured like this: teacherId Name Class 1 Praveen 10 2 John 9 And I have a child table (student) structured like this: ...
0
votes
0answers
18 views

Wordpress DB's and fixing corruption

I'm usually over in the Wordpress stack exchange but I thought this would be more pertinent in this community. Recently I took down a site I spent a few years developing it's content and closed the ...
0
votes
0answers
45 views

Aggregate function within CASE or Joins

Database - MySQL I have 3 tables Table1 - Order Columns -OrderId,OrderDate Contraints- PrimaryKey-OrderId Table2 - Product Columns-ProductId, InsertDate, ...
0
votes
0answers
23 views

Is it possible to stack similar columns from a subquery and join the other unique columns in one query?

I am fairly new to the sql world and have been struggling with a query. I have two subqueries that are generating tables with two columns. The first table is part # and model_countH. The second table ...
0
votes
0answers
24 views

Find records by matching column in 2 tables, then sum column value in third table

this is a newbie question. Working on improving them though! This question comes from the Expression Engine SE site, but I figure this question is best answered here. My intention is to first find ...
0
votes
0answers
81 views

MySQL how do I select consecutive rows on table and back to start at end of table?

I have a little website (actually in dev stage) to manage race standings for a game. I have a table "race" with 19 rows representing 19 grand prix. I have made a page where I show 5 grand prix based ...
0
votes
0answers
98 views

MySQL: equivalent of Oracle's SCN and “as of” queries?

Does MySQL have a similar concept to Oracle "SCN" (system change number)? Is there an equivalent way to do "as of" queries? e.g. select foo from bar as of SCN 104086584;
0
votes
0answers
28 views

Data Base Migration - Adaptative Server Anywhere to Maria DB

I need to migrate a data base which is in my local computer to a on-line server. The RDBMS used in my local computer is Adaptative Server Anywhere 9.0.2.2451 while the RDBMS used on the server is ...
0
votes
0answers
58 views

MySQL procedure with sys_eval (mysqludf) called by trigger

I'm executing a trigger after a row in a certain table has been updated. That trigger calls another procedure which is supposed to do some quick checks before executing a small pythonscript. If the ...
0
votes
0answers
21 views

Mysql replication issue

I added a new replication user to my slave db and accidently spesified the master_host in the change master statement (without specifying the log file and pos). However, its the same master as before. ...
0
votes
0answers
19 views

mysql empty mode is this valid for ALL mysql versions

I read http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_sql_mode for mysql 5.6 and for Permitted Values (>= 5.6.6) it makes no mention of the mode of '' being valid. Is ...
0
votes
0answers
39 views

SET SESSION sql_mode=“NO_ENGINE_SUBSTITUTION”;

I have an application that can be installed in mysql 5.0 -- > 5.7 and all of these versions have different default values for sql_mode Mysql 5.7 being the most strict). I am trying to come up with the ...
0
votes
0answers
19 views

Using NAS Server as a Database Server, a good option?

Introdution: I have six dedicaded servers with localhost dababases, additional I have rented a NAS server (NFS HA Hybrid) mounted in each dedicaded server under /mnt directory, I want to use this as a ...
0
votes
0answers
66 views

Connect to MySQL Named Pipe over SSH reverse tunnel

Wondering if the following setup is possible: I'm a normal user of a Windows server running MySQL, on a named pipe (no port). No SSHd on server, no way to change MySQL setup as well. Only things I ...
0
votes
0answers
129 views

How to create dynamic SQL using formulas stored on field - MYSQL

I have this table which contains a formula on the field calculation: CREATE TABLE IF NOT EXISTS `promo_type` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(150) NOT NULL, `calculation` ...
0
votes
0answers
28 views

MySQL Event Failed to Run

We have a selection of MySQL 5.5 Databases running on Debian Linux, We use MySQL Scheduled Events for certain processes, and until now they have always run as expected. But yesterday we had to move ...
0
votes
0answers
581 views

Create Table. Foreign key constraint is incorrectly formed

I have my sql query SET FOREIGN_KEY_CHECKS=0; CREATE TABLE IF NOT EXISTS `cms_pages` ( `id` int(11) NOT NULL, `chain_id` int(11) NOT NULL, `default_title` varchar(255) DEFAULT NULL, `created` ...
0
votes
0answers
17 views

Basic 'grant proxy' failing

Using MariaDB 10, I'm trying a basic grant proxy... - and getting no success. I've tried many variations on the below session - can anyone hint at the problem? In the below, I'd expect the final ...
0
votes
0answers
60 views

mysqldump slows down to a crawl

I have a table with ~10mln records that I want to dump. Running: mysqldump --opt --skip-extended-insert database table > table.sql While monitoring progress I have noticed that first 9.8mln ...
0
votes
0answers
100 views

MySQL Export not possible to import due to ERROR 1064

we are currently in the progress of moving from MySQL to PG. To do so we are in the progress of setting up a test environment for our database operations. The process is rather simple: We have ...
0
votes
0answers
101 views

Creating audit triggers in a generic way for mysql tables

We have many many tables in our operational database. We would like to create an audit table for each one of them. We would like to create a trigger for each of our tables that will simply insert an ...
0
votes
0answers
62 views

Select sum of values from one column into multiple columns group by date

I have a set of data with dates, sales levels and products. Roughly like this: date | product | units_sold 2015-01-01 | a | 11 2015-02-01 | b | 13 2015-03-01 | b | 15 2015-01-01 | b | 16 2015-05-01 | ...
0
votes
0answers
15 views

Automatic creation of MySQL triggers

I would like to automatically create triggers for several table as part of the deployment process. trigger example: CREATE DEFINER=`root`@`localhost` TRIGGER xxx_admin.payment_AINS AFTER INSERT ON ...
0
votes
0answers
73 views

Memory usage still growing

I have problem with my production mysql server. The memory usage is still growing and I don't know why. Trouble started when we changed the server. My mysql version: 5.5.44-0+deb8u1-log - (Debian). ...
0
votes
0answers
14 views

Memcached innodb plugin load testing

I am testing with memcached innodb plugin for MYSQL and so far I have been able to create containers and insert data. This works well for me. I only have one issue and that is to load test/stress ...
0
votes
0answers
52 views

MySQL query hanging while copying to tmp table

I have a query that ran in 10+ seconds last week, but now is hanging even after 10 minutes. I'm running this in a test environment so the data hasn't changed much and I am baffled at what could be ...
0
votes
0answers
55 views

Error Code: 1146. Table 'mysql.slave_relay_log_info' doesn't exist MySQL 5.7.9

I'm trying to do a multi source replication using MySQL 5.7.9, my main server is Windows Server 2012 and 2 other servers using Oracle Linux 7.1 My problem is that I have to enable TABLE for the ...
0
votes
0answers
137 views

MySQL Load XML Infile with dynamic file name

I have a shell script which loops through a folder and picks up a set of files in turn. I then pass the filename to a .sql script so that the file can be imported into my database. BUT, I can't for ...
0
votes
0answers
84 views

How to restore database from a Mac OS X disk image?

So I did take the ship with brave Capitan, and the ship ran aground... My Mac OS 10.11 tried to upgrade to 10.11.1 and freeze my Macbook! There was no backup, Time Machine stop working, so I did a dmg ...
0
votes
0answers
117 views

Slow response from mysql and web application

We have a Mysql server and apache running on ubuntu via VMWare. Server has 2 CPU cores and 4GB allocated to it. On the server is a web app via php cake framework. One of our developers noticed we had ...
0
votes
0answers
167 views

CryptDB - cannot connect to proxy (ERROR 1105 (HY000): (proxy) all backends are down)

I install CryptDB in Ubuntu 14.04. I want to start the proxy: $ /home/user/cryptdb/bins/proxy-bin/bin/mysql-proxy \ --plugins=proxy \ --event-threads=4 \ --max-open-files=1024 \ ...
0
votes
0answers
45 views

MySQL database hangs but less CPU

I create an application for 30 concurrent users using C# and InnoDB of MySQL (mysql-5.1.35). The size of database is more than 100M lines (~20GB). Most of data is come from 7 active table (2M ...