コマンドラインから MySQL に接続する際に、接続するポート番号を指定することができます。 ポート番号を指定する場合には -P オプションを使用します。 mysql -P ポート番号 パスワードを送信するオプション -p は小文字ですが、ポート番号を指定するオプションは -P と大文字になります。 尚、MySQL のポート番号がデフォルトの 3306 で起動している場合、このオプションは不要です。 D:\MySQL\bin>mysql -u root -D test -p Enter password: *********** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 to server version: 4.1.19-community-nt Type '