In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the simple way to solve the warning problem of mysql login, the content of the article is carefully selected and edited by the author, which is targeted and of great significance to everyone's reference, the following is a simple way to solve the warning problem of mysql login with the author.
Solution.
This warning comes with mysql, which is intended to tell you that it is not safe to enter the mysql password directly on the screen and display it.
1. Solution 1 (just take a look at it and it won't work)
The solution is relatively simple: when you log in to mysql,-p is not followed by any string.
This solution does circumvent the warning, but if we type it incorrectly, we can only delete it by re-data or ctrl+backspace, and we don't know what went wrong.
Do you feel it is troublesome to enter your account password like this every time? please take a look at the second way.
2. Solution 2 (recommended)
Create a hidden file named .my.cnf under the home directory (you can specify your own directory).
1. Edit the file:
Vim. My.cnf[mysql] host=127.0.0.1user=rootpassword=zxfly
2. When performing login, or scripting. Use the following methods:
HOME=/root mysql
Of course, this directory can be any directory, as long as you specify it. Any parameter can be added to the file, such as port, sock file, etc.
Other mysql commands can also be specified in the file. Just add the corresponding module.
For example, the command mysqldump can be as follows
[mysqldump] host=127.0.0.1user=rootpassword=zxfly
After reading the above simple ways to solve the warning problem of mysql login, many readers must have some understanding. If you need to get more industry knowledge and information, you can continue to follow our industry information column.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.