In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
In order to demonstrate, find a test environment to operate, do not do this online
Pkill mysqld, shut down mysql.
Skip the permission table of MySQL to start the MySQL service:
-- skip-grant-tables starts mysql
/ usr/local/mysql8013/bin/mysqld_safe-defaults-file=/data/mysql8/my8.cnf-skip-grant-tables &
Leave the password blank:
Root@localhost [(none)] > update mysql.user set authentication_string='' where user= "root" and host= "localhost"; Query OK, 1 row affected (0.06 sec) Rows matched: 1 Changed: 1 Warnings: 0root@localhost [(none)] >
Pkill mysqld, shut down mysql.
Start the mysql service again
[root@localhost] # / usr/local/mysql8013/bin/mysqld-- defaults-file=/data/mysql8/my8.cnf &
Log in to the MySQL service without a password and set a new password:
Root@localhost [(none)] > select version (); +-+ | version () | +-+ | 8.0.13 | +-+ root@localhost [(none)] > alter user user () identified by 'jist558@wei'
[root@localhost ~] # mysql-uroot-paired jist558Wei'e "select version ();"
Mysql: [Warning] Using a password on the command line interface can be insecure.
+-+
| | version () |
+-+
| | 8.0.13 |
+-+
When the password is written into the .my.cnf file, mysql can log in directly to the mysql window:
[root@localhost ~] # cat .my.cnf [mysql] prompt= "\ u@\ h:\ p\ R:\ m:\ s [\ d] >" no-auto-rehashuser=rootpassword=jist558@wei [root@localhost ~] # mysql-e "select version ();" +-+ | version () | 8.0.13 | +-+
Demo completed.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.