423,867 Members | 3,449 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,867 IT Pros & Developers. It's quick & easy.

MySQL startup error under Windows Installing MySQL as an Service

P: 1
The service already exists!

The current server installed: C:\AppServ\MySQL\bin\mysqld-nt the --defaults-file=C:\

AppServ\MySQL\my.ini mysql



Try to start the MySQL daemon as service ...



The mysql service starts.

The mysql service failed to start.



System error.



System error 1067.



The process was unexpectedly completed.



Press any key to continue . . .
Apr 10 '18 #1

✓ answered by despairing

As soon as we have dumps of all tables we need to create new instance of MySQL.
If it’s a single table corruption it makes sense to try innodb_force_recovery=6 to DROP the table.
If MySQL can’t even start, try to move the corrupt actor.ibd elsewhere. In the recovery mode after DROP TABLE actor MySQL will remove a record from the dictionary. Remove actor.frm if it still remains.
The point is to get clean up&running MySQL, ready to import the table dump.
Once MySQL is ready create an empty table actor:
mysql> CREATE TABLE `actor` (
-> `actor_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
-> `first_name` varchar(45) NOT NULL,
-> `last_name` varchar(45) NOT NULL,
-> `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-> PRIMARY KEY (`actor_id`),
-> KEY `idx_actor_last_name` (`last_name`)
-> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
Query OK, 0 rows affected (0.01 sec)
or you can try to use mysql recovery :

Share this Question
Share on Google+
2 Replies


Expert 100+
P: 946
Yur first notice seems to indicate the MySQL is already started. You can check this by doing this on a command =prompt (as Administrator):
Expand|Select|Wrap|Line Numbers
  1. C:\>netstat -antb | findstr "3306 mysql"
  2.   TCP    0.0.0.0:3306           0.0.0.0:0              LISTENING
  3.  [mysqld.exe]
  4.   TCP    [::]:3306              [::]:0                 LISTENING
  5.  [mysqld.exe]
  6.  

You also could try to find out the name of the service by doing this:
Expand|Select|Wrap|Line Numbers
  1. C:\>sc queryex | findstr /i "mysql"
  2. SERVICE_NAME: MySQL57
  3. DISPLAY_NAME: MySQL57
  4.  
And thn query the information of this service with:
Expand|Select|Wrap|Line Numbers
  1. C:\>sc qc MySQL57
  2. [SC] QueryServiceConfig SUCCESS
  3.  
  4. SERVICE_NAME: MySQL57
  5.         TYPE               : 10  WIN32_OWN_PROCESS
  6.         START_TYPE         : 3   DEMAND_START
  7.         ERROR_CONTROL      : 1   NORMAL
  8.         BINARY_PATH_NAME   : "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe" --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini" MySQL57
  9.         LOAD_ORDER_GROUP   :
  10.         TAG                : 0
  11.         DISPLAY_NAME       : MySQL57
  12.         DEPENDENCIES       :
  13.         SERVICE_START_NAME : NT AUTHORITY\NetworkService
  14.  
This should help you with "The service already exists!", if not try to give what your system responded on above example
Apr 14 '18 #2

P: 2
As soon as we have dumps of all tables we need to create new instance of MySQL.
If it’s a single table corruption it makes sense to try innodb_force_recovery=6 to DROP the table.
If MySQL can’t even start, try to move the corrupt actor.ibd elsewhere. In the recovery mode after DROP TABLE actor MySQL will remove a record from the dictionary. Remove actor.frm if it still remains.
The point is to get clean up&running MySQL, ready to import the table dump.
Once MySQL is ready create an empty table actor:
mysql> CREATE TABLE `actor` (
-> `actor_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
-> `first_name` varchar(45) NOT NULL,
-> `last_name` varchar(45) NOT NULL,
-> `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-> PRIMARY KEY (`actor_id`),
-> KEY `idx_actor_last_name` (`last_name`)
-> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
Query OK, 0 rows affected (0.01 sec)
or you can try to use mysql recovery :
Apr 25 '18 #3

Post your reply

Sign in to post your reply or Sign up for a free account.