Android项目MySQL和Tomcat部署
一、连接MySQL数据库
1.启动MySQL绿色版

2.打开SQLyog

3.激活SQLyog

姓 名(Name):ttrar
序 列 号(Code):ccbfc13e-c31d-42ce-8939-3c7e63ed5417
4.新建MySQL数据库,设置用户名和密码

5.Ctrl+Shift+Q 执行SQL脚本 jiaoben.sql(任何SQL脚本)

二、部署Tomcat服务器
1.将wabao.war(任意war包)复制到Tomcat的webapps目录

2.进入Tomcat的bin目录

3.执行startup.bat启动Tomcat服务

4.测试Tomcat是否成功启动
在浏览器输入http://localhost:8080(本地IP地址:端口号)

5.测试API接口是否可用
在浏览器输入 http://localhost:8080/life/api/getMovieList(任意接口地址)


附:MyEclipse部署Tomcat服务器
1.导入项目到MyEclipse
File—Import—General—Existing Projects into Workspace—Next—Select Root Directory—Browser—Finish
2.添加Tomcat到MyEclipse
Window—Preferences—Myeclipse—Servers—Tomcat—Tomcat7.x—Enable—Browser—OK
3.部署项目到Tomcat
Deploy MyEclipse J2EE Project to Server...—Add—OK
4.启动Tomcat
Run/Stop/Restart MyEclipse Servers—Tomcat7.x—Start
网友评论