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
1answer
32 views

Mysql read only engine type and indexes

I have a mysql table. This table has only three columns. Two are varchar (5),and one is varchar (32). There will only be one query run against table. Select (column 1),(column 2) from mytable where ...
0
votes
0answers
38 views

re-sync Replication Mysql Slave after down server

i need some help to restablish my slave on mysql. A few days ago my slave machine stop replicating with this error. *************************** 1. row *************************** ...
0
votes
1answer
45 views

MySQL Bug reference in release notes, but where?

This may be a daft question, but on the MySQL release notes, a lot of them are followed by BUG Reference numbers. But most of these BUGS don't exist when you search for them at bugs.mysql.com. ...
0
votes
0answers
27 views

can tables be created in a loop on mysql

i want to create multiple table with different names(based on numbers mostly) which will have same structure. In C++ I used pointers when i wanted to create variables in this manner. Is there a ...
0
votes
1answer
32 views

MySQL Trigger Validate Before Insert [closed]

I am new to MySQL TRIGGER. I want to know is it possible to check before insert using last record found? Table AccountChecking ==================================================== || ID || ACID |...
0
votes
3answers
55 views

Why full index scan over full table scan?

I have a query that pulls from small tables in MySQL: SELECT C.cid, C.email, R.flight_number FROM customer C INNER JOIN reservation R ON C.cid = R.cid WHERE C.email LIKE '%d.com'; There exists an ...
3
votes
2answers
132 views

MySQL hundreds of sleep processes giving “Error establishing a database connection” error

I'm running a LAMP with ubuntu server 12, mysql innodb_version 5.5.49 on a Wordpress platform (3 websites virtualized). Has been running without issue for about 2 years, but I just started getting an ...
4
votes
1answer
31 views

How to use GENERATED from SELECT with JOIN?

This is my database. FoodItems is just normal table but I want to use virtual columns to generate all the related data, e.g. Servings.kcal is equal to related (FieldItem.kcal*unit)/100 (the data is ...
0
votes
1answer
69 views

Compare two sets with a quantity field

Imagine I have a basket from an online shop, with id of item and the quantity. I have a list of items of quantity and I would like to find a basket with the exact same items and quantity for each. I ...
1
vote
1answer
35 views

Hourly Set Report in MySQL

I have a daily reporting system in place which shows the number of calls made by a particular telecaller in a day. And it works well. I'd like to bifurcate it further into hours for e.g 9-10, 10-11 ...
-2
votes
1answer
64 views

select from where row x column A = row x+1 column B

Query select from where row x column A = row x+1 column B Data Car ID | Time 1 | Time 2 1 | 5:15 | 4:12 2 | 3:13 | 5:15 3 | 6:12 | 5:15 4 | 4:12 | 2:15 Result It ...
0
votes
0answers
19 views

MySQL - What does ODBC's BIG_PACKETS option do?

I have seen the line OPTION=10 in some connection entries in ODBC.ini files, and found that it corresponds to the options 2 and 8. Those are defined in the documentation (PDF) as the following (...
0
votes
2answers
83 views

Is there a way to backup a mysql database without having to run mysqldump?

Is there a way to run a backup of a mysql database using sql? We have scripts which run updates against our databases. They only have mysql user credentials, not system login credentials. Is there ...
0
votes
1answer
34 views

Mysql repetition of column in Criteria

What happens when I repeat the same column in the criteria part but with different values . For example col1 ='val1' or col1 = 'val2' or col1 = 'val3' . Assume col1 is not indexed. Will mysql ...
1
vote
1answer
17 views

Scenario to automate the promotion of a read replica when the master db is not responding

I would like to set a scenario like the following: Set an RDS event subscription [that the MySQL is unresponsive] that will publish to an SNS topic that will trigger a Lambda function which will ...
0
votes
1answer
27 views

Migration MySQL to Cloud Environment replication

I'm having 5 MySQL database server , these 5 server are used for e-business web-server. Now I Would like to move the MySQL database to cloud environment for database continuous running. Recently we ...
0
votes
1answer
70 views

Is there a Portable MySQL

For teaching and testing purposes I would like to run MySQL without actually having to install it. I have found portable PostgreSQL for both Macintosh and Windows, which is good, but have been unable ...
3
votes
1answer
32 views

Mysql table crash, what do I need to do to fix this

Table '.\mysql\proc' is marked as crashed and should be repaired. Can anyone help me figure out how to fix this?
-1
votes
1answer
38 views

Join between a table and a recursive table

I've that two table, I know they are not well thinked but my client did this tables and I cannot change them. TABLE A id | codigoFatherTABLEB | codigoSonTABLEB TABLE B id | name | codigo | idPadre ...
1
vote
1answer
25 views

Contradictory reports from MySQL that a binlog file exists

Our replication recently stopped working. I submitted a question but was unsuccessful in fixing the problem (Error 1236 - "Could not find first log file name in binary log index file"). ...
0
votes
1answer
47 views

Effective way to migrate from SQL Server to MySQL

I have a 20GB Microsoft SQL Server database that needs to be migrated to MySQL. Right now I only have the schema for the source db. I tried the migration wizard on the schema in MySQL Workbench and ...
0
votes
0answers
17 views

MS SQL, MySQL linked server distributed transactions

I have a linked mysql server object that I am accessing through MS SQL. I'm unable to execute any 'OpenQuery' queries to the MYSQL inside a trigger because I get the following error message: Msg ...
1
vote
1answer
55 views

How to fix `The table '/tmp/mysql/#sql_xxxxx' is full`?

Ubuntu server 16.04, php7, nginx 1.10, mysql 5.7 in Hyper-V on Windows 10 host How to fix The table '/tmp/mysql/#sql_xxxxx' is full ? In mysql-error.log [ERROR] InnoDB: Tablespace ...
0
votes
1answer
27 views

Event to update a column won't run

I have successfully created an event in MySQL to update a column called dob in a table called auth. My problem is that the event won't run. Here is my code: DELIMITER $$ CREATE EVENT ...
1
vote
2answers
36 views

How to select status variables into temp variables in mysql

I have selected global variables into temporary local variables like below. mysql> select @@long_query_time into @a; Query OK, 1 row affected (0.00 sec) mysql> select @a; +------+ | @a ...
0
votes
0answers
39 views

Selected Child Categories based on parent categories from another table

I have two tables rules With three step hierarchy: |id | name | parent | |---|-------|--------| | 1 | A | 0 | | 2 | B | 0 | | 3 | A(1) | 1 | | 4 | A(2) ...
0
votes
1answer
49 views

What type of database server/service to use for an increased insert rate? [closed]

Currently I am using MySQL and it processes 10,000 inserts per day, and soon it is going to be 200,000 inserts per day. Now I am using a normal server which is okay with 10,000 inserts but processing ...
0
votes
1answer
41 views

can i have password for my mysql table

is there a way i can set password on a table i am creating in mysql. i am working with rather sensitive data , and i have to use mysql on a server on which i am obviously not the admin. so people ...
0
votes
1answer
24 views

Mysql Order , Select highest value item and update to another table

i have list in data_1 table. i want to select highest value item in one group and update it to another table. can i do that with 1 query? example : Select "Group B Leader Jane" and update it to other ...
0
votes
1answer
28 views

SQL Server to MySQL migration, replace '\xA0' with a regular space

I am having some trouble while migrating data from SQL Server to MySQL--it seems some data does not want to place nice. I am recieving the error: Incorrect string value: '\xA0\xA0' for column '...
1
vote
1answer
111 views

Special Characters in MySQL using UTF8 Unicode Collation and LOAD DATA INFILE

I have several csv files in am loading into MySQl using Java. In the Description field I have several Special Characters that are causing the load to fail. I am using LOAD DATA INFILE. This is nested ...
0
votes
1answer
39 views

MySql - Get all children in JOIN if one child matches a condition

I have a one-to-many relationship between two tables Parent and Child. I want to get all children if one child matches a condition. Something like below: SELECT * FROM Parent p INNER JOIN Child c ON ...
0
votes
1answer
41 views

MySQL disk scanning algorithm [closed]

How does MySQL (InnoDB engine) read data from disk? What scanning algorithm does it use? Since the rows are stored in data pages will it read the entire data page to get the resulting rows?
0
votes
1answer
28 views

Is there an equivalent of 'FORMATFILE' in MySQL?

I'm looking for a way to import data from a text file to a MySQL database, the text file used to be imported in a SQL SERVER db via BCP and FORMATFILEs option for exemple : BULK INSERT [MyTable] ...
1
vote
0answers
30 views

mysqldump show Table doesn´t exist when doing LOCK TABLES

Our server had power outage and after start some of mysql tables was inaccessible. I tried many things but nothing helped and currently i am at freeze point. I used command : mysqldump database ...
1
vote
0answers
19 views

Database Designs Alternative to Polymorphism in Establishing Relationships

I'm working on a database which handles replacement of parts in a machine. Rules A machine has many components A machine has a set of assembly instructions Many components have many part (screws, ...
0
votes
1answer
45 views

What happens when the buffer pool size is insufficient in mysql

Let us assume I run a query for a table whose size is very huge. My buffer pool size is as low as possible. What happens now? whether I will get an error regarding the insufficient space in buffer ...
0
votes
0answers
27 views

Tag system for multiple Item types and groups Schema

I have a groups table and users table, and a many to many relationship between them. In my app, there are different modules, like question, product,suggestion , etc. Users can create products/...
0
votes
1answer
65 views

Freezing Centos server

My dedicated server (CENTOS 6.4) freeze every two day and I have some trouble to found te origin. What I know : This is not hardware issue as tests were made about (RAM, CPU, Discs, ...). At the ...
1
vote
0answers
28 views

pub/sub database schema

I am having a hard time creating a pub/sub database schema with stateful metrics. Saying it aloud it sounds easy enough: "There are many organizations that will subscribe to checklists that are ...
0
votes
1answer
24 views

Creating trigger to manipulate language

This is the table that I have. Effective date is a user input, then I need to use a trigger that produces Print depending on the language the user inputs (English or French only). For English, I used ...
1
vote
0answers
33 views

Getting InnoDb internal Errors on every query run

I am having following errors in error.log at the run of each query due to which I am not able to use error.log properly. 2016-05-30 09:39:58 7f7c7e3cb700 InnoDB: Error: Column last_update in table "...
0
votes
2answers
47 views

Sorting by month by chronological occurrence when the year doesn't matter?

Given a table with a date column, and given a query that selects dates in a given range of the year (like "November 20th through February 20th"), and where the year portion of the date doesn't matter (...
0
votes
1answer
35 views

Mysql/pivot table for two tables

I was trying to get multiple rows into single row with dynamic columns created as per the data.i have two tables combined with foreign key.here is my data follows table 1: | id | name | Invoice value ...
1
vote
1answer
34 views

how to upload a file on a mysql server if access to temp folder is not present [duplicate]

I have a CSV file that i want to enter into a table in my database which is present on a remote server. But presently I don't have access to temp folder so I cannot copy my file on that folder. Is ...
1
vote
1answer
59 views

Delete the maximum ID row [duplicate]

How can I find duplicate rows and for each group of duplicate rows delete the max ID row, in MySQL? Using this query, I can find duplicate rows: SELECT * , COUNT( awb_no ) c FROM tbl_cod_rpt_COPY ...
1
vote
1answer
61 views

Using indexes in ORDER BY MySQL

Here i have table with indexes and more than 700000 entries. CREATE TABLE `t1` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `title` char(255) COLLATE utf8_unicode_ci NOT NULL, `cat_id` int(...
1
vote
0answers
64 views

Null instead '0000-00-00 00:00:00' in mysql 5.7

Before: mysql 5.6. One of the columns in the table is created as follows: `f_stamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' When i view this field in mysql client or using DataGrip, this ...
0
votes
0answers
45 views

MySQL - Database Design : Encrypting user id and creating a mask for further internal references

For a food order delivery system that I am working on, I want to make sure my user's private information is well protected; from system admins too. So I thought of coming up with this concept of ...
0
votes
1answer
37 views

Speed up SUM() on a result with JOINS in MySQL

I have a query with a combination of 6 left joins and inner joins. The query gives a result of 25000 records in 112ms. When I do a SUM() the query takes 4s. A SUM() another table with 35000 records ...