Javascript-форум (https://javascript.ru/forum/)
-   Серверные языки и технологии (https://javascript.ru/forum/server/)
-   -   Не запускается mysql 5.7 (https://javascript.ru/forum/server/75149-ne-zapuskaetsya-mysql-5-7-a.html)

usa-1450 06.09.2018 22:31

Не запускается mysql 5.7
 
Вложений: 1
Апач настраивал вручную, вроде научился, проблема с mysql. Скачал mysql 5.7.23,у меня система Windows 10, разархивировал папку в нужный каталог, в папке создал my.ini, в нем
Код:

[mysqld]
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
datadir="c:/Server/data/DB/data/"
default_authentication_plugin=mysql_native_password

При запуске получил такую ошибку:

Код:

C:\Server\bin\mysql-5.7\bin>mysqld --initialize-insecure --user=root

C:\Server\bin\mysql-5.7\bin>mysqld --initialize-insecure --user=root
2018-09-06T18:47:37.358017Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated.
Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-09-06T18:47:37.358627Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and
 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged
 with strict mode in a future release.
2018-09-06T18:47:37.358646Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2018-09-06T18:47:38.169187Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2018-09-06T18:47:38.170862Z 0 [ERROR] Aborting

Почему не запускается MYSQL?

usa-1450 06.09.2018 22:37

Написал вот так и все заработало

Код:

[mysqld]
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO"
datadir="c:/Server/data/DB/data/"
default_authentication_plugin=mysql_native_password
explicit_defaults_for_timestamp = 1



Часовой пояс GMT +3, время: 02:24.