UTF8 character set

To provide better multilingual support, it is necessary to use the UTF8 character set.

Change MySQL to have UTF8 as its character set:

  • mysql > SET NAMES ‘utf8’;

Change the MySQL database to default to UTF8:

  • Edit file /etc/my.cnf

  • In the [client] section, add the following line:

    default-character-set=utf8

  • In the [mysqld] section, add the following line:

    character-set-server=utf8

Installing MySQL Workbench

MySQL Workbench provides an UI for executing SQL scripts which install the schema and initial data.

MySQL Workbench should be downloaded and installed following the instructions for the target OS.

Communities Connection

When the MySQL Workbench is first launched, unless already in use for other purposes, it will not yet show any connections:

mysqlconnection

New Connection Settings

  1. Select the + icon to the right of MySQL Connections.

  2. In the dialog Setup New Connection, enter values appropriate for your platform

    For demonstration purposes, with the author AEM instance and MySQL on the same server:

    • Connection Name: Communities
    • Connection Method: Standard (TCP/IP)
    • Hostname: 127.0.0.1
    • Username: root
    • Password: no password by default
    • Default Schema: leave blank
  3. Select Test Connection to verify the connection to the running MySQL service

Notes:

New Communities Connection

community-connection

Database Setup

Open the Communities connection to install the database.

install-database

Obtain the SQL Script

The SQL script is obtained from the AEM repository:

  1. Browse to CRXDE Lite

  2. Select the /libs/social/config/datastore/dsrp/schema folder

  3. Download init-schema.sql

    database-schema-crxde

One method for downloading the schema is to:

  • Select the jcr:content node for the sql file

  • Notice the value for the jcr:data property is a view link

  • Select the view link to save the data to a local file

Create the DSRP Database

Follow the steps below to install the database. The default name of the database is communities.

If the database name is changed in the script, be sure to also change it in the JDBC config.

Step 1: open SQL file

In the MySQL Workbench

  • From the File pulldown menu, select the Open SQL Script option
  • Select the downloaded init_schema.sql script

select-sql-script