Python Forum
SQLAlchemy - Program Name in SQL Workbench
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SQLAlchemy - Program Name in SQL Workbench
#1
Very new to Python, but older that I'd care to admit to programming ;-)

So I have been working with SQLAlchemy for the past few days and all has been going well except for one little issue.. When I look at the client connections tab in the MySQL Workbench, the program name is: None.

Anyone know what I need to change so my program name appears in the list?

Thanks.
There is no passion to be found playing small - in settling for a life that is less than the one you are capable of living.
Reply
#2
There needs to be a tutorial on this forum about SqlAlchemy,
completely self contained that starts with data collection, creating a database model, and running a session to load the collected data into that database. You have inspired me to create one, it's started, and will be ready soon. I'll let you know when complete.
Reply
#3
I added a tutorial, but it's pretty basic, and won't answer your question.
To answer your question. It would be most helpful if you could post code (if still dealing with this issue)
See: https://python-forum.io/Thread-SqlAlchem...-Data-Load
Reply
#4
It is not a coding issue. As far as I can see it a feature deficit in SQLAlchemy. There just is no way to indicate to MySQL the name of program owning the connection. This becomes a support issue because the DBA has no way of knowing which of the users 5 or 6 connections is related to the user’s application. They all appear in the console with the name ‘None’.

Will eventually have to sit down and figure out a workaround, but for now I will park it. Thanks.
There is no passion to be found playing small - in settling for a life that is less than the one you are capable of living.
Reply
#5
You can use the database itself, by creating a user table and requiring user login for access to the database, Same as you would do for a web application. There's a complete procedure on how to do this in Miguel Grinberg's flask tutorial, which with a few changes can be adapted for both web access and non-web access.

Specifically chapters 4 and chapter 5. Would something like liks be sufficient?

SqlAlchemy suggests such a system here as well (I haven't read this entirely, but enough to see that it involves a user table as well).
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Using SQLAlchemy, prevent SQLite3 table update by multiple program instances Calab 3 701 Aug-09-2023, 05:51 PM
Last Post: Calab
  Mysql Workbench table not updated CatBall 2 1,045 Feb-13-2023, 05:37 PM
Last Post: CatBall
  mysql Workbench export script - how to skip version check.. AndreVerwijs 1 3,684 Jul-17-2017, 09:25 AM
Last Post: AndreVerwijs

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020