0

I have an xampp-portable directory that contains mysql/mariadb. The xampp directory is located directly on d:, so path is d:\xampp and mysql is d:\xampp\mysql I want to run mysql as windows service so it automatically gets started on system start. Okay.

I did run the following command from d:\xampp\mysql\bin with elevated priviliges: mysqld --install MySQL defaults-file="d:\xampp\mysql\bin\my.ini" The command succeeds (Service successfully installed.)

The following commands (to start in console or standalone mode) also succeed:

mysqld --defaults=file-d:\xampp\mysql\bin\my.ini --standalone
mysqld --defaults-file=d:\xampp\mysql\bin\my.ini --console

Because of that i think that the configuration file is correct.

But net start MySQL fails with 1067 error. The command generated for the MySQL service is D:\xampp\mysql\bin\mysqld defaults-file=d:\xampp\mysql\bin\my.ini MySQL and that one also fails without any message.

There are dozens of solutions for 1067 errors

  • check firewall rules (firewall disabled)
  • deleting all ib* files from data directory
  • verify that paths are correct
  • verify that paths use capital where necessary
  • uninstall/reinstall MySQL service (mysqld -remove MySQL fails because MySQL isnt running, so sc delete MySQL to remove the service registration)

I am a bit lost. Only thing i can think of is a permission problem. but as the service runs as "local system" the service should have access to everything. Any suggestions?

This is the content of the log file D:\xampp\mysql\data\name.err after trying to start the service with net start MySQL

EDIT 1:

2023-05-12  7:52:01 0 [Note] Starting MariaDB 10.4.28-MariaDB source revision c8f2e9a5c0ac5905f28b050b7df5a9ffd914b7e7 as process 11092
2023-05-12  7:52:01 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2023-05-12  7:52:01 0 [Note] InnoDB: Uses event mutexes
2023-05-12  7:52:01 0 [Note] InnoDB: Compressed tables use zlib 1.2.12
2023-05-12  7:52:01 0 [Note] InnoDB: Number of pools: 1
2023-05-12  7:52:01 0 [Note] InnoDB: Using SSE2 crc32 instructions
2023-05-12  7:52:01 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2023-05-12  7:52:01 0 [Note] InnoDB: Completed initialization of buffer pool
2023-05-12  7:52:01 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2023-05-12  7:52:01 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2023-05-12  7:52:01 0 [Note] InnoDB: Setting file '.\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2023-05-12  7:52:01 0 [Note] InnoDB: File '.\ibtmp1' size is now 12 MB.
2023-05-12  7:52:01 0 [Note] InnoDB: 10.4.28 started; log sequence number 50709; transaction id 8
2023-05-12  7:52:01 0 [Note] InnoDB: Loading buffer pool(s) from D:\xampp\mysql\data\ib_buffer_pool
2023-05-12  7:52:01 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-05-12  7:52:01 0 [Note] InnoDB: Buffer pool(s) load completed at 230512  7:52:01
D:\xampp\mysql\bin\mysqld: Too many arguments (first extra is 'defaults-file=d:\xampp\mysql\bin\my.ini').
2023-05-12  7:52:01 0 [ERROR] Aborting

EDIT2/Solution:

My install command was wrong:

rem wrong
mysqld --install MySQL defaults-file="d:\xampp\mysql\bin\my.ini"
rem correct: double-dash prefix for parameter defaults-file
mysqld --install MySQL --defaults-file="d:\xampp\mysql\bin\my.ini"

2 Answers 2

1

I noticed now that in the command generated for service the -- before parameter is missing don't know if typo or an actual error.
Anyway, I also use xampp and for install the service I used the script integrated, in your case should be:

D:\xampp\mysql\mysql_installservice.bat

So try to remove the actual service and then run this script.
You can also install from the xampp control panel by clicking the red X beside mysql

1
  • For some unknown reason my portable xampp directory does not contain a mysql_installservice.bat 🤔 but you are right, the -- before defaults-file where missing in my install command - that solved the problem. thanks
    – Michael
    May 12 at 8:54
0

Are you in a command line only installation? Can you check the mysql logfile and the windows event viewer if there is some more information about the error, eventually from a remote windows pc.

1
  • The pc is my development environment, full access to the xampp directory with the file browser (host=localhost). added the error log to my initial question.
    – Michael
    May 12 at 5:56

You must log in to answer this question.

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