0

I am facing the following error while creating the Mysql instance from command line in Windows server 2012.

Steps i follwed for creating a new Mysql Instance as a window service:

I have stopped the existing Mysql service (Mysqld) using mysqladmin.exe -u root -p shutdown.

I havecopied the contents of Mysql data folder located at C:\Programdata\Mysql\Mysql Server 5.6\data to the data directory location on new instacnce which is locate at G:\MYSQL.

And i have created a my.ini file with following lines

client [Mysqld]

Server [Mysqld] port=3306 basedir="C:\Program Files\Mysql\Mysql Server 5.6\" datadir="G:\Mysql\" server_id=1

Now from CMD i ran the following command to create the Mysql instance as window service

mysqld.exe --install mysqld --defaults-file="G:\Mysql\my.ini"

the service has been created Sucessfully

But i am getting an error while i am trying to start the Service as

Net start Mysqld from CMD.

System Error Occured

Error 1067 Process Terminated Unexpectdely

Any help can be Appreciated.

Thanks & Regards

Venkat

  • There should be mysqld error log somewhere, but I am not sure about its location on Windows. That can probably tell you more about whats wrong. – jkavalik May 8 '15 at 5:29
  • This is how my error log looks shrib.com/z7YVQHGr – user3736408 May 8 '15 at 5:58
  • From that log it seems mysql can not find its data files, so either you did not copy data folder properly or the change of datadir is wrong. (It does not seem like permission issue or similar, because according to that errorlog new ibdata1 was created because original one was not found) – jkavalik May 8 '15 at 6:10
  • I have copied the data directory to my G drive – user3736408 May 8 '15 at 6:41
  • Then shouldn't it be that datadir points to "G:\Mysql\data" ? check G:\Mysql for freshly created ibdata1 too – jkavalik May 8 '15 at 6:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.