#修改表的编码
alter table t_course convert to character set utf8
show create table t_course
启动docker:
service docker start
docker创建redis设置密码:
docker pull redis
docker run --name my-redis -p 6379:6379 -e REDIS_PASSWORD=<password> -d redis
docker创建mysql设置密码:
docker pull mysql
docker run --name my-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=<password> -d mysql
# 进入mysql创建新用户
mysql -h 127.0.0.1 -P 3306 -u root -p
CREATE USER '新用户名字'@'%' IDENTIFIED BY '<password>';
GRANT ALL PRIVILEGES ON *.* TO '新用户名字'@'%';
FLUSH PRIVILEGES;
重启nginx:
# nginx 目录下 sbin
./nginx -s reload
# ps -ef | grep nginx
后台运行项目:
nohup java -jar ph-0.0.1-SNAPSHOT.jar >log.out 2>&1 &