MySQL AI User Guide
The MySQL AI Installer can also be run in command-line mode, without invoking the installation GUI. Execute the following command in the folder where you have extracted the RPMs from the MySQL AI RPM bundle:
$> sudo mysql-ai-setup --cli [options] options: --option-long-name[=value-list] | -option-short-name [value-list] value-list: value[,value[,...]]
The command options are described in groups below (use the
-h
or --help
option to see the
option descriptions):
--skip-install
: Do not install anything.
This is useful for testing system requirements and
installation options.
--skip-requirements
: Install even if the
system does not satisfy the
minimum
requirements.
MySQL AI might not work or might have performance issues if installed on a system that does not satisfy the minimum requirements.
--mysql-root-user
=username
:
User name and password for the MySQL root user.
--mysql-root-password
=password
:
Password for the MySQL root user. The password must
satisfy the MEDIUM level policy of the
validate_password
component.
--mysql-root-allow-remote-connection
: The
root user is allowed to connect from hosts other than
localhost
. See the
Warning
near the beginning of Chapter 2, Installing MySQL AI.
Check the Warning near the beginning of Chapter 2, Installing MySQL AI before installing the MySQL Shell GUI and MySQL Router (MySQL REST Service).
--install-mysql-studio
: Install the
MySQL Studio service.
--mysql-studio-port
=port#
:
Replace the default port number (8000) with another one
for MySQL Studio's server to listen for connections. A warning
is displayed if the port you entered is already in use or
will be used by another MySQL AI component.
--skip-mysql-studio
: Skip installing
MySQL Studio.
--install-mysql-shell-gui
: Install the
MySQL Shell Workbench service.
--skip-mysql-shell-gui
: Skip installing
MySQL Shell Workbench.
--mysql-shell-gui-port
=port#
:
Replace the default port number (8000) with another one
for MySQL Shell GUI web server to listen for connections.
A warning is displayed if the port you entered is already
in use or will be used by another MySQL AI component.
--skip-mysql-router
: Skip installing
MySQL Router and MySQL REST Service.
--mysql-router-port
=port#
:
Replace the default HTTPS port number (8443) with another
one for the MySQL REST Service web server to listen to connections. A
warning is displayed if the port you entered is already in
use or will be used by another MySQL AI component.
--mysql-router-jwt-secret
=jwt-secret
:
Provide a secret for JSON Web Secret (JWS) tokens. If this
option is not specified, a random secret will be created
by default.
--secure-file-priv
=filepath
:
Specify the directory for loading documents into the
vector store. The location must be configured by the
server system variable
secure_file_priv
for
mysqld to import data securely from it.
If the option is not specified, the default location is
/var/lib/mysql-files
. If you specify
a directory that does not exist, it will be created.
Configure TLS certificates for encrypted communication with each of the following components of MySQL AI.
The certificate, key, and bundle files specified must be
readable by root
user who installs
MySQL AI; adjust their file permissions if needed.
The certificate, key, and bundle files must not be passphrase protected.
A file path to a certificate bundle file is expected in
the *-certificate
option. However, the
path can also point to either a certificate file or a
bundle file that does not contain the private key, in
which case use the *-private-key
to
provide the file path for the private key or, for the
PEM format only, the actual key string.
Certificates for MySQL Server.
Provide the certificate and private key in PEM or PKSC#12
format for communication with MySQL Server using the
mysql
and mysqlx
protocols. If no certificate is supplied, a self-signed
certificate is generated.
--mysql-server-tls-certificate
=filepath
:
Location of the certificate bundle used for HTTPS
communication by MySQL Server.
--mysql-server-tls-private-key
=filepath
:
The private key used for HTTPS communication by MySQL
Server. This option is needed only if
--mysql-server-tls-certificate
points to
a certificate file, or a bundle file that does not contain
the private key. Provide with this option the file path
for the private key or, for PEM format only, the actual
key string.
Certificates for AI Plugin and Machine Learning Services. Provide the certificates in PEM or PKSC#12 format. Two distinct certificate bundles are required for the two components. If no certificates and keys are provided for any of the two components, encrypted communication with the component is disabled, unless self-signed certificates, with specified common names, are requested.
--skip-ai-encryption
: Use this option to
explicitly turn off encryption for communication with the
AI plugin and Machine Learning services. If this command
line option is absent, installer will quit without
installing MySQL AI unless certificates are provided or
self-signed certificates are requested (see options
below).
--ai-plugin-certificate
=filepath
:
Location of the certificate bundle used for HTTPS
communication with the AI plugin.
--ai-plugin-private-key
=filepath
:
The private key used for HTTPS communication with the AI
plugin. This option is needed only if
--ai-plugin-certificate
points to a
certificate file, or a bundle file that does not contain
the private key. Provide with this option the file path
for the private key or, for PEM format only, the actual
key string.
--ai-plugin-common-name
=string
:
Common name for the certificate for communication with the
AI plugin. This option is only needed if you want to
correct the installer's reading of the common name from
your certificate.
--ai-plugin-create-self-signed-certificate
=Common_Name
:
Create a self-signed certificate for communication with
the AI plugin with the common name specified by this
option.
--ai-services-certificate
=filepath
:
Location of the certificate bundle used for HTTPS
communication with the Machine Learning Service.
--ai-services-private-key
=filepath
.
The private key used for HTTPS communication with the AI
plugin. This option is needed only if
--ai-services-certificate
points to a
certificate file, or a bundle file that does not contain
the private key. Provide with this option the file path
for the private key or, for the PEM format only, the
actual key string.
--ai-services-common-name
=string
:
Common name for the certificate for communication with the
Machine Learning service. This option is only needed if
you want to correct the installer's reading of the common
name from your certificate.
--ai-services-create-self-signed-certificate
=Common_Name
:
Create a self-signed certificate for communication with
the Machine Learning service with the common name
specified by this option.
Certificates for MySQL Studio, MySQL Shell Workbench, and MySQL Router (MySQL REST Service): Provide the certificate and private key in PEM or PKSC#12 format. If either of the certificates is not supplied, a self-signed certificate will be created for the respective service.
--mysql-studio-https-certificate
=filepath
:
Location of the certificate bundle used for HTTPS
communication by the MySQL Studio.
--mysql-studio-https-private-key
=filepath
:
The private key used for HTTPS communication by MySQL Studio.
This option is needed only if
--mysql-studio-https-certificate
points
to a certificate file, or a bundle file that does not
contain the private key. Provide with this option the file
path for the private key or, for the PEM format only, the
actual key string.
--mysql-shell-https-certificate
=filepath
:
Location of the certificate bundle used for HTTPS
communication by the MySQL Shell Workbench service.
--mysql-shell-https-private-key
=filepath
:
The private key used for HTTPS communication by the MySQL Shell Workbench
service. This option is needed only if
--mysql-shell-https-certificate
points to
a certificate file, or a bundle file that does not contain
the private key. Provide with this option the file path
for the private key or, for the PEM format only, the
actual key string.
--mysql-router-https-certificate
=filepath
:
Location of the certificate bundle used for HTTPS
communication by MySQL Router (MySQL REST Service).
--mysql-router-https-private-key
=filepath
:
The private key used for HTTPS communication by MySQL Router
(MySQL REST Service). This option is needed only if
--mysql-router-https-certificate
points
to a certificate file, or a bundle file that does not
contain the private key. Provide with this option the file
path for the private key or, for the PEM format only, the
actual key string.