Mysql打印帮助而不是连接到服务器

标签 mysql

我正在尝试连接到远程 MySQL 服务器:

C:\Program Files\MySQL\MySQL Server 5.7\bin>mysql.exe -u USERNAME -p PASSWORD -h www.example.net DB_NAME

结果:

mysql.exe  Ver 14.14 Distrib 5.7.17, for Win64 (x86_64)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Usage: mysql.exe [OPTIONS] [database]
  -?, --help          Display this help and exit.
  -I, --help          Synonym for -?
  --auto-rehash       Enable automatic rehashing. One doesn't need to use
                      'rehash' to get table and field completion, but startup
                      and reconnecting may take a longer time. Disable with
                      --disable-auto-rehash.
                      (Defaults to on; use --skip-auto-rehash to disable.)
  -A, --no-auto-rehash
                      No automatic rehashing. One has to use 'rehash' to get
                      table and field completion. This gives a quicker start of
                      mysql and disables rehashing on reconnect.


... and so on, the help page is long.

为什么 mysql.exe 实用程序忽略我的命令?

最佳答案

密码前面不能有空格:

mysql.exe -u USERNAME -pPASSWORD

关于Mysql打印帮助而不是连接到服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46466451/

相关文章:

php - 在 Swift 中检索和使用整个 MYSQL 表

mysql - 在插入语句中使用 case when

php - 计数、分组依据、内连接、php、mysql

mysql - WooCommerce:将产品类型从简单批量更改为外部/附属

php - 使用 PHP 编辑表单更新数据需要帮助

php - 有什么原因导致我的 php 脚本中的查询不起作用吗?

MySQL语句: spliting rows values into new columns

mysql - 使用 mysql 和 php 连接数据

mysql - 从数据库中删除多行 Drupal

JAVA : HOW TO Join same table in hibernate and select column's value