How to set up MySQL in IBM Worklight

血红的双手。 提交于 2019-12-06 07:29:17

You should go through the IBM Worklight Getting Started training materials to properly familiarize yourself with IBM Worklight.

The steps to make a Worklight project work in conjunction with MySQL are as follows.

The Database:

  1. Download and install MySQL (v5.1 or v5.5)
  2. Download the MySQL Connector/J driver and keep it at the side for now
  3. Download and install some software to interface with it. I recommend the Community edition of SQLYog.
  4. Using SQLyog, create a new Database "Worklight"
  5. Using SQLyog, create a new user "Worklight" (password "Worklight")

Worklight:

  1. Download Eclipse Java EE 4.2.2 ("Juno" SR2)
  2. Install Worklight Studio (the IBM Worklight Developer Edition Eclipse plug-in. You can search for it via Eclipse >> Help >> Marketplace >> "worklight")
  3. Create a new project
  4. In your project, place the Connector/J driver in yourProject\server\lib
  5. 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:

wl.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. :)

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!