step1.准备tool
1. MyEclipse +tomcat +MySql
step2.配置
遇到的问题:1.tomcat
参考链接:
if you lose this password ,please consult the section How to Reset the Root Password in the SQL reference manual.
mysql for mac
重置密码
you must reset your password using ALTER USER statement before executing this statement
//需要准备材料才行
1.PATH = “$PATH”:/usr/local/mysql/bin
heshuzhandeMacBook-Pro:~ heshuzhan$ mysql -u root -p
2.mysql> create database yan1;
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
mysql> SET PASSWORD = PASSWORD('123456');
Query OK, 0 rows affected (0.03 sec)
mysql> create database yan1;
Query OK, 1 row affected (0.00 sec)
step3 Google浏览器 输入www.localhost:8080/jason1/index.jsp
//step4支持iOS,web服务器的配置
一般我们在Mac上使用apache来搭建服务器。数据库采用mysql,在Mac中apache是自带的。所有,我们可以不需要额外的applestore下载
我们可以直接通过命令行形势来,开启服务器。
在终端开启apache的指令是:
sudo apachectl - k start //这里要特别说明是,必须以root的身份来启动服务器
//重启apachectl
sudo apachetl - k restatr
开启后,在safari中输入localhost。 html页面显示it work, 表明吃时apache服务器已经开启了。