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"