创建用户:
CREATE USER 'username'@'%' IDENTIFIED WITH mysql_native_password BY 'password';
创建数据库:
CREATE DATABASE databasename;
赋权:
grant all on databasename.* to 'username'@'%'; flush privileges;
数据库导入导出:
# 导出
cd /opt/mysql/bin ./mysqldump -uroot -p --single-transaction databasename> /app/software/databasename_20230308.sql
-- 导入 create `newdatabase`; use `newdatabase`; source /app/software/databasename_20230308.sql;
修改AUTO_INCREMENT初始值:
ALTER TABLE `tablename` AUTO_INCREMENT = 1;
标签:username,常用,INCREMENT,app,Mysql,databasename,mysql,操作,CREATE From: https://www.cnblogs.com/alanturinga/p/17197874.html