MySQL client does not enter user name and password 2 methods for directly connecting to a database _mysql

Source: Internet
Author: User
Tags local time mysql client

There are 2 ways
One, can modify My.ini configuration parameters (Linux below is MY.CNF);
[Quote] [Client]
port=3306
Default-character-set=utf8
Host=localhost
User=root
Password=1[/quote]
The exact other parameters can be modified here
Second, can modify environment variables
Mysql_host represents host Name
User is username
Mysql_pwd for password
More parameters Please check the MySQL help document yourself, below is the English form

Variable Description
CXX The name of your C + + compiler (for running Configure ).
CC The name of your C compiler (for running Configure ).
CFLAGS Flags for your C compiler (for running Configure ).
CXXFLAGS Flags for your C + + compiler (for running Configure ).
DBI_USER The default user name for Perl DBI.
DBI_TRACE Trace options for Perl DBI.
HOME The default path for the MySQL history file is $HOME/.mysql_history .
LD_RUN_PATH Used to specify the location of libmysqlclient.so .
MYSQL_DEBUG Debug Trace options when debugging.
MYSQL_GROUP_SUFFIX Option Group suffix value (like specifying --defaults-group-suffix ).
MYSQL_HISTFILE The path to the MySQL history file. If This variable is set, its value overrides the default for $HOME/.mysql_history .
MYSQL_HOME The path to the directory in which the server-specific my.cnf file resides (as of the MySQL 5.0.3).
MYSQL_HOST The default host name used by the MySQL command-line client.
MYSQL_PS1 The command prompt to use in the MySQL command-line client.
MYSQL_PWD The default password when connecting to mysqld . Note the using this is insecure. 5.5.6.2, "End-User guidelines for Password security."
MYSQL_TCP_PORT The default TCP/IP port number.
MYSQL_UNIX_PORT The default Unix socket file name; Used for connections to localhost .
PATH Used by the shell to find MySQL programs.
TMPDIR The directory where temporary files are created.
TZ This should is set to your the local time zone. b.1.4.6, "Time Zone Problems".
UMASK The User-file creation mode when creating files. Note following table.
UMASK_DIR The User-directory creation mode when creating directories. Note following table.
USER The default user name on Windows and NetWare used when connecting to mysqld .
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.