In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
How do I set a password without a password in mysql? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!
Mysql password-free password setting method: 1, use mysqladmin to complete [shell > mysqladmin-u root password "newpwd"]; 2, use the SET PASSWORD command in mysql to complete.
The method of setting password without password in mysql:
Method 1: the simplest method, which is also the method prompted by the system after installing mysql. Use mysqladmin to do this.
Shell > mysqladmin-u root password "newpwd"
The double quotation marks after shell > mysqladmin-u root-h host_name password "newpwd" password are not required, but if the password contains spaces or some special symbols, use quotation marks.
Method 2: use the SET PASSWORD command in mysql to do this. Note that you must use the PASSWORD () function to encrypt the set newpwd, otherwise the direct = 'newpwd' will not take effect. However, if you use the method to set the password with mysqladmin password or GRANT, you do not need to use the PASSWORD () function, because they have already called the function automatically. Shell > mysql-u root
Mysql > SET PASSWORD FOR 'root'@'localhost' = PASSWORD (' newpwd'); mysql > SET PASSWORD FOR 'root'@'host_name' = PASSWORD (' newpwd')
Method 3: set the password shell > mysql-u root directly through the UPDATE user table
Mysql > UPDATE mysql.user SET Password = PASSWORD ('newpwd')-> WHERE User =' root';mysql > FLUSH PRIVILEGES; Thank you for reading! After reading the above, do you have a general understanding of how to set a password without a password in mysql? I hope the content of the article will be helpful to all of you. If you want to know more about the relevant articles, you are welcome to follow the industry information channel.
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.