use mysql;-- 创建数据库CREATEDATABASE nacos_config;-- 创建用户createuser'nacos'@'localhost' identified by 'Zmzhou.V587';
-- 授权
grant select,insert,update,delete,create on `nacos_config`.* to 'nacos'@'localhost';
-- 或者赋所有权限 grant all privileges on `nacos_config`.* to 'nacos'@'localhost';
-- 查看一下用户列表
select host,user,authentication_string from mysql.user;
-- 刷新权限,立即启用修改
flush privileges;
-- 取消用户所有数据库(表)的所有权限
revoke all on nacos_config.* from 'nacos'@'localhost';
-- 删除用户
delete from mysql.user where user = 'nacos';-- 删除数据库dropdatabase nacos_config;
#*************** Config Module Related Configurations ***************#
### If use MySQL as datasource:
spring.datasource.platform=mysql
### Count of DB:
db.num=1
### Connect URL of DB:
db.url.0=jdbc:mysql://127.0.0.1:3306/nacos_config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=true&serverTimezone=GMT%2B8
db.user=nacos
db.password=Zmzhou.V587
单机模式下运行Nacos
Windows nacos/bin 目录下打开 CMD 执行 startup.cmd -m standalone