Skip to content

avgra3/Myisam_to_Aria

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Converting Myisam Table to Aria Table

Python MariaDB

This repository is to convert all MariaDB tables in a specified database to Aria from Myisam

This python script is based on automating the SQL scripts located in sql_scripts. The obvious desire to automate this process was the motivation for the project

Lastly, the reason for doing this at all, is to convert tables in a MariaDB database to Aria and update all CHAR fields to VARCHAR. For changing the field data type, we needed to do this because as of version MariaDB: 10.6.9 there was a bug we were experiencing when changing the table type.

Enviornment File

When making the .env file, make sure it has the below format.

user = USER_NAME
password = PASSWORD
database = 'information_schema'
host = HOST_ADDRESS
port = PORT_NUMBER
database_to_alter = DATABASE_TO_ALTER

Creating .env File

From the root directory run the below in your command line, and then in the created file copy the above and fill in the neccessary data:

echo BLANK_ENVIORNMENT > python_scripts/.env22

Software Versions

  • Python: 3.9.12
  • MariaDB: 10.6.9

Anaconda packages install (Windows 10)

Replace ENV_NAME with the name you want for your enviornment and then run the below.

conda create -n ENV_NAME python=3.9
conda activate ENV_NAME
conda install -n ENV_NAME --file requirements.txt

About

Python script to Alter MariaDB databases

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages