Mariadb database

MariaDB configuration file is written as a MariaDB client options file.

You can see the parameters available at https://mariadb.com/kb/en/configuring-mariadb-connectorc-with-option-files/#options.

Most of the time, though, you would likely use only a few of those options, as in (for local connection):
[client]
user=myuser
password=mypwd 
database=mydb
socket=/run/mysqld/mysqld.sock

The above file has fields "user" (MariaDB user), "password" (the password for MariaDB user), "database" (the MariaDB database name) and MariaDB communication "socket" location (assuming your database is local to your computer - if the database is across network you would not use sockets!).

If you use passwordless MariaDB login (such as when the MariaDB user name is the same as your Operating System user name and where unix socket plugin is used for authentication), the password would be empty.

To get the location of the socket, you might use:
 sudo mysql -u root -e "show variables like 'socket'"

See also
Database
begin-transaction  
commit-transaction  
current-row  
database-config-file  
db-error  
mariadb-database  
postgresql-database  
rollback-transaction  
run-query  
sqlite-database  
See all
documentation


Copyright (c) 2019-2024 Gliim LLC. All contents on this web site is "AS IS" without warranties or guarantees of any kind.