How to trigger sql user creation and granting rights to databases?

  • Im migrating i-mscp from one server to another, follwing some forum entrys wich deal with that. Ok, except dumping mysql databases complete with --all-databases. I export the imscp concering databases and the customer databases for different reason one by one.


    I create the databases, because the dump of the databases with mysqldump dont contains the create command of the database.


    A part of the transfer are follwing instructings, i think to trigger several things, like ceatings of Unix users, creating directorys for domains, mails, and so on.

    • mysql -u root -p<password>
    • > use imscp;
    • > update domain set domain_status = 'ok';
    • > update subdomain set subdomain_status = 'ok';
    • > update domain_aliasses set alias_status = 'ok';
    • > update subdomain_alias set subdomain_alias_status = 'ok';
    • > update mail_users set status = 'ok';
    • > update admin set admin_status = 'ok', admin_sys_name = null, admin_sys_uid = 0, admin_sys_gname = null, admin_sys_gid = 0;

    With the command imscp-reconfigure --reconfigure after that all went fine, except the creation of the sql-user and granting rights to their according databases.


    How can i trigger i-mscp to create the databases (if they dont exists) and mysql-users (if they dont exists), set password and grant rights as saved in the database?


    The source system is Ubuntu 14.04, the target system is Ubuntu 16.04. Both server runs with i-mscp 1.3.16.