Skip to content

批量修改Mysql一个数据库中表、表字段的字符集

Notifications You must be signed in to change notification settings

NanmiCoder/mysql-character-update

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This project is designed to batch modify the character set of tables and table fields in a MySQL database. The project is written in Python and uses the aiomysql library for asynchronous database operations.

File Structure

  • config.py: Configuration file containing database connection settings.
  • main.py: Main program file containing the primary logic for character set modification.
  • async_db.py: Asynchronous database operation class, encapsulating common database operation methods.

Dependencies Installation

Before running the project, ensure the following dependencies are installed:

pip install aiomysql

Python version 3.7 or higher is required.

Usage

  1. Configure the database connection information in config.py.

  2. Execute the following command:

    python main.py

    The program will output the results of the character set modification operations.

    2024-07-29 03:03:27 INFO main.py:70 Table:xxx_table1_name start modify charset
    2024-07-29 03:03:27 INFO main.py:70 Table:xxx_table2_name start modify charset
    2024-07-29 03:03:27 INFO main.py:70 Table:xxx_table3_name start modify charset
    2024-07-29 03:03:27 INFO main.py:70 Table:xxx_table4_name start modify charset
    2024-07-29 03:03:27 INFO main.py:70 Table:xxx_table5_name start modify charset
    ...
    

About

批量修改Mysql一个数据库中表、表字段的字符集

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages