You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/09/12 19:14:04 UTC

[GitHub] [cloudstack] whitetiger264 opened a new issue, #6734: ERROR 1045 (28000): Access denied for user

whitetiger264 opened a new issue, #6734:
URL: https://github.com/apache/cloudstack/issues/6734

   Hello
   
   I have installed a new CloudStack instance on a clean AlmaLinux 8 server. I have followed the documentation thoroughly and my instance is currently running, partially:
   
   ```
   root@hostname /etc/cloudstack/management $ systemctl status cloudstack-management
   ● cloudstack-management.service - CloudStack Management Server
      Loaded: loaded (/usr/lib/systemd/system/cloudstack-management.service; enabled; vendor preset: disabled)
      Active: active (running) since Mon 2022-09-12 20:35:22 SAST; 2min 51s ago
    Main PID: 3809 (java)
       Tasks: 41 (limit: 409574)
      Memory: 771.9M
      CGroup: /system.slice/cloudstack-management.service
              └─3809 /usr/bin/java -Djava.security.properties=/etc/cloudstack/management/java.security.ciphers -Djava.awt.headless=true -Dcom.sun.management.jmxremote=false -Xmx2G -XX:+UseParallelGC -XX:MaxGCPause>
   ```
   
   The problem, however, it does not want to connect to the database:
   
   `Sep 12 20:35:32 hostname java[3809]: Caused by: com.mysql.cj.exceptions.CJException: Access denied for user 'cloud'@'localhost' (using password: YES)`
   
   When running:
   
   `cloudstack-setup-databases cloud:PASSWORD@localhost --schema-only` I get the following:
   
   ```
   Mysql user name:cloud                                                           [ OK ]
   Mysql user password:******                                                      [ OK ]
   Mysql server ip:localhost                                                       [ OK ]
   Mysql server port:3306                                                          [ OK ]
   Checking Cloud database files ...                                               [ OK ]
   Checking local machine hostname ...                                             [ OK ]
   Checking SELinux setup ...                                                      [ OK ]
   Detected local IP address as SERVER IP, will use as cluster management server node IP[ OK ]
   Preparing /etc/cloudstack/management/db.properties                              [ OK ]
   Applying /usr/share/cloudstack-management/setup/create-schema.sql               
   
   We apologize for below error:
   ***************************************************************
   Encountering an error when executing mysql script
   ----------------------------------------------------------------------
   table:
   /usr/share/cloudstack-management/setup/create-schema.sql
   
   Error:
   b"mysql: [Warning] Using a password on the command line interface can be insecure.\nERROR 1045 (28000): Access denied for user 'cloud'@'localhost' (using password: YES)\n"
   
   Sql parameters:
   {'user': 'cloud', 'passwd': 'J!g5byjT7', 'port': 3306, 'host': 'localhost'}
   ```
   
   I found the exact same error reported [here](https://users.cloudstack.apache.narkive.com/CEpC88un/mysql-setup-database-error-1044-access-denied-for-user-root#post9), sadly, the solutions provided here does not work.
   
   Can anyone assist with this, please?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] whitetiger264 closed issue #6734: ERROR 1045 (28000): Access denied for user

Posted by GitBox <gi...@apache.org>.
whitetiger264 closed issue #6734: ERROR 1045 (28000): Access denied for user
URL: https://github.com/apache/cloudstack/issues/6734


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] boring-cyborg[bot] commented on issue #6734: ERROR 1045 (28000): Access denied for user

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #6734:
URL: https://github.com/apache/cloudstack/issues/6734#issuecomment-1244198248

   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] whitetiger264 commented on issue #6734: ERROR 1045 (28000): Access denied for user

Posted by GitBox <gi...@apache.org>.
whitetiger264 commented on issue #6734:
URL: https://github.com/apache/cloudstack/issues/6734#issuecomment-1245010649

   I am an idiot. 
   
   I ended up dropping all cloud users and databases and re-ran the command. I had to change
   
   `cloudstack-setup-databases cloud:PASSWORD@localhost --deploy-as=root:PASSWORD`
   
   To
   
   `cloudstack-setup-databases cloud:PASSWORD@localhost --deploy-as=root:`PASSWORD``
   
   And it worked.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] hooklee2000 commented on issue #6734: ERROR 1045 (28000): Access denied for user

Posted by GitBox <gi...@apache.org>.
hooklee2000 commented on issue #6734:
URL: https://github.com/apache/cloudstack/issues/6734#issuecomment-1244687181

   In short, “sql error 1045 sqlstate 28000” may occur due to insufficient database privileges, wrong username or password.
   Check your mysql has cloud user and  cloud database with root user.
   see https://bobcares.com/blog/sql-error-1045-sqlstate-28000/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org