Flask-AppBuilder
安裝 MySQL 伺服器
- 安裝:
sudo apt install mysql-server - 初始設定:
- Would you like to setup VALIDATE PASSWORD component?
Y -
There are three levels of password validation policy:
LOW Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary filePlease enter 0 = LOW, 1 = MEDIUM and 2 = STRONG:
2 - Skipping password set for root as authentication with auth_socket is used by default.
If you would like to use password authentication instead, this can be done with the “ALTER_USER” command.
See https://dev.mysql.com/doc/refman/8.0/en/alter-user.html#alter-user-password-management for more information. - Remove anonymous users? (Press y|Y for Yes, any other key for No) :
Y -
Normally, root should only be allowed to connect from
‘localhost’. This ensures that someone cannot guess at
the root password from the network.Disallow root login remotely? (Press y|Y for Yes, any other key for No) :
Y - Remove test database and access to it? (Press y|Y for Yes, any other key for No) :
Y - Reload privilege tables now? (Press y|Y for Yes, any other key for No) :
Y
- Would you like to setup VALIDATE PASSWORD component?
- 設定密碼
- 執行 MySQL:
sudo mysql - 設定密碼:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '{NEW_PASSWORD}';
FLUSH PRIVILEGES; - 離開 MySQL:
quit - 再次進入 MySQL 確認密碼是否設定成功:
mysql -u root -p
- 執行 MySQL:
Flask-SQLAlchemy
sudo pip install Flask-SQLAlchemy pymysql
Flask-AppBuilder
sudo pip install Flask-AppBuilder
Last Updated on 2025/12/11 by A1go