mysql 4.2

4.2.2

  • This command invokes mysql without specifying any connection parameters explicitly: shell> mysql
    Because there are no parameter options, the default values apply:

    • The default host name is localhost. On Unix, this has a special meaning, as described later.
    • The default user name is ODBC on Windows or your Unix login name on Unix.
    • No password is sent if neither -p nor –password is given.
    • For mysql, the first nonoption argument is taken as the name of the default database. If there is no such option, mysql does not select a default database.
  • If you use a -p or –password option and specify the password value, there must be no space
    between -p or –password= and the password following it.

  • On some systems, the library routine that MySQL uses to prompt for a password automatically limits the password to eight characters.

  • It is possible to specify different default values to be used when you make a connection so that you need not enter them on the command line each time you invoke a client program. This can be done in a couple of ways:

    • You can specify connection parameters in the [client] section of an option file. The relevant section of the file might look like this:
      [client]
      host=host_name
      user=user_name
      password=your_pass

    • You can specify some connection parameters using environment variables. The host can be specified for mysql using MYSQL_HOST. The MySQL user name can be specified using USER (this is for Windows only). The password can be specified using MYSQL_PWD, although this is insecure;

4.2.4

  • Option names are case sensitive. -v and -V are both legal and have different meanings. (They are the corresponding short forms of the –verbose and –version options.)

  • For a long option that takes a value, separate the option name and the value by an “=” sign. For a short option that takes a value, the option value can immediately follow the option letter, or there can be a space between: -hlocalhost and -h localhost are equivalent. An exception to this rule is the option for specifying your MySQL password. This option can be given in long form as –password=pass_val or as –password.

4.2.9

  • Because mysql assumes that any string following –host on the command line is a host name, –host –user is interpreted as –host=–user, and the client attempts to connect to a MySQL server running on a host named “–user“
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值