### Start NDB Cluster Backup (Scenario Example) Source: https://dev.mysql.com/doc/refman/8.0/en/mysql-cluster-replication-backups.html Example of starting a backup using Method B for a replication source named 'rep-source' on the default port. ```bash shell_S_> ndb_mgm rep-source:1186 -e "START BACKUP" ``` -------------------------------- ### Install Multiple Components Source: https://dev.mysql.com/doc/refman/8.0/en/install-component.html Example demonstrating how to install two components, 'component1' and 'component2', using their file URNs. ```sql INSTALL COMPONENT 'file://component1', 'file://component2'; ``` -------------------------------- ### Install and Uninstall Component Example Source: https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html Demonstrates the sequence of installing and uninstalling a component, highlighting that uninstallation does not unregister its dynamic privileges. ```sql INSTALL COMPONENT 'my_component'; UNINSTALL COMPONENT 'my_component'; INSTALL COMPONENT 'my_component'; ``` -------------------------------- ### Startup Arguments Example Source: https://dev.mysql.com/doc/refman/8.0/en/audit-log-file-formats.html An example of the 'args' field within 'startup_data', listing command-line options used when starting the MySQL server. ```json "args": ["/usr/local/mysql/bin/mysqld", "--loose-audit-log-format=JSON", "--log-error=log.err", "--pid-file=mysqld.pid", "--port=3306" ] ``` -------------------------------- ### Install Components and Set System Variables Source: https://dev.mysql.com/doc/refman/8.0/en/install-component.html Example showing how to install components and simultaneously set their global and persistent system variables. Omitting GLOBAL or PERSIST defaults to GLOBAL. ```sql INSTALL COMPONENT 'file://component1', 'file://component2' SET GLOBAL component1.var1 = 12 + 3, PERSIST component2.var2 = 'strings'; ``` -------------------------------- ### INSTALL COMPONENT with SET Clause Source: https://dev.mysql.com/doc/refman/8.0/en/install-component.html Syntax and examples for installing components and setting their system variables simultaneously. ```APIDOC ## INSTALL COMPONENT Statement with SET Clause ### Description Installs components and optionally sets their system variables using the `SET` clause. This allows for immediate configuration of component variables. ### Method INSTALL COMPONENT ... SET ... ### Endpoint N/A (SQL Statement) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```sql INSTALL COMPONENT 'file://component1', 'file://component2' SET GLOBAL component1.var1 = 12 + 3, PERSIST component2.var2 = 'strings'; ``` ### Response #### Success Response (200) Components are installed, active, and their specified variables are set. #### Response Example None (SQL statement execution) ### Error Handling Errors occur if component names are erroneous, components do not exist or are already installed, component initialization fails, or if invalid variable names or expressions are used in the `SET` clause. Subqueries, stored functions, and aggregate functions are not permitted in the value expression. ``` -------------------------------- ### Start MySQL Services Source: https://dev.mysql.com/doc/refman/8.0/en/multiple-windows-services.html Start installed MySQL services using the SC START command followed by the service name. ```shell C:\> SC START mysqld1 ``` ```shell C:\> SC START mysqld2 ``` -------------------------------- ### Install MySQL Service with Custom Name and Options Source: https://dev.mysql.com/doc/refman/8.0/en/windows-start-service.html Example of installing the MySQL service with a custom name and specifying an option file. The `--defaults-file` option allows for more flexible configuration by reading options from a specified file. ```shell "C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld" --install MySQL --defaults-file="C:\my-defaults.cnf" ``` -------------------------------- ### Start MySQL Server using systemctl Source: https://dev.mysql.com/doc/refman/8.0/en/linux-installation-native.html After installation, use systemctl to start the MySQL server daemon. The database tables are created automatically if they don't exist. ```bash $> systemctl start mysqld ``` -------------------------------- ### Verify ddl_rewriter Plugin Installation Source: https://dev.mysql.com/doc/refman/8.0/en/ddl-rewriter-installation.html Query the Information Schema PLUGINS table to verify the installation status of the ddl_rewriter plugin. This example filters for plugins starting with 'ddl'. ```sql SELECT PLUGIN_NAME, PLUGIN_STATUS, PLUGIN_TYPE FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME LIKE 'ddl%'; ``` -------------------------------- ### Verify Connection Control Plugin Installation Source: https://dev.mysql.com/doc/refman/8.0/en/connection-control-plugin-installation.html Query the Information Schema PLUGINS table to check the status of the connection control plugins. This example filters for plugins starting with 'connection'. ```sql SELECT PLUGIN_NAME, PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME LIKE 'connection%'; ``` -------------------------------- ### Backup Started Confirmation Example Source: https://dev.mysql.com/doc/refman/8.0/en/mysql-cluster-backup-using-management-client.html An example of the notification message confirming that a backup has started. ```text Node 2: Backup 1 started from node 1 ``` -------------------------------- ### Install MySQL Server as a Windows Service Source: https://dev.mysql.com/doc/refman/8.0/en/windows-start-service.html This command installs the MySQL server as a Windows service. The server is not started by this command; separate instructions are required for starting the service. ```shell C:\> "C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld" --install ``` -------------------------------- ### Example: SHOW CREATE DATABASE Source: https://dev.mysql.com/doc/refman/8.0/en/show-create-database.html This example demonstrates how to use SHOW CREATE DATABASE to view the exact statement used to create the 'test' database, including character set and collation. ```sql mysql> SHOW CREATE DATABASE test\G *************************** 1. row *************************** Database: test Create Database: CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80014 DEFAULT ENCRYPTION='N' */ ``` -------------------------------- ### MySQL Generic Binary Installation Steps Source: https://dev.mysql.com/doc/refman/8.0/en/binary-installation.html Commands to create a mysql group and user, navigate to the installation directory, unpack the MySQL tarball, create a symbolic link, and set up a directory for MySQL files. ```bash > groupadd mysql > useradd -r -g mysql -s /bin/false mysql > cd /usr/local > tar xvf _/path/to/mysql-VERSION-OS_.tar.xz > ln -s _full-path-to-mysql-VERSION-OS_ mysql > cd mysql > mkdir mysql-files > chown mysql:mysql mysql-files ``` -------------------------------- ### Install mecab-ipadic from Source Source: https://dev.mysql.com/doc/refman/8.0/en/fulltext-search-mecab.html These commands guide you through installing the mecab-ipadic dictionary from its source package. ```bash tar zxfv mecab-ipadic-2.7.0-20070801.tar cd mecab-ipadic-2.7.0-20070801 ./configure make su make install ``` -------------------------------- ### Example setup_objects Table for TABLE Objects Source: https://dev.mysql.com/doc/refman/8.0/en/performance-schema-object-filtering.html Illustrates specific rows in the setup_objects table that apply to TABLE objects in different schemas, demonstrating how ENABLED and TIMED settings can vary. ```sql +-------------+---------------+-------------+---------+-------+ | OBJECT_TYPE | OBJECT_SCHEMA | OBJECT_NAME | ENABLED | TIMED | +-------------+---------------+-------------+---------+-------+ | TABLE | db1 | t1 | YES | YES | | TABLE | db1 | t2 | NO | NO | | TABLE | db2 | % | YES | YES | | TABLE | db3 | % | NO | NO | +-------------+---------------+-------------+---------+-------+ ``` -------------------------------- ### Show Binary Logs Example Source: https://dev.mysql.com/doc/refman/8.0/en/mysql-server-side-help.html This example demonstrates the output of the `SHOW BINARY LOGS;` command, which lists the binary log files on the server along with their sizes and encryption status. ```sql mysql> SHOW BINARY LOGS; +---------------+-----------+-----------+ | Log_name | File_size | Encrypted | +---------------+-----------+-----------+ | binlog.000015 | 724935 | Yes | | binlog.000016 | 733481 | Yes | +---------------+-----------+-----------+ ``` -------------------------------- ### Start MySQL NDB Cluster Service Source: https://dev.mysql.com/doc/refman/8.0/en/mysql-cluster-install-windows-service.html Use the SC START command to start a previously installed MySQL NDB Cluster data node service. ```bash C:\> SC START dnode1 ``` -------------------------------- ### Example: SHOW CREATE SCHEMA Source: https://dev.mysql.com/doc/refman/8.0/en/show-create-database.html This example shows the equivalent of SHOW CREATE DATABASE using the SHOW CREATE SCHEMA synonym, displaying the creation statement for the 'test' database. ```sql mysql> SHOW CREATE SCHEMA test\G *************************** 1. row *************************** Database: test Create Database: CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80014 DEFAULT ENCRYPTION='N' */ ``` -------------------------------- ### Create and Interact with an EXAMPLE Table Source: https://dev.mysql.com/doc/refman/8.0/en/example-storage-engine.html Demonstrates creating a table using the EXAMPLE storage engine, attempting to insert data (which fails), and selecting from the empty table. ```sql mysql> CREATE TABLE test (i INT) ENGINE = EXAMPLE; Query OK, 0 rows affected (0.78 sec) ``` ```sql mysql> INSERT INTO test VALUES(1),(2),(3); ERROR 1031 (HY000): Table storage engine for 'test' doesn't ยป have this option ``` ```sql mysql> SELECT * FROM test; Empty set (0.31 sec) ``` -------------------------------- ### Start MySQL Server with init_file and defaults_file on Windows Source: https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html This command starts the MySQL server on Windows, specifying both the defaults file and the init file. This is useful if MySQL was installed using the MySQL Installation Wizard. Adjust paths as needed. ```bash C:\> mysqld --defaults-file="C:\\ProgramData\\MySQL\\MySQL Server 8.0\\my.ini" --init-file=C:\\mysql-init.txt ``` -------------------------------- ### Install and Enable MySQL Startup Script Source: https://dev.mysql.com/doc/refman/8.0/en/mysql-cluster-install-linux-binary.html Copy the MySQL server startup script to the system's init directory, make it executable, and register it to start on system boot using chkconfig. ```bash cp support-files/mysql.server /etc/rc.d/init.d/ chmod +x /etc/rc.d/init.d/mysql.server chkconfig --add mysql.server ``` -------------------------------- ### Example of Wildcard Table Replication Filter Source: https://dev.mysql.com/doc/refman/8.0/en/replication-options-replica.html This example demonstrates how `--replicate-wild-ignore-table` filters tables based on wildcard patterns in database and table names. It excludes tables where the database name starts with 'foo' and the table name starts with 'bar'. ```bash --replicate-wild-ignore-table=foo%.bar% ``` -------------------------------- ### Display mysqld Help Options Source: https://dev.mysql.com/doc/refman/8.0/en/mysqld.html Run this command to view a comprehensive list of options available for the mysqld program at startup. This is useful for understanding and configuring server behavior. ```bash mysqld --verbose --help ``` -------------------------------- ### Initial setup_actors Table Content Source: https://dev.mysql.com/doc/refman/8.0/en/performance-schema-thread-filtering.html This example shows the default configuration for the `setup_actors` table, which enables instrumentation and historical event logging for all connections by default. Modify this row or add specific rows for selective configuration. ```sql SELECT * FROM performance_schema.setup_actors; +------+------+------+---------+---------+ | HOST | USER | ROLE | ENABLED | HISTORY | +------+------+------+---------+---------+ | % | % | % | YES | YES | +------+------+------+---------+---------+ ``` -------------------------------- ### Specify Start Timestamp for Audit Log Read Source: https://dev.mysql.com/doc/refman/8.0/en/audit-log-reference.html Example of how to specify a starting timestamp for reading audit log events. The 'start' item with a 'timestamp' value indicates the earliest event to retrieve. ```json "start": { "timestamp": "_value_" } ``` -------------------------------- ### Show Settings for Server Product Source: https://dev.mysql.com/doc/refman/8.0/en/MySQLInstallerConsole.html Use this command to display available options for the 'server' product. Ensure MySQLInstallerConsole is in your system's PATH or provide the full path to the executable. ```bash MySQLInstallerConsole --configure --show-settings server ``` -------------------------------- ### SHOW CREATE VIEW Output Example Source: https://dev.mysql.com/doc/refman/8.0/en/show-create-view.html This example demonstrates the output of SHOW CREATE VIEW, showing the view's definition, including algorithm, definer, and security type. It also displays session variables like character_set_client and collation_connection at the time of view creation. ```sql mysql> SHOW CREATE VIEW v\G *************************** 1. row *************************** View: v Create View: CREATE ALGORITHM=UNDEFINED DEFINER=`bob`@`localhost` SQL SECURITY DEFINER VIEW `v` AS select 1 AS `a`,2 AS `b` character_set_client: utf8mb4 collation_connection: utf8mb4_0900_ai_ci ``` -------------------------------- ### Example Output Showing Active X Plugin Source: https://dev.mysql.com/doc/refman/8.0/en/x-plugin-checking-installation.html This is an example of the output you might see when the 'mysqlx' plugin is installed and active on your MySQL server. ```text +----------------------------+----------+--------------------+---------+---------+ | Name | Status | Type | Library | License | +----------------------------+----------+--------------------+---------+---------+ ... | mysqlx | ACTIVE | DAEMON | NULL | GPL | ... +----------------------------+----------+--------------------+---------+---------+ ``` -------------------------------- ### Select Count Example Source: https://dev.mysql.com/doc/refman/8.0/en/mysql-cluster-programs-ndb-select-count.html Example of using `ndb_select_count` to get row counts from multiple tables. Specify the connection details and table names. ```bash $> ./ndb_select_count -c localhost -d ctest1 fish dogs 6 records in table fish 4 records in table dogs ``` -------------------------------- ### Set up Automatic MySQL Server Startup Source: https://dev.mysql.com/doc/refman/8.0/en/solaris-installation.html Copy the 'mysql.server' script to '/etc/init.d' and create a symbolic link in '/etc/rc3.d' to enable MySQL to start automatically on system boot. ```bash # cp support-files/mysql.server /etc/init.d # ln -s /etc/init.d/mysql.server /etc/rc3.d/S99mysql.server ``` -------------------------------- ### Troubleshoot Plugin Installation Error on Linux Source: https://dev.mysql.com/doc/refman/8.0/en/replication-semisync-installation.html This example shows a common error when installing semisynchronous plugins on Linux if the 'libimf' library is missing. You may need to install 'libimf' separately to resolve this issue. ```sql mysql> INSTALL PLUGIN rpl_semi_sync_source SONAME 'semisync_source.so'; ERROR 1126 (HY000): Can't open shared library '/usr/local/mysql/lib/plugin/semisync_source.so' (errno: 22 libimf.so: cannot open shared object file: No such file or directory) ``` -------------------------------- ### Create Database, Use Database, and Create Table in MySQL Source: https://dev.mysql.com/doc/refman/8.0/en/mysql-cluster-ndbinfo-operations-per-fragment.html This SQL snippet demonstrates the basic setup for creating a database, selecting it for use, and then creating a table with specific columns and engine type. Ensure the NDBCluster engine is available. ```sql CREATE DATABASE mydb; USE mydb; CREATE TABLE t1 ( a INT NOT NULL, b INT NOT NULL, t TEXT NOT NULL, PRIMARY KEY (b) ) ENGINE=ndbcluster; ``` -------------------------------- ### Generate Example Option File Source: https://dev.mysql.com/doc/refman/8.0/en/mysqld-multi.html Execute this command to display a sample option file that can be used as a template for configuring multiple MySQL instances. ```bash mysqld_multi --example ``` -------------------------------- ### Install MySQL Workbench on Fedora with DNF Source: https://dev.mysql.com/doc/refman/8.0/en/linux-installation-yum-repo.html Example command to install the MySQL Workbench community edition on Fedora using the dnf package manager. ```bash sudo dnf install mysql-workbench-community ``` -------------------------------- ### Example: Using GET DIAGNOSTICS in mysql Client Source: https://dev.mysql.com/doc/refman/8.0/en/get-diagnostics.html Demonstrates how to use GET DIAGNOSTICS in the mysql client to retrieve error information after a failed statement. ```sql mysql> DROP TABLE test.no_such_table; ERROR 1051 (42S02): Unknown table 'test.no_such_table' mysql> GET DIAGNOSTICS CONDITION 1 @p1 = RETURNED_SQLSTATE, @p2 = MESSAGE_TEXT; mysql> SELECT @p1, @p2; +-------+------------------------------------+ | @p1 | @p2 | +-------+------------------------------------+ | 42S02 | Unknown table 'test.no_such_table' | +-------+------------------------------------+ ``` -------------------------------- ### Connecting to MySQL with Host and User Source: https://dev.mysql.com/doc/refman/8.0/en/option-defaults-equals.html This example demonstrates a successful connection to a MySQL server using specified host and user credentials. ```bash $> mysql --host 85.224.35.45 --user jon Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 8.0.46 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> SELECT CURRENT_USER(); +----------------+ | CURRENT_USER() | +----------------+ | jon@% | +----------------+ 1 row in set (0.00 sec) ``` -------------------------------- ### Example: Filter Character Sets with LIKE Source: https://dev.mysql.com/doc/refman/8.0/en/show-character-set.html This example demonstrates how to use the LIKE clause with SHOW CHARACTER SET to find character sets starting with 'latin'. ```sql mysql> SHOW CHARACTER SET LIKE 'latin%'; +---------+-----------------------------+-------------------+--------+ | Charset | Description | Default collation | Maxlen | +---------+-----------------------------+-------------------+--------+ | latin1 | cp1252 West European | latin1_swedish_ci | 1 | | latin2 | ISO 8859-2 Central European | latin2_general_ci | 1 | | latin5 | ISO 8859-9 Turkish | latin5_turkish_ci | 1 | | latin7 | ISO 8859-13 Baltic | latin7_general_ci | 1 | +---------+-----------------------------+-------------------+--------+ ``` -------------------------------- ### Create Table with KEY Partitioning Source: https://dev.mysql.com/doc/refman/8.0/en/partitioning-limitations.html Example of creating a table partitioned by KEY with 4 partitions. ```sql CREATE TABLE tkc ( c1 CHAR ) PARTITION BY KEY(c1) PARTITIONS 4; ``` -------------------------------- ### Example NDB Cluster Log Event Source: https://dev.mysql.com/doc/refman/8.0/en/mysql-cluster-log-events.html An example of a specific log event message from NDB Cluster, indicating a node's start phase completion. ```text 09:19:30 2005-07-24 [NDB] INFO -- Node 4 Start phase 4 completed ``` -------------------------------- ### Update and Insert into setup_actors Source: https://dev.mysql.com/doc/refman/8.0/en/performance-schema-thread-filtering.html This example demonstrates how to disable default monitoring and history logging for all connections and then add specific configurations for 'localhost' and 'joe', and 'hosta.example.com' and 'joe'. This allows for selective instrumentation and event logging. ```sql UPDATE performance_schema.setup_actors SET ENABLED = 'NO', HISTORY = 'NO' WHERE HOST = '%' AND USER = '%'; INSERT INTO performance_schema.setup_actors (HOST,USER,ROLE,ENABLED,HISTORY) VALUES('localhost','joe','%','YES','YES'); INSERT INTO performance_schema.setup_actors (HOST,USER,ROLE,ENABLED,HISTORY) VALUES('hosta.example.com','joe','%','YES','NO'); ``` -------------------------------- ### View Initial setup_actors Configuration Source: https://dev.mysql.com/doc/refman/8.0/en/performance-schema-query-profiling.html Displays the current configuration of the setup_actors table, showing default settings for event collection. ```sql SELECT * FROM performance_schema.setup_actors; ``` -------------------------------- ### Install Core MySQL Packages Source: https://dev.mysql.com/doc/refman/8.0/en/linux-installation-debian.html Install the essential MySQL server and client packages, along with their common files and metapackages, in the specified order for a basic setup. ```bash sudo dpkg -i mysql-{common,community-client-plugins,community-client-core,community-client,client,community-server-core,community-server,server}_*.deb ``` -------------------------------- ### Start MySQL Server from Command Line Source: https://dev.mysql.com/doc/refman/8.0/en/windows-start-command-line.html Execute this command in a Windows console window to start the mysqld server. The path may differ based on your MySQL installation. ```bash C:\> "C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld" ``` -------------------------------- ### Starting MySQL Instances with Defaults File Source: https://dev.mysql.com/doc/refman/8.0/en/multiple-windows-command-line-servers.html Command to start MySQL server instances using specific option files for each. ```bash C:\> C:\mysql\bin\mysqld --defaults-file=C:\my-opts1.cnf ``` ```bash C:\> C:\mysql\bin\mysqld --defaults-file=C:\my-opts2.cnf ``` -------------------------------- ### Create a Basic Table for Partitioning Examples Source: https://dev.mysql.com/doc/refman/8.0/en/partitioning-range.html This SQL statement defines the structure of the 'employees' table, which will be used for demonstrating partitioning. Ensure no primary or unique keys are present for these specific examples. ```sql CREATE TABLE employees ( id INT NOT NULL, fname VARCHAR(30), lname VARCHAR(30), hired DATE NOT NULL DEFAULT '1970-01-01', separated DATE NOT NULL DEFAULT '9999-12-31', job_code INT NOT NULL, store_id INT NOT NULL ); ``` -------------------------------- ### Start MySQL Server on SQL Node Source: https://dev.mysql.com/doc/refman/8.0/en/mysql-cluster-install-first-start.html If RPM files were used for installation, use the supplied startup script to start the MySQL server process on the SQL node. ```bash # Example command, actual script name may vary $> systemctl start mysqld ``` -------------------------------- ### Install Plugin at Server Startup Source: https://dev.mysql.com/doc/refman/8.0/en/plugin-loading.html Use the --plugin-load-add option in a configuration file to install a plugin when the server starts. This method does not register the plugin in the mysql.plugin table. ```ini [mysqld] plugin-load-add=myplugin=somepluglib.so ``` -------------------------------- ### Startup Data Example Source: https://dev.mysql.com/doc/refman/8.0/en/audit-log-file-formats.html Demonstrates the 'startup_data' field, providing details about the audit log plugin's initialization. ```json "startup_data": { "server_id": 1, "os_version": "i686-Linux", "mysql_version": "5.7.21-log", "args": ["/usr/local/mysql/bin/mysqld", "--loose-audit-log-format=JSON", "--log-error=log.err", "--pid-file=mysqld.pid", "--port=3306" ] } ``` -------------------------------- ### Install Server with Specific Configuration Source: https://dev.mysql.com/doc/refman/8.0/en/MySQLInstallerConsole.html Installs the MySQL server with a specific version and port, and configures user credentials. The `type=user` and `type=config` blocks allow for detailed setup. ```bash MySQLInstallerConsole install server;8.0.30:*:port=3307;server_id=2:type=user;user=foo ``` -------------------------------- ### MySQL Optimizer Hint Syntax Examples Source: https://dev.mysql.com/doc/refman/8.0/en/optimizer-hints.html Illustrates the basic syntax for various optimizer hints. Ensure hints are enclosed in /*+ ... */ comments. ```sql /*+ BKA(t1) */ ``` ```sql /*+ BNL(t1, t2) */ ``` ```sql /*+ NO_RANGE_OPTIMIZATION(t4 PRIMARY) */ ``` ```sql /*+ QB_NAME(qb2) */ ``` -------------------------------- ### Starting mysqld_safe from Installation Directory Source: https://dev.mysql.com/doc/refman/8.0/en/mysqld-safe.html Execute mysqld_safe from the MySQL installation directory to allow it to find the server and databases relative to its working directory. This is a common method for binary distributions. ```bash cd _mysql_installation_directory_ bin/mysqld_safe & ``` -------------------------------- ### mysqld --initialize Source: https://dev.mysql.com/doc/refman/8.0/en/server-options.html Initializes a MySQL installation by creating the data directory and populating the mysql system schema. It is recommended to use this option with minimal other startup options. ```APIDOC ## --initialize, -I ### Description Initializes a MySQL installation. This involves creating the data directory and populating the tables within the `mysql` system schema. It is strongly recommended to use this option with only essential directory-related options like `--datadir`, `--basedir`, and potentially `--user`. ### Method Command-Line Option ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example `mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/var/lib/mysql` ### Response N/A #### Success Response (200) N/A #### Response Example N/A ```