Welcome to Centmin Mod Community
Register Now

MariaDB WHMCS installing

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by dooma, Nov 12, 2016.

  1. dooma

    dooma Active Member

    326
    34
    28
    Oct 15, 2016
    Cairo
    Ratings:
    +49
    Local Time:
    7:37 AM
    Hello,

    I'm trying to install my WHMCS but after entering my database info and my WHMCS admin info, I got this error :

    Code:
    Unable to complete incremental updates: Unable to import the 3.6.2 database file. Unable to import /home/nginx/domains/sub.domain.com/public/resources/sql/upgrade362.sql: SQLSTATE[42000]: Syntax error or access violation: 1142 INDEX command denied to user 'dbusername'@'localhost' for table 'tblaccounts'
    can anyone help me as WHMCS support didn't say anything useful ?


    Thanks
     
  2. eva2000

    eva2000 Administrator Staff Member

    55,237
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    3:37 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    how did you create the mysql database username for dbusername@localhost ? what privileges did you grant it ?

    did you use addons/mysqladmin_shell.sh mysqladmin_shell.sh Shell based Addon | Centmin Mod Community ?

    seems mysqladmin_shell.sh was missing INDEX privilege !

    you can manually add it via SSH command as root user type the following replace DATABASENAME = your db name and DBUSERNAME = your mysql username

    this command grants privileges including INDEX and flush privileges to them to take effect and then show grant shows the privileges
    Code (Text):
    mysql -e "GRANT index, select, insert, delete, update, create, drop, alter, create temporary tables, execute, lock tables ON DATABASENAME.* TO 'DBUSERNAME'@'localhost'; flush privileges; show grants for 'DBUSERNAME'@'localhost';"
    
     
  3. dooma

    dooma Active Member

    326
    34
    28
    Oct 15, 2016
    Cairo
    Ratings:
    +49
    Local Time:
    7:37 AM
    Thank you adding index privilege was missing. :)
     
  4. dooma

    dooma Active Member

    326
    34
    28
    Oct 15, 2016
    Cairo
    Ratings:
    +49
    Local Time:
    7:37 AM
    How can I install the cron updates to run every 5 mins for WHMCS ?!

    Thanks
     
  5. eva2000

    eva2000 Administrator Staff Member

    55,237
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    3:37 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  6. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    8:37 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    Is there an easy way to check if it is enabled or not?
     
  7. eva2000

    eva2000 Administrator Staff Member

    55,237
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    3:37 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    use show grants mysql command
     
  8. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    8:37 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    This is what i can see:

    Code:
    GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*12345678' WITH GRANT OPTION | GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
     
  9. eva2000

    eva2000 Administrator Staff Member

    55,237
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    3:37 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    you have all privileges granted
     
  10. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    8:37 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    but this seems to be for root and not for the created user....

    how can i check for the created user?
     
  11. eva2000

    eva2000 Administrator Staff Member

    55,237
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    3:37 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  12. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    8:37 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    Ok thanks :)
     
    Last edited: Nov 13, 2016
  13. dooma

    dooma Active Member

    326
    34
    28
    Oct 15, 2016
    Cairo
    Ratings:
    +49
    Local Time:
    7:37 AM
    I added my cron path to crontab -e file but still giving me message at my whmcs that NO CRON RECORDS
     
    Last edited: Nov 13, 2016
  14. dooma

    dooma Active Member

    326
    34
    28
    Oct 15, 2016
    Cairo
    Ratings:
    +49
    Local Time:
    7:37 AM
    The cron added to crontab -e sending me this message /bin/sh: php: command not found every 5 mins, cron added to the crontab -e

    Code:
    */5 * * * * php -q /home/nginx/domains**********
     
  15. eva2000

    eva2000 Administrator Staff Member

    55,237
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    3:37 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Use full path to php at /usr/local/bin/php instead of just php in cron job line
     
  16. dooma

    dooma Active Member

    326
    34
    28
    Oct 15, 2016
    Cairo
    Ratings:
    +49
    Local Time:
    7:37 AM
    Thanks it solved the issue and the message I'm getting contains : please invoke with the following arguments "all --force" so what's your opinion about adding this to the cron ?
     
  17. eva2000

    eva2000 Administrator Staff Member

    55,237
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    3:37 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    you'd have to ask whmcs support as i don't know what those argument related messages are related to