mysql 常用option

时间:2021-06-17 14:31:15

mysql 常用option

  --host=host_name-h host_name

  Connect to the MySQL server on the given host.

  --port=port_num-P port_num(注意 P 是大写)

  The TCP/IP port number to use for the connection.

  --password[=password]-p[password]

  The password to use when connecting to the server. If you use the short option form (-p), you cannot have a space between the option and the password. If you omit the password value following the --password or -p option on the command line, mysql prompts for one.

参考:http://dev.mysql.com/doc/refman/5.7/en/mysql-command-options.html#option_mysql_password