Latest Questions tagged Mysql

Browse all latest questions tagged Mysql

24
Votes
Published 26 Aug, 2022
Python - Python and MySQLdb warnings

I have a program that is exporting MSSQL data and importing it into MySQL. I have a function that is importing as follows: def importMySql (mycursor,exportedfilename,table,delimiter): file_loc =...

133
Votes
Published 07 Sep, 2022
Java - Why can Java not connect to MySQL 5.7 after the latest JDK update and how should it be fixed? (ssl.SSLHandshakeException: No appropriate protocol)

In the latest update to the JDK in April 2021 (11.0.11+9-0ubuntu2~18.04) support for TLSv1 and TLSv1.1 was dropped, presumably because since March 2021 those versions are no longer supported. This is...

40
Votes
Published 20 Aug, 2022
Python - MySQL One-to-Many to JSON format

I have two MySQL tables: User (id, name) Sale (id, user, item) Where Sale(user) is a foreign key to User(id), so this is a one-to-many relationship (one user can make many sales). I'm trying to ge...

102
Votes
Published 08 Aug, 2022
Jquery - Using AJAX to open php file

So I am trying to open af php file that updates something in my database. I want to do this using AJAX since I dont want my entire page to update. After the php file has been ran I want to change an i...

4
Votes
Published 06 May, 2022
Python - How to create a new table in a MySQL DB from a pandas dataframe

I recently transitioned from using SQLite for most of my data storage and management needs to MySQL. I think I've finally gotten the correct libraries installed to work with Python 3.6, but now I am h...

103
Votes
Published 25 Aug, 2022
Java - Unable to configure second level cache of hibernate-ehcache-4.3.5.Final.jar in Hibernate 5.1.0.Final

I'm trying to achieve second level cache in my Java EE project using Hibernate. My Hibernate version is 5.1.0.Final. I've created a table employee in my MySQL database. I've included hibernate-ehcache...

62
Votes
Published 07 Sep, 2022
Java - How to map a MySQL JSON column to a Java entity property using JPA and Hibernate

I have a MySQL column declared as type JSON and I have problems to map it with JPA/Hibernate. I'm using Spring Boot on back-end. Here is small part of my code: @Entity @Table(name = "some_table_n...

125
Votes
Published 30 Jun, 2022
Python - Problems using MySQL with AWS Lambda in Python

I am trying to get up and running with AWS Lambda Python (beginner in Python btw) but having some problems with including MySQL dependency. I am trying to follow the instructions here on my Mac. For...

11
Votes
Published 06 May, 2022
Python - Django : Table doesn't exist

I dropped some table related to an app. and again tried the syncdb command python manage.py syncdb It shows error like django.db.utils.ProgrammingError: (1146, "Table 'someapp.feed' doesn't exist...

69
Votes
Published 05 Sep, 2022
Java - MySQL to Hibernate datatype mapping for type "YEAR"

There's a column in our database which needs to be of type YEAR. What is the corresponding Hibernate mapping for the entity? Tried searching all over, but unable to find the details. I am not sure if...

33
Votes
Published 05 Sep, 2022
Java - @Transient not working properly in JPA

I have a problem using JPA and @Transient annotation. I'm working with Spring Boot and MySQL database. Have no idea how to get rid of this mapping error. It seems that JPA is trying to create database...

40
Votes
Published 05 Sep, 2022
Java - Hibernate persistent entity should have a primary key

I'm having the following Entity. I'm trying to replace the folliwing. (See image) but I'm getting the following error: Persistent Entity should have a primary key. (I'm new to hibernate) (Please com...

46
Votes
Published 05 Sep, 2022
Java - Java Hibernate Projections.sqlGroupProjection aliasing

I have a Criteria using Hibernate like this public class Student { private Integer id,discriminatorColumn,discriminatorValue; //other stuff omitted for brevity } This entity has a discrimi...

81
Votes
Published 04 Sep, 2022
Java - How to call MySQL function from Spring Data repositories

I need to call MySQL funtion() from a org.springframework.data.repository which will return a String. I am able to execute query using @Query annotation on top of my interface method declaration, but...

9
Votes
Published 01 May, 2022
Python - Python mysql does not commit

Having worked with other programming/scripting languages, I am completely baffled by Python's mysql interface (I am a bit new to Python) I am unable to commit my changes. I have stripped the code to t...