In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Preface
This article is still quite detailed, even a bit tedious, there are many steps are omitted in other tutorial documents, but I still want to write, because I took a lot of detours at that time, I hope you can avoid these detours I took. Of course, if you know your classmates, you can skip it and choose the place you want to know.
Download the installation package
Open the download page of mysql official website: http://dev.mysql.com/downloads/mysql/
Select the appropriate version and platform
Select the first click Download to enter the real download page, found that you need to log in to download, to be careful, you will find the following No thanks, just start my download. Just click on this link.
Download and extract it to the appropriate directory, and put it here in D:\ mysql
After decompressing, change the name to mysql according to your favorite folder, and all the mysql files are in this directory: d:\ mysql
II. Mysql configuration
Open the newly unzipped folder C:\ wamp-all\ mysql-5.7.13 and find that it contains the my-default.ini configuration file, which is the default configuration file. Copy one of your own renamed my.ini.
Edit the following basic information about the my.ini configuration:
[mysql] # set mysql client default character set default-character-set=utf8 [mysqld] # set 3306 port port = 330 setting mysql installation directory basedir=D:\ mysql# set mysql database data storage directory datadir=D:\ mysql\ sqldata# allow maximum number of connections the character set used by the max_connections=20# server defaults to 8-bit coded latin1 character set character-set-server=utf8# will make Default storage engine default-storage-engine=INNODB used
3. Install and start mysql
Open the cmd command line tool as an administrator and cd to the bin directory of the extracted file: d:\ mysql\ bin
1. Enter mysqld install to enter and run, and the installation will be successful.
two。 First initialize mysqld-initialize-insecure automatically generate root users without passwords, and mysqld-initialize automatically generate root users with random passwords. Here, select root users without passwords.
3. Run net start mysql again and start mysql successfully
It may appear here that mysql has been installed before but has not been deleted or deleted, resulting in incorrect installation directory of 1. If you want to query, you can execute sc query mysql under c:\ windows\ system32 and check the service named mysql: delete, you can execute sc delete mysql under the current directory to delete the mysql, and then continue to execute 1.
Enter the mysql environment
Execute mysql-uroot from 1.cmd to the bin directory (no password required)
two。 Create a new user and authorize it to him
Create user 'test'@'localhost' identified by' your password; grant all privileges on. To test@'localhost'
Enter: enter mysql-utest-p on the command line, and then enter the password you just set.
If you want to exit the sql environment and return to the normal cmd environment, enter exit and enter. Enter mysql again to execute Article 3.
Fifth, configure the environment variables
Configure the MYSQL_HOME=D:\ mysql variable in the environment variable, and then add MYSQL_HOME/bin to the Path
6. Connect mysql
Will appear when you connect
Solution:
1. Open the cmd command line window and go to the bin directory of MySQL.
Execute the command:
Mysql-u root-p
Enter the password:
2. Execute the following command: (change the password to 123456)
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY' 123456'
3. Refresh permissions and execute commands:
FLUSH PRIVILEGES
4. Connect successfully:
Summary
The above is the whole content of this article. I hope the content of this article has a certain reference and learning value for everyone's study or work. Thank you for your support.
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.