449 questions
0
votes
0
answers
47
views
PDO MySQL 5.6 Query Execution Timeout [duplicate]
Going through threads from 2009-2022 it doesn't look like there has been a real answer on getting a query to timeout in PHP from MySQL (5.6). The PDO timeout attribute is for the connecting, not the ...
0
votes
0
answers
427
views
how do I modify docker-compose.yml to download mysql 5.6 for an apple m2 silicon running Ventura OSX 13?
I have a docker-compose.yml file that looks like:
version: '3'
services:
mysql:
image: dtr.s-9.us/mysql:5.6
restart: always
environment:
MYSQL_DATABASE: 'mydb'
...
-1
votes
2
answers
36
views
Update missing values in MySQL 5.6 table by selecting values from closest records with same id
Let's say I have a table with logs. The value of status column may be NULL and I would like to UPDATE this value by copying value from the log for same settingid which have non-NULL status and closest ...
0
votes
0
answers
158
views
datetime/timestamp problem with replication from 5.6 to 5.7?
I'm replicating from mysql 5.6.33 to 5.7.41. I have a table with a datetime field. If I understand correctly, between 5.6 and 5.7 the decreased the space a datetime field uses because it doesn't store ...
1
vote
0
answers
22
views
How to find the table record difference after changing the ROW_FORMAT of mysql table
I want to migrate from mysql 5.6 to mysql 8 but got some warning related with maximum allowed size (8126) for a record on index leaf page.
so need to confirm whether data are safe after changing the ...
0
votes
0
answers
147
views
mysql prepared statement unable to execute. Getting error 1064 in prepared statement
Query is retrieving correct result but in Prepared statement getting error "Error Code: 1064. check the manual that corresponds to your MySQL server version for the right syntax to use near '...
1
vote
1
answer
43
views
Select last registered row from each group from two tables in MySQL v5.6
Could you please help me with a query I'm having issues with? I tried to seach for similar questions here with no success.
I have 2 tables which I need to join and get the latest created_date from ...
0
votes
0
answers
12
views
What should be ideal value of Filtered column in mysql explain clause? [duplicate]
As per MySQL manual
rows shows the estimated number of rows examined and rows × filtered /
100 shows the number of rows that will be joined with previous tables.
in my case i have executed one ...
0
votes
1
answer
55
views
SQL: difference between where in main body vs join clause
I'm wondering why does the following queries give me a slightly different dataset:
SELECT t.name, COUNT(e.id)
FROM event_type t
LEFT JOIN event e ON t.id = e.type_id AND e.start BETWEEN ? AND ?
GROUP ...
1
vote
1
answer
36
views
Multi Ordering 4 SQL columns with a single query
Environment: MySQL 5.6
SqlTable name = CategoryTable
Sql Columns
CATEGORY_ID (INT)
CATEGORY_NAME (VARCHAR)
LEVEL (INT)
MOTHER_CATEGORY (INT)
I've tried with
SELECT
CATEGORY_ID, CATEGORY_NAME , ...
-1
votes
1
answer
6k
views
Mysql 5.6 Installation errors in Mac M1
System version - macOS Monterey (12.4)
Chip - Apple M1 Pro
Objective - I want to install [email protected] using brew as per requirement. Any other methods are also welcomed.
Steps followed -
run command for ...
1
vote
1
answer
102
views
Optimize MySQL Query using explain
I have following SQL
SELECT COUNT(*)
FROM A
INNER JOIN B ON A.evnumber=B.evnumber
INNER JOIN D ON B.userid=D.userid
This is explain result.
[
{
"id": "1",
"select_type&...
2
votes
1
answer
152
views
mySQL Group_Concat and Case when query gives error
I am getting the error "Incorrect parameters in the call to native function 'CONCAT': on the query below:
SELECT
*,
GROUP_CONCAT(
CASE
WHEN `REASONORINSTRUCTIONCODE` = 'R'
...
1
vote
1
answer
81
views
Mysql Query to calculate the distinct count of pickup numbers by plant
I am trying to get the distinct count of pickup numbers by plant and pickupmonth year
Input
pickdate picknumber Plant
1/3/2022 L009803 Seattle
1/3/2022 L009803 Seattle
1/3/2022 L009803 ...
1
vote
2
answers
553
views
Select clients that that don't have an event after a certain date
I have two tables involved in this situation:
tools_events
COLUMN_NAME
DATA_TYPE
event_id
int
event_type
varchar
event_value
varchar
event_client
int
event_timestamp
datetime
tools_clients
COLUMN_NAME
...
0
votes
1
answer
400
views
MySQL ORDER BY performs better with a SUBQUERY than a PLAIN simple query
For some reason I don't understand this plain regular MySQL query runs SLOWER than expected. From what I understood, MySQL would first slice the queryset using WHERE then sort the subset of results. ...
0
votes
1
answer
537
views
Issue with Spring Cloud Dataflow and Mysql 5.6
I have the following problem when trying to start a SCDF server connected to Mysql 5.6.
Using the following command to start a SCDF server connected to a mysql database (version 5.6):
java -jar spring-...
0
votes
1
answer
390
views
change default value to a column through a migration
I have an existing table in which default value of column is already set. This table contains lot of data in it. I don't want to change any of exiting record in table(don't want to change column of ...
0
votes
0
answers
639
views
Error Code: 1193. Unknown system variable "block_encryption_mode"
I want to change AES encryption mode to CBC from DEFAULT ECB, I executed the following query to change mode: My MySQL version is 5.6.10
SET block_encryption_mode = 'aes-128-cbc'
This gives following ...
1
vote
1
answer
280
views
MySql optimizer doesn't use the index on varchar
I have a table defined as
CREATE TABLE `article` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`field1` varchar(1024) NOT NULL,
`priority` int(11) NOT NULL,
`prodcode` varchar(64) NOT NULL,
`...
2
votes
1
answer
246
views
Mysql query result generate months(1-12) for each category and arrange in same column order by category
I want to generate months no for 1-12 for each category. There are two categories, DEBIT and CREDIT. So, after finish print 1-12 for DEBIT. Then, it should go to next category and print the same with ...
0
votes
1
answer
38
views
Mysql search string in all fields slowness after version upgraded to 5.6
Current mysql version is 5.5. I upgraded a copy to version to 5.6.
Below query get 15secs to execute from 5.5.
But the version 5.6 took 750+s to run same query.
Query :
SELECT SQL_NO_CACHE *
FROM ...
4
votes
2
answers
104
views
How can I update my database table with the result of my query
I am a French designer and I have a SQL problem. My MySQL server is in v5.6 and i ask for help because I have a syntax problem. I think you can bring me a solution.
I have a data base called "...
1
vote
1
answer
316
views
using INFORMATION_SCHEMA.COLUMNS in a TRIGGER to log changes to _all_ columns?
TRIGGERs can be used to log changes to individual DB columns as described at https://stackoverflow.com/a/779250/569976 but that technique requires you have an IF statement for each column. It's not a ...
0
votes
1
answer
348
views
select list of date between date range with condition
hi i have a goals want to generate list of date between 2 date but i also have some condition like this :
Table_A : Maximum Delivery Time and Week off
Code Max_delivery_time Week_off
01 ...