1、mysql time zone时区的错误
cmd下输入如下命令进行操作:
//登录
mysql -u root -p
//查看mysql系统时间。和当前时间做对比
select now();
//查看系统时区
show variables like '%time_zone%';
// 设置时区,更改为东八区
set global time_zone = '+8:00';
// 刷新权限
flush privileges;
2\centox 安装mysql57
https://blog.csdn.net/qq_36582604/article/details/80526287
操作补充:代码留着临时查询用
//java环境配置 jdk1.8.0_221
## JAVA
JAVA_HOME=/usr/local/jdk1.8.0_221
JRE_HOME=/usr/local/jdk1.8.0_221/jre
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
export JAVA_HOME JRE_HOME PATH CLASSPATH
//后台启动jar 项目 sprintboot 生成的jar (IDEA->MAVEN->Lifecyde->package)
nohup java -jar shareniu.jar &
ALTER USER 'root'@'localhost' IDENTIFIED BY '密码';
//MYSQL开启远程访问
grant all privileges on *.* to 'root'@'%' identified by '密码' with grant option;
//刷新mysql
flush privileges;
//设置防火墙端口centox 7
firewall-cmd --zone=public --add-port=3306/tcp --permanent
firewall-cmd --zone=public --add-port=8080/tcp --permanent
//载入
firewall-cmd --reload
网友评论