软件测试实验1——配置环境
1 sql文件连接
步骤:打开数据库(cmd: net start mysql)——>打开.sql文件 ——> 配置connection ——> 选择数据库——>执行文件
报错1:数据库时区不匹配
解决1:进入mysql命令行,输入
set global time_zone = '+8:00'; ##修改mysql全局时区为北京时间,即我们所在的东8区 set time_zone = '+8:00'; ##修改当前会话时区 flush privileges; ##立即生效
报错2:mysql启动错误
解决2.0:尝试输入mysql -u root -p,可能已经运行数据库,但不是mysql
解决2.1:进程占用端口3306导致
- 命令行 netstat -aon|findstr 3306
- 命令行 taskkill /pid 5040 -f
报错3: Access denied for user 'root'@'localhost' (using password: YES)
解决3:找到临时密码,进入后重设密码
- 打开文件 ./data/DEEP-1805232026.err
- 找到语句 2021-03-12T07:18:15.428139Z 1 [Note] A temporary password is generated for root@localhost: 5YcNJnrTIB&, 密码复制到行末,鼠标右键粘贴
- mysql> set password=password("youpassword");
- mysql> flush privileges;
- mysql> quit
- 修改成功后重启mysql
2 pom.xml文件配置maven环境
步骤:右键 add as maven project ——> 出现 maven 框 ——> 双击 package(下载jar包)——>手动从官网下载未下载的 jar 包 ——> 双击 deploy
报错1:Could not find artifact org.springframework.boot:spring-boot-maven-plugin
解决1:https://repo.maven.apache.org/maven2/ 搜索jar文件
报错2:Unable to proxy method
解决2:从最小父目录创建项目
3 tomcat配置
步骤1:打开tomcat安装路径 ——> 进入 bin 文件 ——> 运行 Tomcat8.5.61w.exe——> start
步骤2:下载smart tomcat插件 ——> run/Debug Configurations ——> 自动配置或者手动设置