# Install & Connect — MySQL

Source: https://www.geekswithgeeks.com/en/mysql/sql-install-connect

> Get MySQL running and reach it from the command line.

## Installing MySQL

Install the server, then confirm it's running.

```bash
# Ubuntu
sudo apt install mysql-server
sudo systemctl start mysql

# macOS
brew install mysql
brew services start mysql
```

## Connecting with the CLI

The `mysql` client connects to a running server.

```bash
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.
