Lesson 2 / 28
Install & Connect
Get MySQL running and reach it from the command line.
Installing MySQL
Install the server, then confirm it's running.
# Ubuntu
sudo apt install mysql-server
sudo systemctl start mysql
# macOS
brew install mysql
brew services start mysqlConnecting with the CLI
The mysql client connects to a running server.
mysql -u root -p
Output:
mysql>
GUI clients
Tools like MySQL Workbench or DBeaver give you a visual table browser and query editor — handy alongside the CLI.