MySQL Workbench is a unified visual tool for database architects, developers, and DBAs. MySQL Workbench provides data modeling, SQL development, and comprehensive administration tools for server configuration, user administration, backup, and much more. MySQL Workbench is available on Windows, Linux and Mac OS X.
MySQL Workbench enables a DBA, developer, or data architect to visually design, model, generate, and manage databases. It includes everything a data modeler needs for creating complex ER models, forward and reverse engineering, and also delivers key features for performing difficult change management and documentation tasks that normally require much time and effort.
For more information, you can visit https://www.mysql.com/products/workbench/.
MySQL Workbench and MariaDB Server
While MySQL Workbench is primarily designed for use with MySQL databases, it can also be used with MariaDB, a popular open-source fork of MySQL.
Since MariaDB is a fork of MySQL, MySQL Workbench can connect to and manage MariaDB databases without any significant differences in functionality. Users can perform tasks such as designing database schemas, writing SQL queries, administering user accounts, and monitoring database performance in MariaDB using MySQL Workbench in much the same way as they would with MySQL databases.
Installation
Download MySQL Workbench Community
https://dev.mysql.com/downloads/workbench
Download mysql-workbench-community_<version>-1ubuntu<version>_amd64.deb file.
You need to replace <version> with the appropriate version of your operating system.
Install the downloaded file with the Software Install application or manually.
Check and grant privileges
Launch the MariaDB client.
sudo mariadb -u root -p
Enter the password when prompted. Once logged in, check the user’s privileges.
Ensure that the ‘root’ user has the necessary privileges to connect from localhost. The following statements display the privileges granted to the MySQL/MariaDB user 'root'@'localhost'
and grant all privileges on all databases (*.*
) to the ‘root’@’localhost’ user.
SHOW GRANTS FOR 'root'@'localhost';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'your_password' WITH GRANT OPTION;
Configure MySQL Workbench with MariaDB
To configure MySQL Workbench with MariaDB, follow these steps.
- Open MySQL Workbench.
- Set up a new connection.
- Click on the ‘+’ icon next to the “MySQL Connections” in the home screen or go to Database > Connect to Database….
- Fill in the connection details.
- Connection Name: Choose a name for your connection (e.g. MariaDB).
- Connection Method: Standard TCP/IP.
- Hostname: The IP address or hostname of your MariaDB server (default is 127.0.0.1).
- Port: The port number where MariaDB is running (default is 3306).
- Username: Your MariaDB username.
- Password: Your MariaDB password.
- Test connection
- Click on the “Test Connection” button to verify that the connection details are correct and MySQL Workbench can connect to your MariaDB server.
- Click on the “OK” button to save the connection.
- Connect to MariaDB
- Click on the connection you just created.
Your new connection should appear under “MySQL Connections” in MySQL Workbench. Double-click on it to connect to your MariaDB server.
Conclusion
By following these steps, you should be able to configure MySQL Workbench to connect to your MariaDB server and start managing your databases using the graphical interface provided by MySQL Workbench.