After installation, mySQL does not start (windows10, initial installation)

I am installing Apache, php and MySQL server on Windows10. The first two were successful, but MySQL has problems.

I installed MySQL in C:\mysql-5.7.10-winx64and changed my.inias follows

basedir = C:/mysql-5.7.10-winx64
datadir = C:/mysql-5.7.10-winx64/data
port = 3306

I managed to install, but if I try to start, it will be shown below

C:\Windows\system32>net start mysql
The MySQL service is starting.
The MySQL service could not be started.
The service did not report an error.
More help is available by typing NET HELPMSG 3534.

However, if I check for events on a page Management>Event Viewer>Custom Views>Summaryon the computer, this tells me: "could not set datadir to C:\mysql-5.7.10-winx64\data\"

Error Event Description

If I create the data folder manually, the error message changed to

Unable to open table mysql.plugin

Run mysql_upgradeto create it .. "and some files are created in the data folder

enter image description here

I tried updating by typing mysql_upgrade, but that failed.

mysql_upgrade: : 2003: MySQL "localhost" (10061) MySQL. .

?

+6
8

"", "mysqld --initialize" "net start mysql", bingo!

+10

, , .

  • C:\ProgramData\MySQL\MySQL Server 5.7 my.ini.
  • C:\Program Files\MySQL\MySQL Server 5.7 .
  • cmd net start mysql

.

:

MySQL my.ini, Program Files..., , , , .

+6

1.

2003: Can't connect to MySQL server on 'localhost' (10061) while connecting to the MySQL server. Upgrade process encountered error and will not continue.

cmd , \Program Files\MySQL\MySQL Server 5.7\bin\

mysqld install

2.

C:\Program Files\MySQL\MySQL Server 5.7\bin>net start mysql
The MySQL service is starting.
The MySQL service could not be started.
The service did not report an error.
More help is available by typing NET HELPMSG 3534.

Try

mysqld --initialize

net start mysql

. .

+6

, , . , , . data, , " : mysql.user ". data data, bin.

mysqld --initialize [with random root password]

mysqld --initialize-insecure [without random root password]
+4

https://dev.mysql.com/downloads/mysql/ GA, "data" mysql outher, configfile my.ini mysql- "version".

0

my.ini.
MySQL Windows, :

basedir = C:\\mysql-5.7.10-winx64
datadir = C:\\mysql-5.7.10-winx64\\data

.

MySQL . , .

MySQL.

0

: https://dev.mysql.com/doc/refman/8.0/en/data-directory-initialization.html

data --console :

bin\mysqld --defaults-file=C:\my.ini
   --initialize --console

0

MySQL Server can be launched as a Program or as a Service. You cannot run both. You must stop the mysqld server program before starting the mysqld server as a service.

The mysqld server program can be stopped either by typing " CTRL + c", or by entering the command " mysqladmin -u root -p shutdown", and when prompted for a mysqladmin -u root -p shutdownpassword.

0
source

Source: https://habr.com/ru/post/1621579/


All Articles