Seconday server ispc update (mysql user question)

Discussion in 'Installation/Configuration' started by Chris_UK, Jul 24, 2021.

  1. Chris_UK

    Chris_UK Active Member HowtoForge Supporter

    Okay this might seem like a strange question but I seem to have just had a really weird experience in updating one of my servers.

    Upgrade 3.2.5
    I completed the primary servers root access details and this user has sufficient privileges as expected. However as soon as i hit the reconfigure mysql in the primary server part of the update i was bombarded with a load of no grant option messages.

    So my question is this, does this part of the update use the primary servers remote root user or does it switch over to the secondary servers remote ispcsrv user.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The primary server's root user for this ip/hostname is used to update the privileges of the ispcsrv* users. if you received grant errors, then the root for this ip/hostname user lacks grant privileges.
     
  3. Chris_UK

    Chris_UK Active Member HowtoForge Supporter

    Something seemed really off so here is what I did.

    Added user
    ispcsrv<number> @ % with grant
    result, no change so I will shortly be removing this.

    Updated the ip address in the master user table (it was using an old ip address)
    result, upgrade and permissions succeeded.

    I guess the problem here was actually that the user with the ip host that the upgrade attempted to reconfigure didn't exist because of the old user configs. However that was not what the warnings stated. Here is an excerpt from the failed upgrade.
    Code:
    WARNING: Unable to set rights of user in master database: dbispconfig
     Query: GRANT SELECT ON ?? TO [email protected]?
     Error:
    
    Looking at this now and knowing there was no user to modify the message actually makes a little sense but without that knowledge it appears to be telling you that the root user lacks sufficient privileges to complete the task, obviously not the case.

    I wonder if a user exists check may be added into the upgrade procedure with a more useful warning.
    A simple warning like, ispcsrv* user in primary database appears to be missing would point us in the right direction if this ever occurred. That said this is the reconfig section, if the check fails you could simply drop any existing users for the instance and generate new ones eliminating the issue entirely.

    Anyway, this is resolved and I hope this helps somebody in the future. Bottom line if you move a server or give it a new ip then you had better remember to change the ispcsrv user in the primary database.
     
    Last edited: Jul 24, 2021
    ahrasis likes this.

Share This Page