MySQL数据库版本说明
相关资料:MySQL官网链接
一.Windows上的MySQL安装步骤
步骤一:初始化数据库
C:\Program Files\mysql-8.0.14-winx64\bin>mysqld --initialize --console
2019-01-22T01:51:32.080078Z 0 [System] [MY-013169] [Server] C:\Program Files\mysql-8.0.14-winx64\bin\mysqld.exe (mysqld 8.0.14) initializing of server in progress as process 4376
2019-01-22T01:51:32.082599Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
//注:ROOT用户默认密码
2019-01-22T01:51:35.488989Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: 7AuPTfqwQl,%
2019-01-22T01:51:36.681894Z 0 [System] [MY-013170] [Server] C:\Program Files\mysql-8.0.14-winx64\bin\mysqld.exe (mysqld 8.0.14) initializing of server has completed
//备注:如果已初始化或重复执行显示如下:
C:\Program Files\mysql-8.0.14-winx64\bin>mysqld --initialize --console
2019-01-22T01:54:48.640694Z 0 [System] [MY-013169] [Server] C:\Program Files\mysql-8.0.14-winx64\bin\mysqld.exe (mysqld 8.0.14)
initializing of server in progress as process 9072
2019-01-22T01:54:48.642366Z 0 [Warning] [MY-013242] [Server]
--character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2019-01-22T01:54:48.643345Z 0 [ERROR] [MY-010457] [Server]
--initialize specified but the data directory has files in it. Aborting.
2019-01-22T01:54:48.643354Z 0 [ERROR] [MY-013236] [Server]
Newly created data directory C:\Program Files\mysql-8.0.14-winx64\data\ is unusable. You can safely remove it.
2019-01-22T01:54:48.661525Z 0 [ERROR] [MY-010119] [Server]
Aborting
2019-01-22T01:54:48.661778Z 0 [System] [MY-010910] [Server]
C:\Program Files\mysql-8.0.14-winx64\bin\mysqld.exe: Shutdown complete (mysqld 8.0.14) MySQL Community Server - GPL.
步骤二:安装数据库:
C:\Program Files\mysql-8.0.14-winx64\bin>mysqld install
Service successfully installed.
步骤三:启动数据库:
C:\Program Files\mysql-8.0.14-winx64\bin>net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功。
二.Linux上的MySQL安装步骤