pymysql Questions

3

I want to use run below mysql script using with pymysql. START TRANSACTION; BEGIN; insert into ~~~ COMMIT; my python source code is connection = pymysql.connect(~~~~~~~) with connection.curs...
Sungkiang asked 11/7, 2016 at 1:59

6

Solved

I am trying to read data from MySQL query using pandas read_sql() method with python3+sqlalchemy+pymysql I tried to follow the following tutorials - https://pythondata.com/quick-tip-sqlalchemy-fo...
Ing asked 23/3, 2019 at 14:51

3

I'm new to Django. It wasted me whole afternoon to config the MySQL engine. I am very confused about the database engine and the database driver. Is the engine also the driver? All the tutorial sai...
Necrophilism asked 13/1, 2016 at 21:50

20

Solved

I'm trying to use PyMySQL on Ubuntu. I've installed pymysql using both pip and pip3 but every time I use import pymysql, it returns ImportError: No module named 'pymysql' I'm using Ubuntu 15.10 6...
Torrid asked 30/10, 2015 at 23:34

4

Solved

I have a Django project which is deployed to Elastic Beanstalk Amazon Linux 2 AMI. I installed PyMySQL for connecting to the db and i added these lines to settings.py such as below; import pymysql ...

6

Solved

I am doing a lot of inserts to a mysql table in a short period of time from python code (using pymysql) that uses a lot of different threads. Each thread, of which there are many, may or may not e...
Adenectomy asked 26/3, 2019 at 20:13

5

Solved

I am trying to connect to mysql database via pymysql. Everything works when I SSH into the database via terminal. So, that information is correct. However, when I put the same information in using ...
Lysin asked 8/7, 2018 at 21:7

4

Solved

The following is listed as example in pymysql: conn = pymysql.connect(...) with conn.cursor() as cursor: cursor.execute(...) ... conn.close() Can I use the following instead, or will this leav...
Drachm asked 3/7, 2015 at 22:2

1

I am currently using flask-login in my application for user login session management. I am using flask-sqlalchemy, so all working ok. Because of my previous sql experience, I am not fan of ORM. I l...
Elenaelenchus asked 18/2, 2019 at 15:0

3

I am using the AWS Console and trying to add data to a MySQL table using a Lambda function. Whenever I try to test the function, I get the following error: Unable to import module 'app' : no mo...
Akela asked 3/8, 2016 at 22:19

2

Solved

i am using pymysql to interact with an sql db, here is the code: query = "SELECT * FROM my_table" c = db.cursor(pymysql.cursors.DictCursor) c.execute(query) c.fetchall() now i am doing this ...
Pressing asked 22/8, 2018 at 23:58

1

How can I easily write my pandas dataframe to a MySQL database using mysql.connector? import mysql.connector as sql import pandas as pd db_connection = sql.connect(host='124685.eu-central-1.rds.a...
Amphiboly asked 20/6, 2022 at 9:34

3

Solved

I'm learning SQLAlchemy right now, but I've encountered an error that puzzles me. Yes, there are similar questions here on SO already, but none of them seem to be solved. My goal is to use the ORM ...
Kisumu asked 20/5, 2021 at 15:34

1

I'm trying to write to a MySQL database with Pandas (v1.3.4), SQLAlchemy (v1.4.26), and PyMySQL (v1.0.2). I can create a new table (called 'test_table') using the pandas to_sql method, but subseque...
Bistoury asked 10/11, 2021 at 0:37

3

I am a Discord bot developer, and recently completed an order. The client upon setting the application up on their server initially had no issues, but according to them after running for "about thr...
Sargassum asked 27/5, 2019 at 4:45

6

Solved

I'm not sure if this is possible, but I'm looking for a way to reconnect to mysql database when the connection is lost. All the connections are held in a gevent queue but that shouldn't matter I th...
Liquefacient asked 27/3, 2014 at 21:40

1

I am Testing out connection to mysql server with python. I need to ssh into the server and establish a mysql connection. The following code works: from sshtunnel import SSHTunnelForwarder import py...
Jackfish asked 4/1, 2021 at 15:21

4

I'm attempting to create a multiscript tool, that will take an argument of a .sql file and execute it. I've set up a simple test, just executing on one database, however the syntax is giving me is...
Swedenborgian asked 29/4, 2016 at 19:52

3

I'm trying to configure a mysql db with pymysql and Flask-sqlalchemy in a flask app. db = SQLAlchemy() app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://root:password@localhost:3306/ftm' db...
Scold asked 20/5, 2018 at 22:7

3

This is the Python code where I am establishing a database connection. But I am getting a type error in my code. What is the issue? import pymysql connnection = pymysql.connect("localhost&quo...
Analgesia asked 21/2, 2021 at 8:43

3

Solved

I am getting below error after importing pymysql in jupyter notebook. Please help me to find error. import pymysql print("Welcome") ModuleNotFoundError <ipython-input-5-7978bc79cc40...
Brigitta asked 18/7, 2020 at 12:13

1

Since some days I am having this error from time to time in my Flask Website [Sat Sep 14 00:04:31.016107 2019] [wsgi:error] [pid 4693:tid 140670017648384] [remote 66.249.66.44:60013] File "/var/ww...
Cumquat asked 14/9, 2019 at 3:21

3

I am currently trying to connect to my MySql database created on AWS with a python program using the library PyMySQL # !/usr/bin/env python # -*- coding: utf-8 -*- import pymysql host = 'admin.cjp...

3

Solved

I'm trying to store a mySQL query result in a pandas DataFrame using pymysql and am running into errors building the dataframe. Found a similar question here and here, but it looks like there are p...
Calendre asked 16/11, 2017 at 11:22

2

Solved

I'm trying to connect my database using SSL with PyMySQL, but I can't find good documentation on what the syntax is. These credentials work in Workbench and with the CLI, but I get this error when ...
Pigtail asked 31/12, 2018 at 17:20

© 2022 - 2024 — McMap. All rights reserved.