Solution to the problem of mysql-8.0.17-extracting version of the installation steps and MySQL service failed to start

I am a novice to use mysql database, because I like the use of decompressed version, many of the problems encountered in the installation configuration, part of the answer could not be found in search engines, occasionally find a solution, so this left some essays, provide convenience for the users themselves a little bit of reference, if wrong place, please criticism and common progress!

1.mysql unzip Download

  Browse mysql official website, download, unzip compressed pack, to extract the relevant directory according to need.

2. environment variables and profile settings

  2.1 configure the environment variables (without the necessity of their research, the step reference other bloggers)

  Right-click Computer (My Computer), click Properties, select Advanced System Settings, and finally click Environment Variables, New MYSQL_HOME, and set the value of the variable mysql path (on a bin directory), after completion determination, the following chart configuration

  

  Double-click the path option, select New, and do the configuration as shown below

  

  2.2 Profile Settings

  Directory containing bin folder, the new notepad and renamed the my.ini, following FIG.

  

  My.ini insertion of the relevant information, as follows:

  [mysqld]

  port=3306
  basedir =H:/tools/DataBase/MySQL/mysql
  datadir=H:/tools/DataBase/MySQL/mysql/mydata
  character_set_server = utf8
  default-storage-engine=INNODB
  sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
  [mysql]
  default-character-set = utf8

  

  NOTE: To illustrate, not present in this embodiment in the configuration file brackets []

  2.3 Command Line adapter configuration file

  以管理员身份打开命令行(cmd),进入mysql目录下的bin目录;其后三个命令进行不同的操作。

  mysqld --initialize:作用初始化

  mysqld -install:作用安装mysql服务

  net start mysql:启动mysql服务

  

  注:密码在配置文件中的数据目录下的一个文件中,其后缀为.err(命名方式好像是计算机名+后缀名)。在此文件中有一个[Note] [MY-010454] [Server] A temporary password is generated....

  

3.问题:服务无法启动(如果安装上述流程应该不会出错)

  问题描述:服务无法启动发生在net start mysql命令后,如下图

  

  问题原因:我这儿出现这个问题是因为安装过程中参照了其他博主的配置文件内容,如下图

  

  发现过程:之所以认为服务无法启动的原因是max_connection=200这个命令,是在无意中在存储目录中发现了一个后缀为.err的文件,(.err->.error),如下图

  

  解决办法:抱着试一试的心里,删除max_connection=200此命令,删除生成的数据目录(手动),并使用命令行输入mysqld --remove删除安装的mysql服务,如下图

  

  

  最后结果:删除max_connection=200后,重试发现服务启动成功,但不知能否在其他电脑上使用,如下图

  

 

Guess you like

Origin www.cnblogs.com/waterbbro/p/11372016.html