grant remote access mysql code example Example: mysql remote connection command line mysql --host=localhost --user=myname --password mydb