I've installed a MySQL server onto my computer and when I first installed it, it ran automatically. Now I've restarted my computer it is no longer running. What file do I need to run to get it back up and running again?
I've tried running MySQL 5.6 Command Line Client and mysqld.exe from the Program Files/MySQL/MySQLServer/bin directory, and I've had no luck.
Upon running mysqld.exe, I get the following error:
2013-10-28 18:52:12 4788 [ERROR] InnoDB: .\ibdata1 can't be opened in read-write mode 2013-10-28 18:52:12 4788 [ERROR] InnoDB: The system tablespace must be writable! 2013-10-28 18:52:12 4788 [ERROR] Plugin 'InnoDB' init function returned error. 2013-10-28 18:52:12 4788 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2013-10-28 18:52:12 4788 [ERROR] Unknown/unsupported storage engine: InnoDB 2013-10-28 18:52:12 4788 [ERROR] Aborting` Naturally, I tried running it as administrator, and I got this:
C:\Windows\system32>"C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld.exe" 2013-10-28 19:24:30 0 [Warning] TIMESTAMP with implicit DEFAULT value is depreca ted. Please use --explicit_defaults_for_timestamp server option (see documentati on for more details). 25 Answers
Make sure the mysqld.exe is ticked under the Startup tab when you go to run and type msconfig. Also, same goes for Services, look for the MySQL services there, right click > properties and make sure the startup types are selected as automatic.
If you installed MySQL using the MSI installer, it should be set up as a service.
You can open the service in two ways
METHOD #1: Access the Installed Service
- Open up the Services icon in the Control Panel
- Scroll alphabetically to the MySQL service
- Right click the service
- Click Start Service
METHOD #2: Command Line Execution
- Open DOS Window
- From the C: Prompt, run this:
net start mysqlor 'net start mysql57'. The right name may vary on your system
If you get this error
C:\Windows\system32>net start mysql System error 5 has occurred. Access is denied. C:\Windows\system32> then you didn't run the DOS Window as Administrator. Try again as administrator. You should see:
C:\Windows\system32>net start mysql The MySQL service is starting.. The MySQL service was started successfully. C:\Windows\system32> Give it a try!!!
1I had the similar issue and found later that the encoding of my.ini file changes if you open that from notepad. Open the file from Notepad++ and make sure to take a note of the .ini file encoding (mostly it is UTF-8). If the file encoding changes SQL service will not start. Make sure that the new directory in which the data path is set has permissions for the account that runs the mySQLd service in windows (mostly it is network service).
1If you are using wamp on windows, you can start mysql from command line by :
cd \wamp64 cd bin cd mysql dir [check the version no of mysql] cd mysql<version no> mysql.exe -u root This assumes that you have installed wamp at the root
1In order to start manually the mysql serve you must run the mysqld executable. Open the command prompt and type:
shell> "C:\Program Files\MySQL\MySQLServer\bin\mysqld" If mysqld doesn't start, check the error log. The error log is located in the C:\Program Files\MySQL\MySQLServer\data. It is the file with a suffix of .err. You can also try to start the server as mysqld --console; in this case, you may get some useful information on the screen that may help solve the problem.
The last option is to start mysqld with the --standalone and --debug options. In this case, mysqld writes a log file C:\mysqld.trace that should contain the reason why mysqld doesn't start.
6