mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1005897 to server version: 3.23.44
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> GRANT all ON db_name.table_name TO user@ip IDENTIFIED BY 'password';
mysql> flush privileges;