Category "mysql"

sqlalchemy Operational Error : Can't connect to MySQL server on aws rds

My database in hosted on AWS RDS. I am having connectivity issue and getting this error: sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2003,

I faced error message Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' when I tried to connect local mysql server

I am trying to connect my local MySQL server, but I am facing this error message. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/l

Apache Superset: Calling MySql Function from an Alert

I have a MySql Function which makes updates to a table, inserts a row into another table and returns an integer value. When I call this function from Superset's

How to insert DEFAULT value with MySQLdb string formatting?

I have run into this a few times now, where I'm trying to insert (or bulk insert) into a MySQL table using VALUES without defining the columns explicitly, but t

Integrating Frontend Javascript with Backend Node.Js and mySQL

I have tried searching around, but could not really find a solution to my question. Either that or I am not really understanding something properly. I have a pa

Table relationship problem for an competition program (tennis/Padel)

I am trying to make a my first relationally table structure for a tennis/Padel competition program that registers the scores (sets.)of dubbel matches(4players).

How do I make SQL injection is this vulnerable query

I have this query that receives a parameter from user input and I think that I am vulnerable to SQL injection. $query = "SELECT pcode,price,description FROM pro

How to output sql date row to time elapsed

I have table with row id, name, created_at and I want to output the created_at row as timestamp time ago in php

Week date range

There is a table objects, which stores data on real estate objects. Me need to use a query to calculate a new field that will display the date range from Monday

calculating the average of marks from the beginning to this record

i have a table named test with the below structure like this id mark join_id 1 5 1 2 4 1 3 9 1 4 5 2 5 7 2 6 12 2 i want to write a que

SQL GROUP BY and COUNT and conditional SUM with column value

Here is an example of my table. ┌────────┬────────&#

Get specific rows only after comparing with previously added rows on different date

There is a table which has multiple fields including a Date column at which the current record gets updated. Col1 Col2 Col3 Date A X1 Y1 Today B X2 Y2 Today C

I am trying to connect and read data from mysql in node js and react project with clinet and server setup but

**I am trying to connect and read data from MySQL database in node js and react project with client and server setup but unable to get success, here is the code

How do I get a data from one table to another but with calculations?

I have two tables: "Customer" and "Order". The "Customer" table has an attribute called noOfPurchases, and the "Order" table has an attribute called quantity. H

Why does this Sql query shows the possible changes but does not implement it?

So, I want to change the prefix of my tables and the following command shows the possible changes that will take place which seems alright but does not seem to

MS Access ODBC Connection error - "cannot define field more than once"

Does anybody have some insight on why the following error "cannot define field more than once" comes up in ms access when connecting MySQL tables via ODBC? The

How to use Python-Operator % for multiple values?

I'm trying to fill an SQL database with soma data, measured by an bme680. Therefore I'd like to format the measured values like this: print ("Temperatur: %0.1f

how to get weeklytotal and yesterday record in mysql in one table

Hi Everyone i am trying to implement query to get weekly and yesterday data in same table, dummy output i have shared below, if yesterday not exist as per emplo

Resolving 'Illegal-mix-of-collations' MYSQL error in node

I am connecting to a mysql database from node using mysql2 and have been experiencing intermittent illegal-mix-of-collations errors - see this question. The col

How to use multiple databases in Django with an empty 'default'?

I'm trying to make a multiple database project in Django. But I'm having problems to properly migrate my models to the appropriate database. I'm using the 'Writ