Mariadb for remote access

The default service is bind to localhost:3306 to allow remote client to access to the mariadb, modify this file: /etc/mysql/mariadb.conf.d/50-server.cnf, comment the bind-address and add the two new lines as shown below: Then restart the mariadb service: sudo systemctl restart mariadb

[python]Create table with SQLAlchemy

I am using the raw module of SQLAlchemy, and not the Flask's version of SQLAlchemy, Flask's version is easier to use than the original as more abstraction has been implemented by Flask. This post is to record how tables can be created. Requirements.txt These python libraries are necessary, for this example I am using Mariadb … Continue reading [python]Create table with SQLAlchemy

[python]SQLAlchemy create mysql table

On previous post, SQlite3 was created using SQLAlchemy, to change from SQLite to MySQL, you need to download pymysql module then change the URI from sqlite:///objects.db to mysql+pysql://[username]:[password]@[ip address of the mysql server]/[database name] example if username is cyruslab and password is mypassword and ip address of mysql is and database name is firewall_objects … Continue reading [python]SQLAlchemy create mysql table