如何启用MySQL模式
将数据库参数文件postgresql.conf进行设置
1)database_compat_mode设置为‘mysql’
database_compat_mode = ‘mysql’
2)为了使用Halo-MySQL服务,该项配置的值必须设置为true
second_listener_on=true
3)指定Halo-MySQL服务的监听端口。建议设置为3306。
second_port = *
4)重启数据库
pg_ctl restart
重新登录psql
5)新建MySQL本地用户(halo1), 无需密码登录
创建用户、密码、test数据库:
psql
set password_encryption='mysql_native_password';
create user halo1 with password 'halo1';
create database test;