In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Enable remote access
Turn on remote access for the root user with the following command:
CREATE USER 'root'@'%' IDENTIFIED BY' password';GRANT ALL ON *. * TO 'root'@'%';ALTER USER' root'@'%' IDENTIFIED WITH mysql_native_password BY 'password';FLUSH PRIVILEGES
Note: where password is the password of root and FLUSH PRIVILEGES is the refresh permission
Import data
If you import the CSV form, open the following command:
SET GLOBAL local_infile = 1
Clear the table contents
Use the following command to clear not only the entire contents of the table, but also start the self-growing ID from 0, as follows:
TRUNCATE TABLE "form name"
Knowledge point expansion:
MySQL8.0 operation command
Because MySQL8.x has great changes compared with MySQL5.x, which is commonly used before, many commands do not work properly on MySQL8.x machines, so here is a summary of some operation commands of MySQL8.x for your reference and a memo for yourself.
The encryption rules of MySQL8.0 are different from those of MySQL5.0, but many tools are not supported. We use the method of modifying the encryption rules of MySQL login to mysql_native_password to solve this problem.
Modify encryption rules
ALTER USER 'root'@'localhost' IDENTIFIED BY' password' PASSWORD EXPIRE NEVER
Update root user password
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY' new_password'
Refresh permissions
FLUSH PRIVILEGES
MySQL8.0 creates a new user
PS:'root'@'localhost' and 'root'@'%' are two different users, so you can do this in order to change to%
CREATE USER 'root'@'%' IDENTIFIED BY' password';GRANT ALL PRIVILEGES ON *. * TO 'root'@'%'WITH GRANT OPTION;FLUSH PRIVILEGES
Summary
The above are the common MySQL8.0+ commands introduced to you by the editor. I hope it will be helpful to you. If you have any questions, please leave a message for me, and the editor will reply you in time. Thank you very much for your support to the website!
If you think this article is helpful to you, you are welcome to reprint it, please indicate the source, thank you!
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.