Up to 50% off all plan, limited-time offer. Starting at $2.48.

MariaDB

Open-source relational database management system, forked from MySQL.

Verify Installation

mariadb --version

Access MariaDB Shell

As root:

mariadb -u root -p

Password is securely stored in /root/.cloudzy-creds

Connect to a Specific Database as a User

mariadb -u <username> -p -D <database> -h <host> -P <port>
  • -U <username> → Database user
  • -p → Prompt for the user’s password
  • -D <database> → Database name to connect to
  • -h <host> → Hostname of the MariaDB server (e.g., localhost)
  • -P <port> → Port (default: 3306)

Common MySQL Commands

  • SHOW DATABASES;: List all databases
  • USE DB_NAME;: Switch to a database
  • SHOW TABLES;: List tables in the database
  • DESCRIBE TABLE_NAME;: Show table structure
  • SELECT * FROM TABLE_NAME;: View table data
  • EXIT;: Quit MySQL shell

Important Files & Directories

  • /root/.cloudzy-creds → Stored database credentials
  • /etc/mysql/ → MySQL configuration files
  • /var/lib/mysql/ → Database data files
  • /var/log/mysql/ → Log files

Service Management

systemctl status mariadb
systemctl restart mariadb

Currently unavailable.

Application Details