I just have learned about IBM Worklight, and I was wondering of how to set up and configure MySQL database. I've set Worklight Adapter, but, I have no clue of how to make database with MySQL.
我刚学会了IBM Worklight,我想知道如何设置和配置MySQL数据库。我已经设置了Worklight Adapter,但是,我不知道如何使用MySQL创建数据库。
1 个解决方案
#1
2
You should go through the IBM Worklight Getting Started training materials to properly familiarize yourself with IBM Worklight.
您应该阅读IBM Worklight入门培训材料,以正确熟悉IBM Worklight。
The steps to make a Worklight project work in conjunction with MySQL are as follows.
使Worklight项目与MySQL一起工作的步骤如下。
The Database:
- Download and install MySQL (v5.1 or v5.5)
- Download the MySQL Connector/J driver and keep it at the side for now
- Download and install some software to interface with it. I recommend the Community edition of SQLYog.
- Using SQLyog, create a new Database "Worklight"
- Using SQLyog, create a new user "Worklight" (password "Worklight")
下载并安装MySQL(v5.1或v5.5)
下载MySQL Connector / J驱动程序,暂时保留在侧面
下载并安装一些软件以与其连接。我推荐SQLYog的社区版。
使用SQLyog,创建一个新的数据库“Worklight”
使用SQLyog,创建一个新用户“Worklight”(密码“Worklight”)
Worklight:
- Download Eclipse Java EE 4.2.2 ("Juno" SR2)
- Install Worklight Studio (the IBM Worklight Developer Edition Eclipse plug-in. You can search for it via Eclipse >> Help >> Marketplace >> "worklight")
- Create a new project
- In your project, place the Connector/J driver in yourProject\server\lib
- In your project, open the worklight.properties file located at yourProject\server\conf and search for "mysql". Uncomment the following properties. Also edit them with the database, username and password values from above:
下载Eclipse Java EE 4.2.2(“Juno”SR2)
安装Worklight Studio(IBM Worklight Developer Edition Eclipse插件。您可以通过Eclipse >> Help >> Marketplace >>“worklight”进行搜索。
创建一个新项目
在项目中,将Connector / J驱动程序放在Project \ server \ lib中
在项目中,打开位于yourProject \ server \ conf的worklight.properties文件,然后搜索“mysql”。取消注释以下属性。还可以使用上面的数据库,用户名和密码值编辑它们:
wl.db.type=MYSQL
wl.db.url=jdbc:mysql://localhost:3306/Worklight
wl.db.username=Worklight
wl.db.password=Worklightwl.db.type = MYSQL wl.db.url = jdbc:mysql:// localhost:3306 / Worklight wl.db.username = Worklight wl.db.password = Worklight
If you now right-click the projcet and choose "Start Worklight Server", the server should launch successfully; if not, you did something wrong. :)
如果您现在右键单击该项目并选择“启动Worklight Server”,则服务器应该成功启动;如果没有,你做错了什么。 :)
If the above works for you, you can now follow the MySQL adapter training module - follow the steps, and make sure to also configure the adapter XML with the database properties as requested in page 8.
如果上述方法适合您,您现在可以按照MySQL适配器培训模块执行 - 按照步骤操作,并确保还使用第8页中的请求配置适配器XML和数据库属性。
#1
2
You should go through the IBM Worklight Getting Started training materials to properly familiarize yourself with IBM Worklight.
您应该阅读IBM Worklight入门培训材料,以正确熟悉IBM Worklight。
The steps to make a Worklight project work in conjunction with MySQL are as follows.
使Worklight项目与MySQL一起工作的步骤如下。
The Database:
- Download and install MySQL (v5.1 or v5.5)
- Download the MySQL Connector/J driver and keep it at the side for now
- Download and install some software to interface with it. I recommend the Community edition of SQLYog.
- Using SQLyog, create a new Database "Worklight"
- Using SQLyog, create a new user "Worklight" (password "Worklight")
下载并安装MySQL(v5.1或v5.5)
下载MySQL Connector / J驱动程序,暂时保留在侧面
下载并安装一些软件以与其连接。我推荐SQLYog的社区版。
使用SQLyog,创建一个新的数据库“Worklight”
使用SQLyog,创建一个新用户“Worklight”(密码“Worklight”)
Worklight:
- Download Eclipse Java EE 4.2.2 ("Juno" SR2)
- Install Worklight Studio (the IBM Worklight Developer Edition Eclipse plug-in. You can search for it via Eclipse >> Help >> Marketplace >> "worklight")
- Create a new project
- In your project, place the Connector/J driver in yourProject\server\lib
- In your project, open the worklight.properties file located at yourProject\server\conf and search for "mysql". Uncomment the following properties. Also edit them with the database, username and password values from above:
下载Eclipse Java EE 4.2.2(“Juno”SR2)
安装Worklight Studio(IBM Worklight Developer Edition Eclipse插件。您可以通过Eclipse >> Help >> Marketplace >>“worklight”进行搜索。
创建一个新项目
在项目中,将Connector / J驱动程序放在Project \ server \ lib中
在项目中,打开位于yourProject \ server \ conf的worklight.properties文件,然后搜索“mysql”。取消注释以下属性。还可以使用上面的数据库,用户名和密码值编辑它们:
wl.db.type=MYSQL
wl.db.url=jdbc:mysql://localhost:3306/Worklight
wl.db.username=Worklight
wl.db.password=Worklightwl.db.type = MYSQL wl.db.url = jdbc:mysql:// localhost:3306 / Worklight wl.db.username = Worklight wl.db.password = Worklight
If you now right-click the projcet and choose "Start Worklight Server", the server should launch successfully; if not, you did something wrong. :)
如果您现在右键单击该项目并选择“启动Worklight Server”,则服务器应该成功启动;如果没有,你做错了什么。 :)
If the above works for you, you can now follow the MySQL adapter training module - follow the steps, and make sure to also configure the adapter XML with the database properties as requested in page 8.
如果上述方法适合您,您现在可以按照MySQL适配器培训模块执行 - 按照步骤操作,并确保还使用第8页中的请求配置适配器XML和数据库属性。