Changing the account name by data Import

If I use data Import for mass changes to account names, the gl account id still have the old account names. Changing it online updates the GL account ID but is tedious when there are many records to be changed

Is it ok to change through mariadb? First will Import the new account names in erpnext then in Mariadb, UPDATE by concatenating the account number, name and company separated by -