As part of Portal implementation, a privileged user needs to be created on the target external MySQL server. If the database requires DB user's password to comply complexity standards, special characters are used in the password.
This may cause a problem during Portal deployment, where a connection to the external database fails.
Reviewing portal_db-upgrade service logs, may show the following error:
[email protected]compute.internal | at liquibase.integration.commandline.Main.main(Main.java:103)
[email protected]compute.internal | Caused by: liquibase.exception.DatabaseException: java.sql.SQLException: Access denied for user 'devportal'@'192.168.90.101' (using password: YES)
[email protected]compute.internal | at liquibase.database.DatabaseFactory.openConnection(DatabaseFactory.java:247)
[email protected]compute.internal | at liquibase.database.DatabaseFactory.openDatabase(DatabaseFactory.java:151)
[email protected]compute.internal | at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:85)
[email protected]compute.internal | ... 3 more
API Developer Portal 5.x/MySQL 5.x/8.x
Although MySQL has no problem with special character to be used in user's password ( for e.g. \.[]{}()<>*+-=!?^$| ), the underlying Java/Portal installation scripts will require those characters to be escaped (\) , otherwise the password will be truncated right before the special character is located.
Edit <portal path>/conf/portal.conf file and escape (\) special characters in the line PORTAL_DATABASE_PASSWORD=<value>
Example:
From
PORTAL_DATABASE_TYPE=mysql
PORTAL_DATABASE_HOST=database.mycompany.com
PORTAL_DATABASE_PORT=3306
PORTAL_DATABASE_USERNAME=devportal
PORTAL_DATABASE_PASSWORD=Test123Oz$u*L
To
PORTAL_DATABASE_TYPE=mysql
PORTAL_DATABASE_HOST=database.mycompany.com
PORTAL_DATABASE_PORT=3306
PORTAL_DATABASE_USERNAME=devportal
PORTAL_DATABASE_PASSWORD=Test123Oz\$u*L