to run mysql I use the following commands -
mysqld --defaults-file=/etc/my.cnf --initialize-insecure
mysqld --defaults-file=/etc/my.cnf &
mysql fails with the following error:
[ERROR] [MY-000067] [Server] unknown variable ‘rocksdb_default_cf_options=write_buffer_size=64m;target_file_size_base=32m;max_bytes_for_level_base=512m;level0_file_num_compaction_trigger=4;level0_slowdown_writes_trigger=10;level0_stop_writes_trigger=15;max_write_buffer_number=4;compression_per_level=kLZ4Compression;bottommost_compression=kZSTD;compression_opts=-14:1:0;block_based_table_factory={cache_index_and_filter_blocks=1;filter_policy=bloomfilter:10:false;whole_key_filtering=1};level_compaction_dynamic_level_bytes=true;optimize_filters_for_hits=true;compaction_pri=kMinOverlappingRatio’.
It seems that mysql has not rocksDB enabled yet.
The only way I see to enable rocksDB is to run in mySQL the set of INSTALL PLUGIN ROCKSDB commands
This can be done after mysql is already running, but I can’t bring up mysql with rocksdb parameters in the cnf file.
What are the correct steps to bring up MyRocks from source with specific rocksdb parameters?
Yes, correct. MySQL will not recognize variables for plugins until after the plugin is loaded. You can use the following in your my.cnf plugin-load-add=ha_rocksdb.so before the rocksdb_* variables. You can also prefix all rocksdb variables with loose_ if you want to INSTALL PLUGIN after starting MySQL.