mysql installation and set up

mysql download and install recording

Equipment situation: win10, before there has been no mysql installation.
A download: Direct official website to download, https: //dev.mysql.com/downloads/file/ id = 490026 unzip the downloaded version is?. Version 8.0.18 compressed around 270M. After downloading unzip.

Two assembling: refer https://www.runoob.com/mysql/mysql-install.html Note: cmd administrator privileges to use the [start] -> where C: \ Windows \ System32 \ cmd.exe then run to mysqld -install when the
next net start mysql can go wrong:

D: \ mysql-8.0.18-winx64 \ bin> net start mysql
system error 193 occurs.

*** is not a valid Win32 application.

This time reading this blog, the principle seems to be first installed by default in c drive, need to be removed manually, and then remove it, install it again, just go to your specified directory of. And then net start will be successful

https://blog.csdn.net/qq_35164169/article/details/77863600

 

The following are my installation process;
C: \ Windows \ system32> d:

D:\mysql-8.0.18-winx64\bin>mysqld install
Service successfully installed.

D: \ mysql-8.0.18-winx64 \ bin> net start mysql
system error 193 occurs.

*** is not a valid Win32 application.


D:\mysql-8.0.18-winx64\bin>mysqld install
The service already exists!
The current server installed: C:\Windows\system32\mysqld MySQL

D:\mysql-8.0.18-winx64\bin>c:

C:\Windows\System32>d:

D:\mysql-8.0.18-winx64\bin>mysqld remove
Service successfully removed.

D:\mysql-8.0.18-winx64\bin>mysqld -install
Service successfully installed.

D:\mysql-8.0.18-winx64\bin>mysqld -install
The service already exists!
The current server installed: D:\mysql-8.0.18-winx64\bin\mysqld MySQL

D: \ MySQL-8.0.18-Winx64 \ bin> NET Start MySQL
. MySQL service is starting
MySQL service has started successfully.


D:\mysql-8.0.18-winx64\bin>mysql -u root -p
Enter password: ************
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.18

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

Here installation is complete, and complete login.

 

 

 


cd D:\mysql-8.0.18-winx64\bin

Xkm?o-<aR4d=

D:\mysql-8.0.18-winx64\bin>
D:\mysql-8.0.18-winx64\bin>mysqld --initialize --console
2019-10-28T00:52:20.344670Z 0 [System] [MY-013169] [Server] D:\mysql-8.0.18-winx64\bin\mysqld.exe (mysqld 8.0.18) initializing of server in progress as process 12956
2019-10-28T00:52:21.724707Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: Xkm?o-<aR4d=


D:\mysql-8.0.18-winx64\bin>mysqld --initialize --console
2019-10-28T00:58:45.711083Z 0 [System] [MY-013169] [Server] D:\mysql-8.0.18-winx64\bin\mysqld.exe (mysqld 8.0.18) initializing of server in progress as process 1104
2019-10-28T00:58:45.712542Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
2019-10-28T00:58:45.712555Z 0 [ERROR] [MY-013236] [Server] The designated data directory D:\mysql-8.0.18-winx64\data\ is unusable. You can remove all files that the server added to it.
2019-10-28T00:58:45.718481Z 0 [ERROR] [MY-010119] [Server] Aborting
2019-10-28T00:58:45.719322Z 0 [System] [MY-010910] [Server] D:\mysql-8.0.18-winx64\bin\mysqld.exe: Shutdown complete (mysqld 8.0.18) MySQL Community Server - GPL.

# datadir=D:\mysql-8.0.18-winx64

 

// This can create users and then assign permissions; you can connect remotely modify the% can log on Workbench
the CREATE the USER 'zhangsan' @ '%' IDENTIFIED BY '123456';
. GRANT ALL PRIVILEGES ON * lskj the TO 'zhangsan' @ '%' the WITH the GRANT the OPTION;
the FLUSH PRIVILEGES;


// modify remote login method can be used on vs.
The USER the ALTER 'zhangsan' @ '%' the IDENTIFIED BY '123456' PASSWORD the EXPIRE NEVER;
the ALTER the USER 'zhangsan' @ '%' the WITH mysql_native_password the IDENTIFIED BY '123456';
the FLUSH PRIVILEGES;

Guess you like

Origin www.cnblogs.com/67373cyf/p/12030633.html