localhost mysql code example
Example 1: mysql connect command
mysql --host=localhost --user=myname --password mydb
mysql -h localhost -u myname -p mydb
Example 2: how to connect mysql local server
\connect root@localhost:3306
mysql --host=localhost --user=myname --password mydb
mysql -h localhost -u myname -p mydb
\connect root@localhost:3306