How to Grant Remote Access to Existing MySQL Database code example Example: mysql remote connection command line mysql --host=localhost --user=myname --password mydb