Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ The following sections describe how to set up a IBM DB2 database to replace the

Follow the instructions below to set up a IBM DB2 database:

!!! important "Character Set and Collation"
IBM DB2 uses **UTF-8 encoding** and **case-sensitive comparison** by default. It is **required** to maintain your DB2 database with case-sensitive comparison to preserve product behaviors.

1. Create the database using the following command:
```sh
$ db2 CREATE DATABASE <DATABASE_NAME>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,29 @@ Follow the instructions below to set up a MySQL database:

1. When prompted, specify the password that will be used to access the databases with the username you specified.

1. In the MySQL command prompt, create the database.
1. In the MySQL command prompt, create the database using a **case-sensitive collation**.

``` java
create database <DATABASE_NAME>;
```sql
CREATE DATABASE <DATABASE_NAME> CHARACTER SET latin1 COLLATE latin1_bin;
```

!!! warning
When creating the database related to apim_db with MySQL 8.0, add **character set latin1** to avoid the MySQL Linux ERROR 1071 (42000).
```sql
CREATE DATABASE <APIM_DATABASE_NAME> CHARACTER SET latin1 COLLATE latin1_bin;
```

!!! info
Character Sets and Collations in MySQL
!!! info "Character Set in MySQL"

- For users of Microsoft Windows, when creating the database in MySQL, it is important to specify the character set as latin1. Failure to do this may result in an error (error code: 1709) when starting your cluster. This error occurs in certain versions of MySQL (5.6.x) and is related to the UTF-8 encoding. MySQL originally used the latin1 character set by default, which stored characters in a 2-byte sequence. However, in recent versions, MySQL defaults to UTF-8 to be friendlier to international users. Hence, you must use latin1 as the character set as indicated below in the database creation commands to avoid this problem. Note that this may result in issues with non-latin characters (like Hebrew, Japanese, etc.). The following is how your database creation command should look.
```sh
create database <DATABASE_NAME> character set latin1;
CREATE DATABASE <DATABASE_NAME> CHARACTER SET latin1 COLLATE latin1_bin;
```

- If you are using MySQL to configure your datasource, we recommend that you use a case sensitive database collation. For more information, see the [MySQL Official Manual](https://dev.mysql.com/doc/refman/5.7/en/charset-mysql.html). The default database collation, which is `latin1_swedish_ci`, is case insensitive. However, you need to maintain case sensitivity for database collation, because when the database or table has a case-insensitive collation in MySQL 5.6 or 5.7, if a user creates an API with letters using mixed case, deletes the API, and then creates another API with the same name, but in lower case letters, then the later created API loses its permission information because when deleting the API, it keeps the Registry collection left behind.

- This issue could be avoided if you use a case sensitive collation for database and tables. In that case, when creating the second API (which has the same name, but is entirely in lowercase letters), it will create a new record with the lowercase name in the `UM_PERMISSION` table.
!!! important "Case-Sensitive Collation Requirement"
WSO2 API Manager **requires** a case-sensitive database collation. The default collation in MySQL is **case insensitive** and **must not** be used. Using a case-insensitive collation can lead to data integrity issues.

For **fresh setups**, it is mandatory to use a **case-sensitive collation** such as `latin1_bin`.


1. Provide authorization to the user that you use to access the databases.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ Oracle Real Application Clusters (RAC) is an option that facilitates clustering

Follow the instructions below to set up an Oracle RAC database:

!!! important "Case Sensitivity"
Oracle RAC databases use **case-sensitive comparison** by default. It is **required** to maintain your Oracle RAC database with case-sensitive comparison to preserve product behaviors.

1. As SYSDBA, create a database user and grant privileges to the user as shown below:

```sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ The following sections describe how to set up Oracle database to replace the def

Follow the instructions below to set up an Oracle database.

!!! important "Case Sensitivity"
Oracle databases use **case-sensitive comparison** by default. It is **required** to maintain your Oracle database with case-sensitive comparison to preserve product behaviors.

1. As SYSDBA, create a database user and grant privileges to the user as shown below:

```sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ The following sections describe how to set up PostgreSQL database to replace the

Follow the instructions below to set up the PostgreSQL database and users.

!!! important "Case Sensitivity"
PostgreSQL databases use **case-sensitive comparison** by default. It is **required** to maintain your PostgreSQL database with case-sensitive comparison to preserve product behaviors.

1. Login to PostgreSQL using a client (e.g. `psql`). Enter the following command in a command prompt, where `USER_NAME` is the username that you will use to access the databases and `POSTGRE_HOST_IP` is the IP of the host of PostgreSQL server.

```sh
Expand Down