1. 创建用户 create user 'user_app'@'%' identified by '123456'; flush privileges; 2. 授予数据库权限 grant all privileges on my_db.* to 'user_app'@'%' with grant option; flush privileges;