Just create new account with all privileges to your database ex. call it server

Do this in mysql terminal:
CREATE USER ‘server’@’%’ IDENTIFIED BY ‘password’;

  • This thing “%” makes u can connect to this account from non specified ip.

If you want do only server can connect to account server do this:
CREATE USER ‘server’@‘serverip’ IDENTIFIED BY ‘password’;

After that do this
GRANT ALL ON mydb.* TO ‘server’@’%’; - FOR ALL IP’S
GRANT ALL ON mydb.* to ‘server’@‘serverip’; - FOR ONLY SERVER
mydb = Your database name