How To Install MySQL Server & MySQL Workbench on Ubuntu Linux (2025)

How To Install MySQL Server & MySQL Workbench on Ubuntu Linux (2025)

How to Install MySQL Server and MySQL Workbench on Ubuntu 24.04 LTS Linux br Learn how to install *MySQL Server* and *MySQL Workbench* on Ubuntu 24.04 LTS Linux in this comprehensive tutorial. This step-by-step guide will walk you through installing the MySQL database server and its graphical user interface (GUI) client for managing your databases efficiently. br br ---br br What is MySQL? br *MySQL* is a widely used open-source relational database management system. It’s ideal for web applications, data analysis, and enterprise solutions. MySQL Workbench complements it with a GUI for database modeling, SQL development, and server administration. br br ---br br Steps to Install MySQL Server br br #### 1. *Update System Packages* br Start by updating your package lists: br ```bashbr sudo apt update && sudo apt upgrade -ybr ``` br br #### 2. *Install MySQL Server* br Install the MySQL Server package using the following command: br ```bashbr sudo apt install mysql-server -ybr ``` br br #### 3. *Secure MySQL Installation* br Run the MySQL security script to configure recommended security settings: br ```bashbr sudo mysqlsecureinstallationbr ``` br Follow the prompts to set up a root password, remove anonymous users, disallow root login remotely, and remove test databases. br br #### 4. *Verify MySQL Installation* br Check if MySQL is running: br ```bashbr sudo systemctl status mysqlbr ``` br Login to MySQL to confirm: br ```bashbr sudo mysql -u root -pbr ``` br br ---br br Steps to Install MySQL Workbench br br #### 1. *Add MySQL APT Repository* br Download and add the MySQL APT repository to ensure you get the latest version of Workbench: br ```bashbr wget br sudo dpkg -i mysql-apt-config0.8.25-1all.debbr sudo apt updatebr ``` br br #### 2. *Install MySQL Workbench* br Install MySQL Workbench with the following command: br ```bashbr sudo apt install mysql-workbench -ybr ``` br br #### 3. *Launch MySQL Workbench* br You can start MySQL Workbench from the applications menu or by running: br ```bashbr mysql-workbenchbr ``` br br ---br br Testing Your Installation br br #### 1. *Connect to MySQL Server* br Open MySQL Workbench. br Click on *+* to create a new connection. br Enter your credentials (e.g., root user and password). br Test the connection and save. br br #### 2. *Run SQL Queries* br Use the SQL editor to run queries and manage your databases. br br ---br br Additional Tips br Regularly update MySQL and Workbench for new features and security patches: br ```bashbr sudo apt update && sudo apt upgradebr ``` br Use MySQL Workbench for database design, query optimization, and server management. br Monitor your database performance and set up proper backup solutions. br br With MySQL Server and Workbench installed on Ubuntu 24.04 LTS, you're all set to build and manage robust databases.


User: online

Views: 9

Uploaded: 2024-12-28

Duration: 17:45