Dear  Minsang,

*You are  right, I have  the same  error, mariadb has  no password  to
connect.*
*Thanks  for  your  help. I have set the password for  root  user of
so-mariadb. I could  connect  successfully  as  seen  in the  below.*

*root@mariadb:/# mysql -u root -ppassword*
*Welcome to the MariaDB monitor.  Commands end with ; or \g.*
*Your MariaDB connection id is 55985*
*Server version: 10.1.11-MariaDB-1~jessie-log mariadb.org
<http://mariadb.org> binary distribution*

*Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.*

*Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.*

*Later  I  tried to execute the  scripts  that  you have  indicated.*

*In the first script  01-create-camundabpmn.sh,  it  return an  error  for
the  command  "CREATE USER failed for 'camundauser'".*

*root@mariadb:/docker-entrypoint-initdb.d# cat 01-create-camundabpmn.sh*

*root@mariadb:/# cd docker-entrypoint-initdb.d*

*root@mariadb:/docker-entrypoint-initdb.d# mysql -uroot
-p$MYSQL_ROOT_PASSWORD << 'EOF' || exit 1*
*> DROP DATABASE IF EXISTS `camundabpmn`;*
*> CREATE DATABASE `camundabpmn`;*
*> DELETE FROM mysql.user WHERE User='camundauser';*
*> CREATE USER 'camundauser';*
*> GRANT ALL on camundabpmn.* to 'camundauser' identified by 'camunda123'
with GRANT OPTION;*
*> FLUSH PRIVILEGES;*
*> EOF*
*ERROR 1396 (HY000) at line 4: Operation CREATE USER failed for
'camundauser'@'%'*
*exit*
*command terminated with exit code 1*


On Fri, Jan 4, 2019 at 6:55 PM <[email protected]> wrote:

> Hello,
>
> We had the same issue and figured out this is because mariadb is not
> initialized properly. Mariadb is not installed as secure mode so it denied
> accessing with the password. The problem is mariadb script access to
> mysql using password so database could not be initialized properly.
> If you cannot access to mysql with below command and see the same error
> message, it will be the same issue.
>        [root@mariadb]mysql -u root -ppassword
>        ERROR 1045 (28000): Access denied for user 'root'@'localhost'
> (using password: YES)
>
>
> Try to run below command and set the password for 'root' user. (Password:
> 'password')
>
> [root@mariadb] mysql_secure_installation
>
> nter password for user root:
>
> The existing password for the user account root has expired. Please set a new 
> password.
>
> New password: password
>
> Re-enter new password: password
>
> Estimated strength of the password: 100
> Do you wish to continue with the password provided?(Press y|Y for Yes, any 
> other key for No) : Y
> By default, a MySQL installation has an anonymous user,
> allowing anyone to log into MySQL without having to have
> a user account created for them. This is intended only for
> testing, and to make the installation go a bit smoother.
> You should remove them before moving into a production
> environment.
>
> Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y
> Success.
>
>
> Normally, root should only be allowed to connect from
> 'localhost'. This ensures that someone cannot guess at
> the root password from the network.
>
> Disallow root login remotely? (Press y|Y for Yes, any other key for No) : N
> Success.
>
> By default, MySQL comes with a database named 'test' that
> anyone can access. This is also intended only for testing,
> and should be removed before moving into a production
> environment.
>
>
> Remove test database and access to it? (Press y|Y for Yes, any other key for 
> No) : Y
>  - Dropping test database...
> Success.
>
>  - Removing privileges on test database...
> Success.
>
> Reloading the privilege tables will ensure that all changes
> made so far will take effect immediately.
>
> Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y
> Success.
>
>
> All done!
>
> If you can login with the password with below command, you can initialize
> the DB by running the scripts.
>
> Test mysql secure login setting.
>     [root@mariadb] mysql -u root -ppassword
>
> Run Scripts
>     [root@mariadb] cd docker-entrypoint-initdb.d
>     [root@mariadb:/docker-entrypoint-initdb.d] ./01-create-camundabpmn.sh
>     [root@mariadb:/docker-entrypoint-initdb.d] ./02-create-requestdb.sh
>     [root@mariadb:/docker-entrypoint-initdb.d] ./03-create-catalogdb.sh
>     [root@mariadb:/docker-entrypoint-initdb.d] ./04-create-so-user.sh
>     [root@mariadb:/docker-entrypoint-initdb.d] ./05-create-so-admin.sh
>
>
>
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14805): https://lists.onap.org/g/onap-discuss/message/14805
Mute This Topic: https://lists.onap.org/mt/28873133/21656
Mute #so: https://lists.onap.org/mk?hashtag=so&subid=2740164
Mute #casablanca: https://lists.onap.org/mk?hashtag=casablanca&subid=2740164
Group Owner: [email protected]
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to