MySQL Forums
Forum List  »  Install & Repo

Re: Cannot start mysqld after fresh install
Posted by: Hristian Carabulea
Date: April 05, 2016 04:19PM

- I run Windows 10 Pro 64-bit.
- I installed MySQL in directory "C:\Program Files\MySQL"

1. I edited as an administrator the file my.ini in directory, "C:\ProgramData\MySQL\MySQL Server 5.7"

1a. I uncommented this line:
basedir="C:/Program Files/MySQL/MySQL Server 5.7/"

1b. I corrected this line to be like this:
datadir=C:/ProgramData/MySQL/MySQL Server 5.7/Data

2. I added to my windows Path (not sure which line could go):
C:\Program Files\MySQL\MySQL Server 5.7\
C:\Program Files\MySQL\MySQL Server 5.7\bin\

3. I created file startMySQLserver.bat (if run from CLI, upper case does not matter) with the following lines. And I changed in file's properties/Advanced to be run as administrator. I, personally, double click on the file.

:: This file is being used to start the MySQL server

:: start the service as named on your system
net start MySQL57

:: start the MySQL server
"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld"

:: start MySQLNotifier
"C:\Program Files (x86)\MySQL\MySQL Notifier 1.1\MySQLNotifier.exe"

::exit the CLI
exit

4. I created file stopMySQLserver.bat (if run from CLI, upper case does not matter) with the following lines. And I changed in file's properties/Advanced to be run as administrator.

:: This file is being used to stop the MySQL server on Windows 10

:: stop the service as named on your system
net stop MySQL57

:: stop the MySQL server
"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqladmin" -u root shutdown

:: I do not know how to currently end MySQLNotifier.exe
taskkill /IM "C:\Program Files (x86)\MySQL\MySQL Notifier 1.1\MySQLNotifier.exe" /T /F

::exit the CLI
exit

5. I, personally, double click on the files to run. Oh, yes, the MySQLNotifier.exe file does not get stopped. I do not care. I use it to also verify that MySQL server did indeed stop. I also disabled it in the Task Manager / Startup from starting at Windows Startup.

6. Sorry I cannot add any pictures to make it more clear.

I hope this will help you. This solution worked for me.

Sincerely,

Hristian
y-c.eu

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.