Change:
Describe the bug Erorr first init mysql databases if use package builded To Reproduce Steps to reproduce the behavior: this patch command Expected behavior Error running this command Metadata system: host os: multi-user?: sandbox: version: channels(root): nixpkgs: cc
Thanks for reporting Any of the , , , options require a client so I'm guessing the best we can do is document this. Any other ideas
is an argument that is only available for the derivation, and is not exposed in - so it's hard people stumble over this by accident. They need to explicitly set a global package override. Also, as error message by itself should already be clear enough, especially when looking at the system configuration. I don't consider this a bug. It works as intended - if you override mysql globally to not contain the client components, you'd have to expect client operations to fail. given you by yourself in , and it doesn't really work properly anyways, what about removing that argument?
When I made this parameter, I did not test database creation on first run. I wanted to split mariadb into components - server and client. Example in another distribution: But due to the different file locations, occur such errors. Is this variant bad? (Not worked witn MySQL 8.0)
If you use then there no reason to split package because you install both anyways. Arch Linux probably doesn't offer option so it makes sense.
What was the initial idea of having a server without the client binaries? Closure size reduction? In that case pulling in the client anyways in a separate derivation doesn't make much sense. I understand we want to have a separate client without pulling in server components (and we have that for mariadb), but I having the server without client isn't much of use. There's usually enough storage space on the database server to also ship the client binaries, and they are needed for most options in the mysql module, as well as for local administration / backups anyways. I'm pretty much for removing the argument. It causes a lot of confusion when uses for arguable benefit.

Discussion:
<del> diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ea7c1df..b0face0d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -176,6 +176,10 @@ ELSE() SET (SKIP_COMPONENTS "N-O-N-E") ENDIF() +IF (WITHOUT_CLIENT) +  SET (SKIP_COMPONENTS "Client|ClientPlugins|ManPagesClient") +ENDIF() + OPTION(NOT_FOR_DISTRIBUTION "Allow linking with GPLv2-incompatible system libraries. Only set it you never plan to distribute the resulting binaries" OFF) INCLUDE(check_compiler_flag) </del>

, fixDarwinDylibNames, cctools, CoreServices, less , numactl # NUMA Support , withStorageMroonga ? true, kytea, msgpack, zeromq <del> , withoutClient ? false </del> }: with stdenv.lib;

++ optional stdenv.hostPlatform.isLinux linux-pam ++ optional (!stdenv.hostPlatform.isDarwin) mytopEnv; <del> patches = common.patches ++ [ ./cmake-without-client.patch ] ++ optionals stdenv.hostPlatform.isDarwin [ </del> <ins> patches = common.patches ++ optionals stdenv.hostPlatform.isDarwin [ </ins> ./cmake-without-plugin-auth-pam.patch ];

"-DWITH_NUMA=ON" ] ++ optional (!withStorageMroonga) [ "-DWITHOUT_MROONGA=ON" <del> ] ++ optionals withoutClient [ "-DWITHOUT_CLIENT=ON" </del> ] ++ optionals stdenv.hostPlatform.isDarwin [ "-DWITHOUT_OQGRAPH=1" "-DWITHOUT_TOKUDB=1"

chmod +x "$out"/bin/wsrep_sst_common rm "$out"/bin/{mysql_client_test,mysqltest} rm -r "$out"/data # Don't need testing data <del> '' + optionalString withoutClient '' ${ # We don't build with GSSAPI on Darwin optionalString (!stdenv.hostPlatform.isDarwin) '' rm "$out"/lib/mysql/plugin/auth_gssapi_client.so '' } rm "$out"/lib/mysql/plugin/client_ed25519.so rm "$out"/lib/{libmysqlclient${libExt},libmysqlclient_r${libExt}} </del> '' + optionalString withStorageMroonga '' mv "$out"/share/{groonga,groonga-normalizer-mysql} "$out"/share/doc/mysql '' + optionalString (!stdenv.hostPlatform.isDarwin) ''