MySQLのサーバーへの接続方法を記述していく。
shell> mysql -h host -u user -p
Enter password:
・host
MySQLサーバーが稼働しているホストの名前。
・user
ユーザーのMySQLアカウントのユーザー名。
・-p
パスワードを設定している時に入力。
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 16
Server version: 5.5.62 MySQL Community Server (GPL)
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MySQL > ;
パスワードを入力後、上記のような内容が表示されれば、接続完了。
また、データベースの指定方法については、こちらに記載。
[参考]https://dev.mysql.com/doc/refman/5.6/ja/connecting-disconnecting.html