MariaDB – How to Change Database in SSH Updated on June 12, 2023 by InMotion Hosting Contributor 1 Minutes, 29 Seconds to Read Working with MariaDB is in many ways the same as working with MySQL. You will be using a lot of the same commands and operations. As you may already know from working in MySQL, you must select a database to work with in order to perform various functions. Of course, you cannot work on multiple databases at once, you must select which database at a time with which you will be working. So in this article, you will see how to select and change an active database in MariaDB. How to Change Databases on the MariaDB Command Line How To Exit MariaDB Command Line How to Change Databases on the MariaDB Command Line First, you must log into your server using SSH. Then, as usual, log into the MariaDB command prompt: mysql -u <username> -p Replace <username> with your actual username and provide your password. In case you can’t remember the specific name of the database you want to use, you can always show databases with this command: SHOW DATABASES; You can both select and switch between databases using the “use” command, as seen below: USE <databasename>; At any point during your work you can “show” all databases with SHOW DATABASES; and select a different database with USE <databasename>; — of course, substituting <databasename> with the actual name of the database you want to use. How To Exit MariaDB Command Line Now that you have completed your work on the command line, you will want to exit the MariaDB command prompt and return to your standard shell prompt. For most terminal emulators, you can exit the MariaDB command line by pressing Ctrl-D on your keyboard or type exit in lower case and hit <Return> or <Enter>. Share this Article InMotion Hosting Contributor Content Writer InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals! More Articles by InMotion Hosting Related Articles How To Create a PHP Redirect (301, 302, and Dynamic Redirect Examples) Connect to SFTP for Shared Hosting Accounts Using FileZilla FTP Basics for Dedicated Servers How to Install Jekyll and Launch a New Site How to Host AI-Prompt Generated Websites on Shared Hosting What is your default PHP.ini file? Getting Started Guide: FTP Configuring your site in WS_FTP Schedule Social Media Posts With Buffer FTP Error – 421 Too Many Connections