Keep database connection on connecting to MySQL/MariaDB using SQLAlchemy

Python 3

You want the database connection will be keep on connect to MySQL/MariaDB, just use pool_recycle parameter in method create_engine().
Example:
create_engine(db_url, pool_recycle=1)

pool_recycle

this setting causes the pool to recycle connections after the given number of seconds has passed. It defaults to -1, or no timeout. For example, setting to 3600 means connections will be recycled after one hour. Note that MySQL in particular will disconnect automatically if no activity is detected on a connection for eight hours (although this is configurable with the MySQLDB connection itself and the server configuration as well).

End.

How to do when Oracle Vendor Code 28001

Oracle

Open SQL Developer and perform the following steps:

Right click on Connections > New Connection.

Connection Name: sys
Username: sys as sysdba
Password: sys (or your sys password)
Hostname: your database server IP
Port: 1521
SID: your sid

Click connect.

Expand Other Users, and choose the user with the expired password. Right click on the user and choose Edit User, enter the new password and confirm it.

If you want your password to never expire again uncheck Password expired (User must change next login).

If you want password never expired, execute following command:

ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

Source: http://stackoverflow.com/questions/16870466/change-password-in-sql-developer-after-ora-28001-the-password-has-expired

%d bloggers like this: