MySQL Getting Started
Get started with MySQL: choose a supported server version, install on Windows, macOS, or Linux, connect to your server, and practice with a sample database.
This guide helps you install MySQL, connect to the database server, and run your first SQL queries. If you are starting a new deployment, consult the official MySQL downloads and MySQL 8.4 reference manual to choose an appropriate, supported release. Installation packages and installer screens can change between versions.
Choose your platform
- Install MySQL on Windows — server setup and initial configuration
- Install MySQL on macOS — macOS installation walkthrough
- Install MySQL on Ubuntu — setup on Ubuntu Linux
- Install MySQL on CentOS — an older CentOS-based walkthrough; confirm that the OS and MySQL versions shown there remain supported before following its commands
For modern RPM-based Linux installations, prefer the official MySQL Yum repository instructions. For Ubuntu and other Debian-based platforms, review the MySQL APT repository instructions.
Connect and verify your installation
After installing the server, follow Connect to MySQL and run a simple query:
SELECT VERSION() AS mysql_version, CURRENT_USER() AS authenticated_user;
VERSION() shows the running server version. CURRENT_USER() shows the MySQL account used for privilege checking; it can differ from the name supplied when connecting.
Practice with a sample database
Read the sample database guide to explore tables and queries. Also see the official Sakila sample database, a separate MySQL sample dataset used for exercises.
Next step: start with the MySQL introduction, then connect to a server and practice selecting rows, filtering results, and joining tables.
-
Introduction to MySql
This article introduces what is a database and what is MySQL。 -
Install MySQL on Windows
Legacy Windows instructions for MySQL 8.0 using the classic MySQL Installer. MySQL 8.0 reached end of life in April 2026; use the current MSI and Configurator guide for MySQL 9.7. -
Install MySQL on MacOS
Legacy macOS instructions for MySQL 8.0. MySQL 8.0 reached end of life in April 2026, and the unversioned Homebrew formula does not pin MySQL 8.0. -
Install MySQL on CentOS
Legacy instructions for MySQL 8.0 on CentOS Linux 7 and 8. Both CentOS releases and MySQL 8.0 reached end of life; use a maintained system for new deployments. -
Install MySQL on Ubuntu
Legacy instructions for MySQL 8.0 on Ubuntu. MySQL 8.0 reached end of life in April 2026; use a maintained MySQL LTS series for new installations. -
Connect to MySQL
Connect to MySQL locally or remotely from the command line or Workbench, select a database, verify the session, and troubleshoot common errors. -
Sample Database
This article introduces the Sakila sample database used in this tutorial.