Category "mysql"

fetch API always returns {"_U": 0, "_V": 0, "_W": null, "_X": null}

The below code always return the below wired object {"_U": 0, "_V": 0, "_W": null, "_X": null} as response. Here is my code getData = () => { f

Loop through JSON object in mysql function

I have a json object which has list of products under a bill. I want to write a mysql function for it which reads the data from the json and iterates over it on

Mysql query find replaced column value

Hi anyone have idea for finding MySQL row like below code, but this one not working. I have column value "1205_15_09" and I want to find this row using this con

MySQL ERROR 2013 (HY000): Lost connection to MySQL server during query

The problem: Importing a 2GB dump file into MySQL 5.6 always crashes with ERROR 2013. There are several answers on StackOverflow about how to deal with this, b

MySQL SELECT IF with CTE not behaving as intended?

I have a complex MySQL SELECT statement with a LOT of CTE frontloading. Note it works just fine, but it seems MySQL is doing something strange with the SELECT I

carbon generated datetime not stored correctly into the database

I have a tv_shows table where i'm trying to store the start and end datetime of each tv show. this is my migration: Schema::create('tv_shows', function (Bluepri

create shema databse using XSD in mysql

I have a shema database in file type XSD this file contains descriptions of all tables. My question is how I can use this file to create a database in MySQL. i

Is this Mysql Bug? About SELECT ... FOR UPDATE lock_mode X insert intention

have a table struct is id, aid, ...... the aid is an index(a type of int) trx1 and 2: begin; trx1: select max(id) from a where aid = 10 for update; trx2: sele

Is OPTIMIZE / ANALYZE required after mysql table TRUNCATE?

In mysql database, I have about 20 tables (data size is very small - most of the tables have about 1,000 to 20,000 records, only one table has 200,000 records).

pymysql just select value and save into variable

cursor.execute("SELECT price FROM tabel WHERE id = 1600") print cursor.fetchone() gives me the output {u'price': u'4345.6'} how can I select just the value

ORDER BY field from a comma separated subquery

I'm trying to order a query based on the comma separated result of another query SELECT t.field1, t.field2 /*, ...*/ FROM table t /* ... */ ORDER BY CASE W

Handle error for duplicate entries - PHP/MySQL

What is the proper way to handle error on duplicate entries for PHP/MySQL? The code below is not working even tho the code 1062 is the right code for duplicate

Laravel Sail Docker PHPMyAdmin : SQLSTATE[HY000] [2002] No such file or directory

I have some trouble connecting to PHPMyAdmin. So I always get the following message. SQLSTATE[HY000] [2002] No such file or directory I looked for a solution

RELIABLE way of starting and stoping xampp (Mysql, Apache, Tomcat) from a batch file without crashing mysql databases

THE ENVIRONMENT: I am using Xampp (Mysql, Apache, Tomcat) for writing Java applications in Windows 11. THE PROBLEM: Everytime i forget to close xampp, and resta

Named parameter not bound : DATE_FORMAT Native Query in Spring Boot

I am trying to get table data as list using select query between dateFrom and current date using MySQL Native Query in Spring Boot. and MySQL database field dat

Query to retrieve rows where a value has changed

trying to get back into some very rusty SQL skills and already over my head! I have a table (example below) where each week I upload rows that indicate the prog

How to fix a Laravel Sail "SQLSTATE[HY000] [1130] Host 'XXX.XXX.X.X' is not allowed to connect to this MySQL server" error

Laravel: 9.2Mac OS: 12.3.1Docker Desktop: 4.5.0 I have installed a default Laravel project using sail. My docker-compose.yml file includes the following: mysql:

Rank actors with movies released in India based on their average ratings. Which actor is at the top of the list?

-- Note: The actor should have acted in at least five Indian movies. -- (Hint: You should use the weighted average based on votes. If the ratings clash, then t

Linux Bash to mysql: Select or delete record with external value

I have a MariaDB (mysql) database with a table which looks like this: MariaDB [DevicesPool]> show columns from Dirs_and_Names; +-----------------+-------

Kafka producer can't create topics and throwing continuous error after creating Debezium MySQL connector

I am using Debezium as a CDC tool to stream data from MySql. After installing Debezium MySQL connector to Confluent OSS cluster, I am trying to capture MySQL bi