A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mariadb.com/docs/server/server-usage/connecting/mariadb-connecting-guide-1 below:

Connecting to MariaDB Server | MariaDB Documentation

Connecting to MariaDB Server | MariaDB Documentation
  1. Server Usage
  2. Connecting
Connecting to MariaDB Server

MariaDB 101: Learning the Basics of MariaDB

This article covers connecting to MariaDB and the basic connection parameters. If you are completely new to MariaDB, take a look at A MariaDB Primer first.

In order to connect to the MariaDB server, the client software must provide the correct connection parameters. The client software will most often be the mariadb client, used for entering statements from the command line, but the same concepts apply to any client, such as a graphical client, a client to run backups such as mariadb-dump, etc. The rest of this article assumes that the mariadb command line client is used.

If a connection parameter is not provided, it will revert to a default value.

For example, to connect to MariaDB using only default values with the mariadb client, enter the following from the command line:

In this case, the following defaults apply:

These defaults can be overridden by specifying a particular parameter to use. For example:

mariadb -h 166.78.144.191 -u username -ppassword database_name

In this case:

Connect to the MariaDB server on the given host. The default host is localhost. By default, MariaDB does not permit remote logins - see Configuring MariaDB for Remote Client Access.

--password[=passwd]
-p[passwd]

The password of the MariaDB account. It is generally not secure to enter the password on the command line, as other users on the system can see it as part of the command that has been run. If you include the -p or --password option, but leave out the password, you will be prompted for it, which is more secure.

On Windows systems that have been started with the --enable-named-pipe option, use this option to connect to the server using a named pipe.

The TCP/IP port number to use for the connection. The default is 3306.

Specifies the protocol to be used for the connection for the connection. It can be one of TCP, SOCKET, PIPE or MEMORY (case-insensitive). Usually you would not want to change this from the default. For example on Unix, a Unix socket file (SOCKET) is the default protocol, and usually results in the quickest connection.

--shared-memory-base-name=name

Only available on Windows systems in which the server has been started with the --shared-memory option, this specifies the shared-memory name to use for connecting to a local server. The value is case-sensitive, and defaults to MARIADB.

For connections to localhost, this specifies either the Unix socket file to use (default /tmp/mysql.sock), or, on Windows where the server has been started with the --enable-named-pipe option, the name (case-insensitive) of the named pipe to use (default MARIADB).

A brief listing is provided below. See Secure Connections Overview and TLS System Variables for more detail.

Enable TLS for connection (automatically enabled with other TLS flags). Disable with '--skip-ssl'

CA file in PEM format (check OpenSSL docs, implies --ssl).

CA directory (check OpenSSL docs, implies --ssl).

X509 cert in PEM format (implies --ssl).

TLS cipher to use (implies --ssl).

X509 key in PEM format (implies --ssl).

Certificate revocation list (implies --ssl).

Certificate revocation list path (implies --ssl).

Verify server's "Common Name" in its cert against hostname used when connecting. This option is disabled by default.

The MariaDB user name to use when connecting to the server. The default is either your Unix login name, or ODBC on Windows. See the GRANT command for details on creating MariaDB user accounts.

It's also possible to use option files (or configuration files) to set these options. Most clients read option files. Usually, starting a client with the --help option will display which files it looks for as well as which option groups it recognizes.

This page is licensed: CC BY-SA / Gnu FDL


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4