MySQL 8.0 installed under the Windows environment, configuration and unloading

Software version of
Windows: Windows 10
MySQL: mysql-8.0.17-winx64.zip
installation steps
1, configuration environment variable
name: Path
value: C: \ Program Files \ MySQL \ MySQL-8.0.17-Winx64 \ bin

2, the new file my.ini
file location: C: \ Program Files \ MySQL \ MySQL-8.0.17-Winx64 \ my.ini
(this is my installation directory, you modify the path according to their actual installation)

[mysqld]

Port number (default: 3306)

port=3306

Set mysql installation directory

basedir=C:\Program Files\MySQL\mysql-8.0.17-winx64

Set storage directory data mysql database

datadir=C:\Program Files\MySQL\mysql-8.0.17-winx64\data

To allow the maximum number of connections

max_connections=1000

The maximum waiting time (non-interactive connection: jdbc connection to the database)

wait_timeout=60

The maximum waiting time (Interactive Connectivity: mysql clients)

interactive_timeout=600

Set the default time zone

default-time_zone='+8:00'

mysql-8.0 is the default port 3306, coding is utf8mb4, it is no need to set up

3, in order to run the command prompt administrator

// 1, initialize the MySQL database
C: \ Program Files \ MySQL \ MySQL-8.0.17-Winx64 \ bin> mysqld --initialize the --console
// if "initializing of server has completed" appear, or if the data folder have a lot of files, it shows successful initialization of
// a random password will be displayed here on the console, the root @ localhost: after

// 2, Installing MySQL service
C: \ Program Files \ MySQL \ MySQL-8.0.17-Winx64 \ bin> mysqld install
// If you do not use the default service name, enter mysqld install mysql8.0, specify the service name mysql8. 0
// If the "service successfully installed." appears, MySQL or services have this service, then the installation is successful

// 3, start the MySQL service
C: \ Program Files \ MySQL \ \ bin> NET Start mysql mysql-8.0.17-Winx64
// start mysql service name: net start mysql8.0

// 4, so far, has been installed over, you can try to log in, the password is randomly generated password when you initialize the database
C: \ Program Files \ MySQL \ mysql-8.0.17-winx64 \ bin> mysql -uroot -p
// start the specified port mysql: mysql -uroot -P3305 -p

// 5, modified root password
mysql> alter user 'root' @ 'localhost' identified by 'root';

Uninstall tutorials
1 to run the command prompt administrator

// 1, stop MySQL
D: \ ProgramFiles \ MySQL \ MySQL-8.0.16-Winx64 \ bin> NET STOP MySQL
// Stops the specified service name mysql: net stop mysql8.0

// 2, uninstall MySQL
D: \ ProgramFiles \ MySQL \ \ bin> mysqld the Remove MySQL-8.0.16-Winx64
// uninstall the service name in mysql: mysqld remove mysql8.0

2, open the registry: run -> regedit, delete the following directories

HKEY_LOCAL_MACHINE \ the SYSTEM \ ControlSet001 \ Services \ Eventlog \ the Application \ MySQL
HKEY_LOCAL_MACHINE / the SYSTEM / CurrentControlSet / Services / Eventlog / Applications / MySQL
errors and solutions
1, error:! Install / Remove of the Service Denied
Solution: Run as administrator command Row

Guess you like

Origin blog.51cto.com/14538264/2438842