12

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).
2
  • 2
    This is how I feel right now: i.imgur.com/xVyoSl.jpg
    – Shaun Wild
    Commented Oct 28, 2013 at 18:56
  • 1
    install mysql workbench and try accessing it from there
    – Shekhar
    Commented Oct 28, 2013 at 19:16

6 Answers 6

5

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.

4
  • how do I just run the server?
    – Shaun Wild
    Commented Oct 28, 2013 at 19:03
  • Have you tried to run it manually? Just by starting mysqld.exe? I can only verify the exact services tomorrow at work, do not know them out of my head.
    – Rudolph
    Commented Oct 28, 2013 at 19:05
  • Yes, please check my question.
    – Shaun Wild
    Commented Oct 28, 2013 at 19:26
  • 2
    I set the service as automatic an restart my computer, job done. Thanks!
    – Shaun Wild
    Commented Oct 28, 2013 at 20:05
18

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 mysql or '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!!!

1
  • Thanks, but I thought it is best practice/security measure to run mysql server as non-administrator, tell me please Commented Jan 9, 2018 at 11:37
0

I 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).

1
  • Had the same problem, did some edits to the my.ini file in Notepad, apparently it changed the encoding. The proper encoding is UTF-8.
    – kry
    Commented Apr 2, 2020 at 6:12
0

The can't read/write permission problem could be because mysqld.exe is already running. Consider terminating those processes via the task manager and then run your normal startup routine!

-1

If 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

1
  • That is for connecting to a server, not starting the server.
    – lpacheco
    Commented Apr 23, 2019 at 13:04
-2

In 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
  • Check my question again please.
    – Shaun Wild
    Commented Oct 28, 2013 at 19:10
  • Are you using the pc with an administrator account? It seems that you don't have enough permission to read/write in that folder.
    – enry
    Commented Oct 28, 2013 at 19:19
  • yes I'm administrator.
    – Shaun Wild
    Commented Oct 28, 2013 at 19:22
  • I've updated my question with what happened./
    – Shaun Wild
    Commented Oct 28, 2013 at 19:25
  • You must use the --explicit_defaults_for_timestamp command line option, in command prompt: mysqld --explicit_defaults_for_timestamp=1
    – enry
    Commented Oct 28, 2013 at 19:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .