Mysql learning: Mysql installation and configuration

Mysql8.0.16 installation configuration and setting login password
1. Installation and configuration
1. Download the mysql installation map from https://dev.mysql.com/downloads/mysql/ address Insert picture description here
, find the corresponding version and download the installation package.
2. New system environment variable: Key name: MYSQL_HOME Value: E:\MySql\mysql-8.0.16-winx64
Add %MYSQL_HOME%\bin to the path
3. After the download is complete,
unzip the path where I unzip: E: \MySql\mysql-8.0.16-winx64
4. The configuration file
first check whether there is a my.ini file and data folder in the decompressed path, if not, create a new my.ini and data folder, the content of my.ini As follows: Insert picture description here
5. Install mysql service
1 ", enter cmd with administrator privileges (if it is not administrator privileges, there will be problems), enter the bin directory of the MySQL installation directory, as shown in Figure
Insert picture description here
2 ", then mysqld --initialize --console , Initialization, where the initial password will be generated, as shown in the figure: After the
Insert picture description here
execution is completed, the initial default password of the root user will be output, such as:
2018-04-20T02:35:05.464644Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: 9P0gYk-? 0, kT where 9P0gYk-? 0, kT is the initial password, which is needed for subsequent logins. You can also modify the password after logging in. If the initial password is not written down, you can delete the content in the data folder and reinitialize it.
3 "、 mysqld -install (install mysql) prompt: Service successfully installed.
4 "net start mysql start (net stop mysql pause, mysqld -remove uninstall service)
2. Modify the initial password
1. mysql -u root -p login Local mysql Enter password: initial password
2. mysql>ALTER USER'root'@'localhost' IDENTIFIED WITH mysql_native_password BY'your password'; Enter the command
prompt for modifying the user name and password : Query OK, 0 rows affected (0.04 sec) modification success

Next, start your MYSQL application journey!

Guess you like

Origin blog.csdn.net/weixin_41812784/article/details/90210469