In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces how to install and configure MySQL5.7.21. It is very detailed and has a certain reference value. Friends who are interested must finish it!
Official reference manual
1. Extract the MySQL 5.7.20 installation package, such as X:\ MySQL\ mysql-5.7.21-winx64. (there is no data and my.ini)
two。 Configure the environment variable for mysql, create MYSQL_HOME, and add% MYSQL_HOME%\ bin to Path
3. Configure my.ini. And put my.ini into the bin directory (1. If you put it in the mysql-5.7.21-winx64 directory, you may not be able to start the MYSQL service when you execute net start mysql below. Data will not be generated automatically)
[client] default-character-set=utf8 [mysqld] # extract directories such as: d:\ MySQL\ mysql-5.7.21-winx64 basedir =% MYSQL_HOME% # extract directories such as: d:\ MySQL\ mysql-5.7.21-winx64\ data datadir =% MYSQL_HOME%\ data port = 3306 default-character-set=utf8
4. Enter the command line as an administrator (you can find it by typing cmd in Xiaona search), and enter the command: mysqld-- initialize-insecure (generate a password-free root user) in the X:\ MySQL\ mysql-5.7.21-winx64\ bin directory, and the data file will appear in the mysql-5.7.20-winx64 directory
5. Type mysqld-- install again. If Service successfully installed appears, the registration is successful.
Note: if this operation reports an error Install/Remove of the Service denied, it is recommended to enter the command prompt as an administrator
6. Start the MySQL service, command: net start mysql
7. Set password mysqladmin-u root password password
8. The method to change the password is as follows: then enter mysql-uroot-p since you have logged in before, directly enter the password you just set (login to root is password-free direct enter for the first time) MYSQL >
Then type: update mysql.user set authentication_string=password ('password you want to enter') where user='root' and Host = 'localhost';, and then type: flush privileges
9. Enter the command show databases; to view the datasheet
The common commands for MySQL are as follows
List of all MySQL commands: Note that all text commands must be first on line and end with';'(to end with ";")? (\?) Synonym for `help'. Clear (\ c) Clear the current input statement. Connect (\ r) Reconnect to the server. Optional arguments are db and host. Delimiter (\ d) Set statement delimiter. Ego (\ G) Send command to mysql server, display result vertically. Exit (\ Q) Exit mysql. Same as quit. Go (\ g) Send command to mysql server. Help (\ h) Display this help. Notee (\ t) Don't write into outfile. Print (\ p) Print current command. Prompt (\ R) Change your mysql prompt. Quit (\ Q) Quit mysql.rehash (\ #) Rebuild completion hash. Source (\.) Execute an SQL script file. Takes a file name as an argument. Status (\ s) Get status information from the server. Tee (\ T) Set outfile [to_outfile]. Append everything into given outfile. Use (\ u) Use another database. Takes database name as argument. Charset (\ C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets. Warnings (\ W) Show warnings after every statement. Nowarning (\ w) Don't show warnings after every statement. Resetconnection (\ x) Clean session context.
10. Enter\ Q; to exit MySQL
11. Turn off the MySQL service, command: net stop mysql
These are all the contents of the article "how to install and configure MySQL5.7.21". Thank you for reading! Hope to share the content to help you, more related knowledge, 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.