MySQL on Linux

Installing MySQL Server on Ubuntu

sudo apt-get update
sudo apt-get install mysql-server

The below command can be used to install MySQL if the above command does not work

sudo mysql_secure_installation utility

Allow remote access to the application

The below command can be used to allow remote access to the mysql server:

sudo ufw enable
sudo ufw allow mysql

Open the MySQL application

The below command will start the MySQL application

sudo systemctl start mysql

Start the MySQL shell

The below command starts the MySQL shell

/usr/bin/mysql -u root -p

Installing MySQL Workbench

Step 1: Download - The URL to download is:

Download the 'mysql-apt-config_0.8.15-1_all.deb'

Click on the Download option.

Step 2: Installation of MySQL Workbench

Use the below command to add the MySQL repository URLs in the sources list so that the software can be installed in the right directory.

sudo apt install ./mysql-apt-config_0.8.16-1_all.deb

Step 3: Update apt-cache

Update the cache using the below command to update the configuration URLs.

sudo apt update

Step 4: Installing MySQL Workbench on Ubuntu

Install MySQL workbench using the repository using the below command

sudo apt install mysql-workbench-community

Step 5: Launch MySQL Workbench

Once the installation is completed, launch MySQL using the below command

Did you find this page helpful?
Start with GraphQL on Hasura for Free
  • ArrowBuild apps and APIs 10x faster
  • ArrowBuilt-in authorization and caching
  • Arrow8x more performant than hand-rolled APIs
footer illustration
Brand logo
© 2024 Hasura Inc. All rights reserved