Welcome to Centmin Mod Community
Become a Member

MariaDB WHMCS installing

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

  1. dooma

    dooma Member

    226
    22
    18
    Oct 15, 2016
    Cairo
    Ratings:
    +27
    Local Time:
    7:07 PM
    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

    30,177
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    3:07 AM
    Nginx 1.13.x
    MariaDB 5.5
    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 Member

    226
    22
    18
    Oct 15, 2016
    Cairo
    Ratings:
    +27
    Local Time:
    7:07 PM
    Thank you adding index privilege was missing. :)
     
    • Like Like x 1
  4. dooma

    dooma Member

    226
    22
    18
    Oct 15, 2016
    Cairo
    Ratings:
    +27
    Local Time:
    7:07 PM
    How can I install the cron updates to run every 5 mins for WHMCS ?!

    Thanks
     
  5. eva2000

    eva2000 Administrator Staff Member

    30,177
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    3:07 AM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1
  6. pamamolf

    pamamolf Well-Known Member

    2,724
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    8:07 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Is there an easy way to check if it is enabled or not?
     
  7. eva2000

    eva2000 Administrator Staff Member

    30,177
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    3:07 AM
    Nginx 1.13.x
    MariaDB 5.5
    use show grants mysql command
     
    • Informative Informative x 1
  8. pamamolf

    pamamolf Well-Known Member

    2,724
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    8:07 PM
    Nginx-1.13.x
    MariaDB 10.1.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

    30,177
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    3:07 AM
    Nginx 1.13.x
    MariaDB 5.5
    you have all privileges granted
     
  10. pamamolf

    pamamolf Well-Known Member

    2,724
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    8:07 PM
    Nginx-1.13.x
    MariaDB 10.1.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

    30,177
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    3:07 AM
    Nginx 1.13.x
    MariaDB 5.5
  12. pamamolf

    pamamolf Well-Known Member

    2,724
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    8:07 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Ok thanks :)
     
    Last edited: Nov 13, 2016
  13. dooma

    dooma Member

    226
    22
    18
    Oct 15, 2016
    Cairo
    Ratings:
    +27
    Local Time:
    7:07 PM
    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 Member

    226
    22
    18
    Oct 15, 2016
    Cairo
    Ratings:
    +27
    Local Time:
    7:07 PM
    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

    30,177
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    3:07 AM
    Nginx 1.13.x
    MariaDB 5.5
    Use full path to php at /usr/local/bin/php instead of just php in cron job line
     
  16. dooma

    dooma Member

    226
    22
    18
    Oct 15, 2016
    Cairo
    Ratings:
    +27
    Local Time:
    7:07 PM
    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

    30,177
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    3:07 AM
    Nginx 1.13.x
    MariaDB 5.5
    you'd have to ask whmcs support as i don't know what those argument related messages are related to