参考官方文档1: https://help.aliyun.com/knowledge_detail/41817.html?spm=5176.11065259.1996646101.searchclickresult.6a9a1949V5OLDw
快速操作: https://blog.csdn.net/zdb330906531/article/details/77479784?locationNum=5&fps=1
一,关于配置文件,可以将如下内容加入到/etc/my.cnf (原datadir参数需要注释掉),然后通过默认路径启动.
innodb_data_file_path=ibdata1:200M:autoextend
innodb_log_files_in_group=2
innodb_undo_directory=.
innodb_undo_tablespaces=0
datadir=/opt/alidata
二,创建新账户(所有恢复操作已完成):
1,权限初始化:
delete from mysql.db where user<>'root' and char_length(user)>0;
delete from mysql.tables_priv where user<>'root' and char_length(user)>0;flush privileges;
2,创建开发只读账户(程序调用):
grant select on *.* to 'dev_read'@'%' identified by 'xxxxx';
3,创建开发读写改账户(临时维护):
grant all on history.* to 'dev_root'@'%' identified by 'xxxxx';