Questions tagged [mysql]

MySQL is a free, open-source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). DO NOT USE this tag for other DBs such as SQL Server, SQLite etc. Those are different DBs that all use their own dialects of SQL to manage the data. Always specify the exact version of the server in the question. Versions 5.x differ greatly in their capabilities from versions 8+.

Filter by
Sorted by
Tagged with
0 votes
0 answers
5 views

How do I connect to an AWS MySQL Database using Python?

I have setup a new MySQL Database using AWS RDS and am having issues connecting to it, specifically in Python. I have gone through the lengthy process of changing security settings to allow any IP ...
UserN600's user avatar
0 votes
0 answers
10 views

Gorm - AutoMigrate creates duplicate Unique Keys

I have the following Struct/Model type TestTable struct { ID uint `gorm:"unique;autoIncrement"` QuoteID uint `gorm:"primaryKey"` } If I auto migrate it with gorm ...
Placeblock's user avatar
0 votes
1 answer
36 views

How to retrieve data from MySQL database?

I have a database with some columns, two of them are username and password, the other columns are information from the customer... After login i'm having difficulty retrieving data from the other ...
RibAs's user avatar
  • 11
0 votes
1 answer
32 views

Cumulative Dataset in SQL

I have created a function in python and I am trying to write the same in SQL. import pandas as pd df['asofdate'] = pd.to_datetime(df['asofdate']) df['month_year'] = df['asofdate'].dt.to_period('M') ...
Wojciech Tabaka's user avatar
0 votes
0 answers
25 views

MySQL UDF Using Table Column Integer Returns Error Code: 2013

I have following query in MySQL: SELECT FUNCTIONTEST(Column1, 27, 'SOMETHING', Column2) AS RANK1 FROM table1 Column1 is varchar(100) and Column2 is unsigned tinyint(3) with default value 0. NULL is ...
user21098501's user avatar
0 votes
0 answers
8 views

ModuleNotFoundError: No module named 'windows' "how to solve this problem?"

Exception has occurred: ModuleNotFoundError No module named 'windows' File "C:\Users\82105.vscode\Student-Management-System-in-Python-main\Student-Management-System-in-Python-main\windows\...
user22842011's user avatar
1 vote
0 answers
25 views

Syntax problem when made slight change when using mysql from Python [closed]

I have a (relatively) small Python app that uses mysql, where I am making a small change to a "select", which is causing a syntax error. If I take the modified "select" and try it ...
user555303's user avatar
  • 1,186
-1 votes
1 answer
19 views

Mysql python tkinter insert no result [closed]

I can't insert row in mysql using python. No error shows as well. Should show messagebox when successful and inserted in mysql. Tried changing mysql details on python but nothing happens. What should ...
Jecho Jecho's user avatar
-4 votes
1 answer
33 views

MySQL shutdown unexpectedly I need a permanent solution [closed]

Every time when I turn off my laptop & then when I came back MySQL is not start. This is not 1/2 times. It happens with me every time. I need a permanent solution. Can you please help me?enter ...
Mahin Hasan's user avatar
0 votes
0 answers
24 views

Connect multiple Django web applications to a single MySQL database

In order to save costs (I have limited funds at the moment), I hope to connect multiple Django web applications (or one or two with Flask) up to a single MySQL database online. Is this possible? Will ...
Ian McInnes's user avatar
0 votes
0 answers
33 views

why it searches a table that I didn't call

here is my code def inscription(user : discord.Member) : id = user.id cursor.execute("INSERT INTO infomembre (id_discord) VALUES (%s)", (id,)) conn.commit() print("...
bilbibalou's user avatar
0 votes
1 answer
12 views

MySQL utilities caching_sha2_password authentication method is not compatible with caching_sha2_password method

I have a set of databases from a MySQL version older than my current Innodb version "8.0.34 for Win64 on x86_64 (MySQL Community Server - GPL)". What I did was copy and paste the files from ...
Toms_Hd3z's user avatar
  • 139
-1 votes
0 answers
38 views

creating a report that holds 2 rows merged and then

Attempting to create a list using unique id's in an hours table that correspond with a first and last name in an employee table with the employee_id as the primary key. I think I have a good lead in ...
Morz's user avatar
  • 1
0 votes
1 answer
23 views

Copied image does not save PHP symfony

I am trying to save an original and a copy of an image that gets sent from a form. I use 2 variables for it, first one stores original, second one is meant to store the copy. I have tried clone, copy ...
Jegi's user avatar
  • 1
-1 votes
1 answer
53 views

How to avoid using harcoded SQL credentials [duplicate]

I have a SQL database and i am using hardcoded credentials in the php files. I have been looking through stackoverflow for an answer but i havent found one. I would like to know how i can make it so ...
D J's user avatar
  • 1
-2 votes
0 answers
28 views

Which one is better practice? Making a db table for data from other tables or directly displaying the data from other tables as one in front end table [duplicate]

I have 5 account types. Head is one of those account types. In my database head table, I only have acc_id and head_id. But the focus of the crud operations of the head account type is on the managers ...
Winter's user avatar
  • 1
-2 votes
0 answers
25 views

ERROR 1005 (HY000): Can't create table 'ClassicModels.products' (errno: 121) [duplicate]

CREATE TABLE productlines ( productLine varchar(50), textDescription varchar(4000) DEFAULT NULL, htmlDescription mediumtext, image mediumblob, PRIMARY KEY (productLine) ); CREATE TABLE products ( ...
andy amaro's user avatar
-1 votes
0 answers
13 views

sameersbn/mysql restarts constantly

Good afternoon! Migrated sameersbn/redmine and sameersbn/mysql to a new machine. I moved the whole folder /srv/docker/redmine, compressed it with tar beforehand. I did the same thing last time and had ...
sivsoft's user avatar
  • 13
0 votes
0 answers
40 views

ERROR 1264: 1264: Out of range value for column 'cpf' at row 1 [closed]

Consider (00000000000) as an example and (bla bla bla) as well Operation failed: There was an error while applying the SQL script to the database. Executing: INSERT INTO venda_livros.pessoa (cpf, ...
Lara Gomes's user avatar
-3 votes
0 answers
33 views

Error :Cannot delete or update a parent row: a foreign key constraint fails [duplicate]

important The issue persists even after adding the ON DELETE CASCADE option to each referential integrity constraint. database schema : CREATE TABLE utilisateurs( id_utilisateur Int ...
itachi_zhm's user avatar
-3 votes
0 answers
26 views

How do i fix wp_postmeta issues [closed]

website is running and opening fine, issues faced unable to find h-panel and shows error (Not available), works after restoration of website to previous date. Unable to Upload image to Media Library, ...
livinghumanity's user avatar
0 votes
0 answers
10 views

Angular - Nest js - my sql ---- data transfer using condition ; [closed]

In Angular project , I have a SQL Db and I get complete data in back end to front end (mat-table ) , now I create a 2 data tables in front end , and the data base table records as two types of data ...
zab-series's user avatar
0 votes
1 answer
33 views

spring data jpa `@EntityGraph` not work as expected

I've been encountering a issue with @EntityGraph in Spring Data Jpa not functioning as i expected. see my project structure: @Entity @Getter @NoArgsConstructor(access = AccessLevel.PROTECTED) @...
rlqja's user avatar
  • 1
0 votes
0 answers
35 views

Execute query union select null MYSQL 5.7 [closed]

select pct.portal_title_id, pct.id portal_title_temp_id, pct.title, pct.priority from portal_title pc join portal_title_temp pct on pc.id = pct.portal_title_id where pct.is_active = 1 and pct....
hungtv's user avatar
  • 94
-1 votes
0 answers
14 views

ajax formData return empty object on file upload ajax laravel [closed]

I'm trying to upload image through ajax but i'm not able to get image file on controller as formData always return empty object. I'm trying to upload form data through ajax using FormData method so i ...
Zaheer Ahmed's user avatar
-2 votes
0 answers
20 views

How can we connect vb.net program to a database using WAMP or MySQL query? [closed]

We are task to do a program that delete, update, add new and reload using Vb.net directly to a database. As of now, we are done in the interface but no codes at all and database details. Additionally ...
Hydrex247 's user avatar
0 votes
2 answers
41 views

how to improve strcmp mysql performance comparing similar strings

I hope this is not a duped question. I've looking around and can't find any question like mine, but... I have a table containing people's data, and we know there are duplicates. The table contains ...
JBC's user avatar
  • 51
-3 votes
0 answers
35 views

My php code is sending the wrong output to the browser and keeps showing Error! Foreign key vendor id is not in TECH3740.VENDOR table on the webpage [closed]

The vendor id is actually in the table so I don't know why it won't add the product to the table. I also disabled foreign key checks but still end up with that message or a can't update child or row ...
CSharp2023's user avatar
1 vote
1 answer
25 views

Laravel Eloquent toSql() missing joined tables

I have a relationship that actually correctly returns joined values when I use with("relationship"). The problem is I suspect it is using a loop to get the values so I wanted to check the ...
AntonOfTheWoods's user avatar
1 vote
1 answer
35 views

Is MariaDB restricted to localhost per default?

This question may sound strange, but I haven't found any official documentation, so I'm asking it here. In MySQL and MariaDB you have the possibility to specify bind-address in the options file. If ...
user17145524's user avatar
0 votes
2 answers
68 views

How can I parse through an array in PHP and treat each element as a string? [duplicate]

I am working on a project where I need to turn an array of strings into an SQL query. In order to do so, I am attempting to parse through the array and place each element in a string to be sent to ...
twister1000000's user avatar
-4 votes
0 answers
27 views

How to Install MySQL [closed]

I want install mysql on my destop and laptop but i comes accross different types of Mysql. Please, how can install good mysql app on my desktop? I am yet to test different types of mysql. I will also ...
Rotimi 's user avatar
0 votes
2 answers
62 views

SQL GROUP BY while selecting the latest record + extra conditions

I am trying to figure out what would be the most efficient way of achieving the following: I have two tables: word_translations(id, word_id, language_id) and translations(id, text, ...
Adam's user avatar
  • 1,084
-3 votes
0 answers
48 views

sqlMessage: "Access denied for user ''@'localhost' (using password: YES)", [closed]

I have a react web app, that I am trying to deploy on EC@ and MySQL database on RDS. On my ubuntu ec2 instance whenever I try running the web app the mysql connection gives me an error. However I'm ...
st8032's user avatar
  • 1
0 votes
0 answers
28 views

Cant install Mysql2 Gem::Ext::BuildError: ERROR: Failed to build gem native extension

Im using ruby '2.7.5' and rails '6.0.4.7' on WSL2 I'm trying to install the mysql2 gem but I keep getting the following error: Gem::Ext::BuildError: ERROR: Failed to build gem native extension. ...
JulioCarvalho's user avatar
0 votes
0 answers
25 views

Enable to use my bdd table after reinstall xampp

After reinstall xampp I got in PHP my admin #1932 error all my table a mentioned does not exist I copy my previous bdd into mysql folder can't also execute php artisan migrate to restore all my data ...
Jonathan Aka's user avatar
0 votes
0 answers
38 views

Is there a SQL pattern to follow for historical tables that expire old records when new records come in?

id ... effect_date expire_date 1 ... 2023-10-23 9999-12-31 1 ... 2023-10-15 2023-10-22 1 ... 2023-10-10 2023-10-14 1 ... 2023-10-01 2023-10-09 I have a history table that has an id, bunch of data ...
Brian Jones's user avatar
-1 votes
0 answers
12 views

SQL General Error 1442 althoug I'm making a temporal table to make the update [duplicate]

I have the next table in PhpMyAdmin SQL Table scenes And I try to make a trigger to increse in one the scen_number of the record that have the same proj_id and scen_number of the entered record. Then ...
0 votes
1 answer
30 views

MySQL performance hit of modify column if no change is made

I have many huge MySQL tables (hundreds of milions of entries). They all have a field called "x" which needs to have the NOT NULL constraint. Some of them already have the constraint whereas ...
Abvgz's user avatar
  • 11
0 votes
0 answers
9 views

Unable to connect to MySQL database using Python: OperationalError

I am working on a Python project that involves connecting to a MySQL database. I'm using the mysql-connector library for database connectivity. Issue: I'm encountering an OperationalError when trying ...
HrishiE's user avatar
0 votes
0 answers
23 views

Moving mysql files between computers when mysql is broken on one [closed]

I'm trying to move a MySQL database from Computer A to Computer B. I can't use the normal way, e.g., mysqldump, because the reason I'm moving the database is that Computer A has gotten corrupted (...
user2205678's user avatar
0 votes
2 answers
33 views

Does MySQL have a way to read directly from a csv file instead of importing it?

Postgresql has a concept of foreign tables and can use a csv file as the table source. Is there a way to do this in MySQL? In my case I do not want to import the file as it changes every minute (gets ...
Steve Lloyd's user avatar
-2 votes
0 answers
24 views

How can I implement a database table in a website that stores information regarding tabletop matches and tournaments? [closed]

I started building a website (React / Lambda / some DB) for people to register for local Warhammer tournaments, edit their scores in a match, and see upcoming matches. The application supports no more ...
ManuDITA's user avatar
-2 votes
3 answers
60 views

Mysql query IN or NOT IN faster?

I have two simple queries below: SELECT * from table_name where status IN (0, 1, 2, 3, 4) SELECT * from table_name where status NOT IN (5, 6) The possible value of status is 0 to 6, and column status ...
Van Tho's user avatar
  • 613
-3 votes
0 answers
52 views

Why should I use different variable names in two similar but independent parts of a JOIN statement

Let's say I have a set of items with some value property. I measure this value for each item two times (before and after some event) and save the result in a table with three columns item_id, value_1, ...
Vitalizzare's user avatar
  • 4,859
0 votes
0 answers
23 views

MySQL won't connect to docker compose

I am currently working on a school project and need to connect my code in Visual Studio Code to MySQL and Docker. But when i try and connect it to the database, it gives me an Access denied for Using ...
Toby_Oldenburg's user avatar
-1 votes
1 answer
32 views

Extract text from json field

My query looks like: select id, json_extract(flow_settings, '$.email_settings_id') AS email_settings_id from smsbump.flows where flows.flow_trigger in ('Synergy/TierExpiryReminder', '...
Toma Tomov's user avatar
  • 1,506
2 votes
1 answer
66 views

Understanding mysql_stmt_bind_named_param() - MySQL C API

I refer to mysql_stmt_bind_named_param() I don't understand the example in the documentation. It uses some traceparent which is never used. I come from PHP where bind variables are using the :bindName ...
Peter VARGA's user avatar
  • 4,950
-1 votes
1 answer
54 views

laravel variable not reading from mysql

I've come back to a Laravel project having been away from coding to deal with a personal situation. Now I've hit a brick wall. I'm getting an "Undefined variable" error which I don't know ...
Graeme Robinson's user avatar
1 vote
1 answer
46 views

Problem with Unicode characters when backing up and restoring mysql database in docker container

I used this code to create a database in docker: docker run -d -p 9906:3306 --name db -e MYSQL_ROOT_PASSWORD=1234567890 -e MYSQL_DATABASE=mydb -e MYSQL_USER=myuser -e MYSQL_PASSWORD=123 mysql --...
Morteza M's user avatar
  • 164

1
2 3 4 5
13238