I'm installing Apache server, php, and MySQL on Windows10. First two was successful but MySQL has a problem.
I installed MySQL into C:\mysql-5.7.10-winx64
, and changed my.ini
like this
basedir = C:/mysql-5.7.10-winx64
datadir = C:/mysql-5.7.10-winx64/data
port = 3306
I succeeded install but if I try to start, it shows like 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 Computer Management>Event Viewer>Custom Views>Summary
page events, it tells me "failed to set datadir to C:\mysql-5.7.10-winx64\data\
"
If I make data folder manually, error message changed to
Can't open the
mysql.plugin
table
Please run mysql_upgrade
to create it.." and some files are created in data folder
I tried to upgrade by typing mysql_upgrade
but it failed.
mysql_upgrade: Got error: 2003: Can't connect to MySQL server on 'localhost' (10061) while connecting to the MySQL server. Upgrade process encountered error and will not continue.
How can I solve this issue?
I had the same error, after checked this document: https://dev.mysql.com/doc/refman/8.0/en/data-directory-initialization.html
I just clear data
directory and add the --console option to initialize:
bin\mysqld --defaults-file=C:\my.ini
--initialize --console
Hope this help
MySQL Server can either be run as a Program or as a Service. You cannot run both. You should stop 'mysqld' Server Program before starting 'mysqld' Server as Service.
The 'mysqld' Server Program can be stopped either by typing
'CTRL + c
' or by issuing
'mysqladmin -u root -p shutdown
' command and issue the password when prompted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With