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
2answers
53 views

MySQL row-based replication - Delete Fails

We have a Master - Master replication setup, MySQL 5.6. Only one Master is used, the other is for backup and failover (we'll call that the slave). The binlog_format is set to ROW, autoincrement ...
0
votes
1answer
51 views

Alter table add column like another column syntax

I was looking into MySQL specification, but couldn't find any solution to my problem. I want to clone specific columns in several tables like this: ALTER TABLE `table` ADD COLUMN `new_column` LIKE ...
0
votes
0answers
46 views

Error 1129: Host '' blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

When I run a python code which connects to mysql, I see this error; "Error 1129: Host '' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'". Here is what I have ...
0
votes
0answers
47 views

Multi-function MYSQL commands

I do not know if piping is the right word. EDIT below to make the question clearer (ie I show what I am doing in php, and want to do this with a single MYSQL statement). I know how to do this in ...
0
votes
2answers
43 views

Is MySQL Cluster just for in-memory databases?

In MySQL website I see below definition for MySQL Cluster. MySQL Cluster is a technology that enables clustering of in-memory databases in a shared-nothing system. I want to use Clustering for ...
0
votes
0answers
26 views

Can't connect to MySQL server via SSL

I'm trying to connect to a MySQL server via SSL. I know the server is set up correctly to handle SSL connections because I can connect fine using MySQL workbench, PHP, and command line MySQL client ...
0
votes
0answers
64 views

Database as it is raw content

recently I asked my hosting company to give the backup of my database . I asked them to create a new database and import backup to that database. But they reply cannot dump database ...
0
votes
1answer
28 views

Best way to apply a “friend system”-like table? [duplicate]

I am making a website that has multiplayer games like chess, poker, etc. Users will be able to add friends. I was thinking about how could I make this in a DB, and I thought of two methods: 1 - ...
0
votes
2answers
44 views

MySQL SELECT n-th row between dates (time interval)

I have a server which records various sensor data each second and inserts it into a MySQL table. To view the sensor data on a dashboard I have a chart which also gets updated with live data each ...
0
votes
0answers
52 views

How to do rolling upgrade MariaDB 10.0 -> 10.1 on ubuntu 14

I'm trying to figure out how to do a rolling upgrade of our galera cluster running on MariaDB on Ubuntu 14.04. In testing, the first node I upgraded started complaining about the timestamp column in ...
0
votes
0answers
29 views

Slow Join queries using Spider-Storage-Engine on MariaDB

Using: MariaDB 10.1.12 Spider 3.2.27 How can I tell my Spider node to do the JOIN queries on the remote host instead of trying to join over the network one by one? I'm using a query that looks ...
0
votes
1answer
48 views

Will auto_increment always grow in master-master setup?

Let's suppose I have mysql master-master replication setup with only one server active at a time (i.e. all writes going to one server), and I have ability to manually switch to another master. Next, ...
0
votes
0answers
19 views

MySQL TokuDB not using Index correctly by itself

the main table on my Database looks like this: CREATE TABLE IF NOT EXISTS `data_min` ( `pid` mediumint(8) unsigned NOT NULL, `action` char(65) COLLATE ascii_bin NOT NULL DEFAULT '', ...
0
votes
0answers
72 views

MySQL Too Many Connections (Max Connections Limit Not Reached)

Running a PHP 5.6 application that connects via MySQLi to a MySQL database (5.5) that intermittently errors with the "Too many connections error" however this seems to be a red herring to another ...
0
votes
0answers
14 views

Insert rows from another table while updating source table with IDs

I have this table structure table A: A.id (autogenerated) A.data table B B.id (autogenerated) B.A_id B.data B.anotherData There are some rows that were inserted into table B, without corresponding ...
0
votes
1answer
30 views

Connected to mysql database but cannot print the data

I connected successfully to my database and the I tried to print my data but I can only see the "Connected succesfully" line in the browser. Here is my code: <?php ...
0
votes
3answers
45 views

How to detect level in nested MySQL table? [duplicate]

I have simple child-parent relation by saving parent_id. Is it possible to count which level each entry? My DB looks like this: As You can see from the image, for example the first item relation ...
0
votes
0answers
27 views

mysql query to fetch records from multiple tables

I have 5 tables named: schools, candidates, candidate_subjects, subjects, lgas Each school belong to a lga, each candidate belong to a school, each candidate registers subjects Below is the table ...
0
votes
1answer
28 views

Is inserting into a table with a foreign key constraint slower than inserting without constraint?

When using MySQL (actually, Aurora), will inserting into a table with a foreign key constraint be slower than the same table without the constraint?
0
votes
0answers
18 views

Load DATAINFILE extremely slow

I am using the code below to insert a 2.2MB file into a MySQL database in the cloud using Azure (the free version) with 36 thousand rows and 8 columns of doubles. MySqlCommand sqlCmd = new ...
0
votes
0answers
19 views

Galera timezones out of sync on 2/3 nodes

With a 3-node Galera cluster we had an issue where 2 of the servers started having the wrong timezone. On all of the servers, SELECT @@session.time_zone; would return SYSTEM, but on 2 of these ...
0
votes
1answer
23 views

Give third-party access to AWS hosted MySQL

I have a production MySQL database hosted on AWS for an eCommerce store I work with. Employees in the firm are requesting access to our live SQL database to use with BI tools like Tableau/Qlikview. ...
0
votes
0answers
45 views

Install two instances of mysql 5.6 and 5.7

How to install two mysql servers on one Debian server? apt-get install libaio1 wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-server_5.7.11-1debian8_amd64.deb-bundle.tar tar -xvf ...
0
votes
1answer
23 views

Is it possible to take the table level backup in mysql using any of the script?

I am new to MySQL and I am in need of the script which is taking backup of multiple tables from the multiple databases in single file in MySQL?
0
votes
0answers
84 views

virtualbox ubuntu 14.04 MySQL access denied for user 'root'@'localhost'

I removed the mysql-server on the virtualbox ubuntu by running : sudo apt-get --purge remove mysql-server and re-installed it, but I still get Access denied with or without password when trying to ...
0
votes
1answer
21 views

How to restore truncated MySQL table from binary logs?

I have a mysql server and while working on it I accidentlly truncated the wrong table. I do have a mysql dump wich I immediately used to restore my database structure, but I still miss some entries in ...
0
votes
1answer
30 views

Synchronize MySQL database from remote MySQL database

The documentation mentions a sync function, but that function is not available from the Database menu as shown in the screenshots there. Is this functionality available elsewhere? Using reverse ...
0
votes
0answers
43 views

MySQL performance differences between two servers

I've a production server (CentOS 5.11) and a development one (Debian 8). Same MySQL version (but different architecture, i686 vs x86_64), same data, same config settings. If I execute a query with ...
0
votes
1answer
26 views

Mysql takes more tmp space than the table size

I have a mysql table with 2.8GB data+index size. I wanted to add a column to the table and it was failing due to insufficient space on /tmp. When I looked at the size available on /tmp it was 3.9GB. ...
0
votes
0answers
10 views

mysql backup does not restore complete

I have big mysql database back ( 2.5 G as .sql file ) I restore this backup on ubuntu and it restored full complete with out any problem But when I restore it on windows with xampp use below command : ...
0
votes
0answers
7 views

how to delete data log of mysql server

Is it safe to manually delete the .log file found inside "C:\ProgramData\MySQL\MySQL Server 5.7\Data"? and if not how do I safely delete it since it is already 4gb in size and is eating a lot of my ...
0
votes
1answer
31 views

How speed up mysql dump without data?

There are a lot of questions (1,2,3) about speed up MySql restoring. But all of them speed up data import. Is there a way to speed up schema tables creation? For example dump iundepended table in ...
0
votes
0answers
31 views

Slave SQL thread : Time

First of all, My SHOW SLAVE STATUS shows Seconds_Behind_Master: 0 I can compare my slave with master, n see that replication is perfectly synchronized. Now here comes the issue, When I run SHOW ...
0
votes
0answers
20 views

MySQL on Windows: unable to use config_editor

I am a MySQL rookie and I need to backup all databases. I was thinking of using mysqldump.exe. It warns that using a password on the command line is insecure. Found the config editor and set this up: ...
0
votes
0answers
15 views

Query Enum result replacement

I'm building a View for a database that contains test results, and I have an enumerate for the Result of each tests. Querying for the enum gives-me this enum SELECT COLUMN_TYPE FROM ...
0
votes
1answer
31 views

mysql select everything before a number

I am trying to get the outer and prefix for uk postcodes i.e. NW3 6BX. A space divides the outer part of the post code for which extracting it can be easily achieved by doing: ...
0
votes
1answer
32 views

Which columns to index with LEFT JOIN and GROUP_CONCAT

So i have a complicated MySQL search query, and I wonder which columns I need to index to speed up searching: SELECT wpp.ID, post_title, wp_terms.name AS category, wp_terms.slug AS slug, ...
0
votes
1answer
36 views

alternative to mysqldiff tool (stepancheg/mysql-diff)

I have used https://bitbucket.org/stepancheg/mysql-diff/wiki/Home to diff mysql databases schemas and be provided with sql to make sure their schema are the same. I am running into an issue where it ...
0
votes
0answers
22 views

push mysql db to production without the risk of data loss

We are using mysqldump 'backup'and 'restore' commands,in order to push the DB between staging > production ( backup: # mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql restore:# ...
0
votes
0answers
10 views

How to create Pivot table with dynamic columns in MySQL [duplicate]

I'm using the following table for storing dynamic form data data: Using the following query to select the records from my table SELECT response_no, ...
0
votes
1answer
37 views

initial and last date of change

I have a table with ID's, dates and values witch are the results of periodic tests. I can find the latest test with the according result. But I need also the initial date since when the same result is ...
0
votes
0answers
28 views

mariadb can't import sql which contains \' in insert statement

i export a large db from mysql5.6, then i import into a mariadb (xampp) on my localhost by command line C:\Windows\System32>C:\xampp\mysql\bin\mysql -u root -p dbname < D:/folder/filename.sql ...
0
votes
0answers
145 views

How to fix: MySQL job failed to start

background: i installed mysql server on my ubuntu 14.04 aws ec2 server a few nights ago, configured it following guides from reputable sites, and populated it w/ ~80 million rows. a few times, I ...
0
votes
0answers
8 views

Mysql log access denied fastcgi script

Is there one way to log attempts from a user to log in from the cgi script? Whe you are running a mysql server with a lot o virtual hosts, sometimes you see this message y mysql error log. There is ...
0
votes
0answers
41 views

Query the database for particular value in a column

I have 2 tables which look like this: Table_1: Contains Item Details ------------------------------------------------------ Item_ID | Location | Arrival_Date | Postage_Date | ... ...
0
votes
1answer
16 views

Copying mysql data from one db to another with a where clause for a subset of tables

I'd like to be able to move mysql data from one db to another. I only want to move records where account_id=1234 except for tables like account which does not have an account_id column. Is there any ...
0
votes
0answers
16 views

How do I configure a MySQL login path with an SSL pem file using mysql_config_editor?

I am trying to configure a MySQL login path in a way that encrypts my password. I found the mysql_config_editor tool which does this. However, after going through the entire man page for that tool and ...
0
votes
1answer
62 views

How to know what MySQL queries are causing this error message?

I found this topic: http://stackoverflow.com/questions/1620662 But by the moments that is the limit of connections, I have not access to my server, which displays error messages: ERROR: ...
0
votes
0answers
22 views

mysql backup does not restore complete

I have big mysql database back ( 2.5 G as .sql file ) I restore this backup on ubuntu and it restored full complete with out any problem But when I restore it on windows with xampp use below command : ...
0
votes
1answer
31 views

How to find the most common phrases in a MySQL database

I have a table which contains articles on movies. Each article has a title and many of them have common phrases in them. I would like to do some analysis on the data and extract these common phrases ...