Layer7 API Management

  • 1.  Gateway DB Audit Purge

    Posted May 04, 2019 08:47 AM

    Hi Community,

     

    We tried to do audit database purge by using audit_purge.sh script. Have updated script with all valid details such as 

    DB="ssg"
    DBHOST="xxxxx1111.xx.xx.xxxxx.xx"
    DBUSER="gateway"
    DBPWD="Password"

     

    Though facing below error when executing script.

    ==> Error querying database

    Message: mysql: [Warning] Using a password on the command line interface can be insecure.
    ERROR 1045 (28000): Access denied for user 'gateway'@'xxxxx1111.xx.xx.xxxxx.xx' (using password: YES)

    Refer to http://dev.mysql.com/doc/refman/5.1/en/error-messages-client.html
    for more information.

     

    Kindly help us here to resolve this issue.

     

    Regards,

    Radha



  • 2.  Re: Gateway DB Audit Purge

    Posted May 05, 2019 02:08 PM

    This error is usually related to user source hostname creation on MySQL.

     

    for the command below, for example, the some_user will be accepted only from LOCALHOST hostname

    GRANT ALL PRIVILEGES ON ssg.* TO 'some_user'@'localhost' IDENTIFIED BY 'password';

     

    In your case, you must create the user for the permission with the allowed hostname

    GRANT ALL PRIVILEGES ON ssg.* TO 'gateway'@'xxxxx1111.xx.xx.xxxxx.xx' IDENTIFIED BY 'Password';

     

    Even then, sometimes due name resolution issues, you may have create with the allowed IP address

    GRANT ALL PRIVILEGES ON ssg.* TO 'gateway'@'***.***.***.***' IDENTIFIED BY 'Password';  

     

    If you want to allow connection from any host (NOT RECOMMENDED) you can use the value %  as allowed hostname

    GRANT ALL PRIVILEGES ON ssg.* TO 'gateway'@'%' IDENTIFIED BY 'Password';  



  • 3.  Re: Gateway DB Audit Purge

    Posted May 14, 2019 05:58 PM

    Hi,

     

    I set mention PRIVILEGES  for gateway user ,tried to connect database with following command and able to connect.

     

     

     

    [root@xxxx]# mysql -ugateway -p -h ***.xx.xx.xxxxx.xx
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 1710709
    Server version: 5.7.24-log MySQL Community Server (GPL)

    Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.

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

    mysql>

     

     

    Still getting below exception when executed audit purge script,

     

    [root@xxxxxxxx]# ./audit_purge.sh

    ==> Error querying database

    Message: mysql: [Warning] Using a password on the command line interface can be insecure.
    ERROR 1045 (28000): Access denied for user 'gateway'@'******.xx.xx.xxxx.xx' (using password: YES)

    Refer to http://dev.mysql.com/doc/refman/5.1/en/error-messages-client.html
    for more information.

     

    Kindly do needful.

     

    Regards,

    Radha