MySQL alarm: warning:using a password on the command line interface can is insecure.

Source: Internet
Author: User

Problem Description: Execute the following statement, SQL is executed successfully, but there is an alarm, the alarm looks always uncomfortable

- - - - -E " use DB; Delete  from   the command line interface can insecure.

Workaround: The alarm means "entering the password at the command line is not secure", the workaround is to write the user name and password to the configuration file, and then introduce the file in the command line as a parameter

The contents of the. config file are as follows:

[mysql] User = Abcpassword =abc123
-- defaults-extra-file=~/.config-hip-pport-e "use db;delete from TB;";

If both the user and the password are correct in the. config file, the SQL above executes successfully without any alarms.

Attached: can change the place and the attention point

1. The first line in the. config file can be either [MySQL] or [client].

2. The. config file is optional except for password, which can be written in a configuration file or written to the command line.

3 、--The Defaults-extra-file parameter must be placed first.

4, when the MySQL or mysqldump use encountered difficulties, in addition to ask the next big God, you can also use the MySQL--help to help solve the problem.

MySQL alarm: warning:using a password on the command line interface can is insecure.

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.