Installs and configures a MySQL Server instance on a Windows machine so you can create and manage databases locally.
Local MySQL lets you prototype features, run integration tests, and analyze data without touching production. Windows users can leverage native tools like Workbench while keeping data secure on their own laptops.
Ensure you have administrative rights, Windows 10/11, and at least 2 GB free disk space.Disable any old MySQL or MariaDB services to avoid port 3306 conflicts.
Use the "MySQL Installer for Windows" (full ≈ 400 MB, web ≈ 2 MB). The installer bundles Server, Workbench, Shell, and Connector/ODBC.
1. Download mysql-installer-community-x.x.xx.x.msi
. 2. Launch as Administrator. 3. Select "Developer Default" for all tools. 4. Accept license, then let the installer fetch packages.
• Type: Standalone. • Port: 3306 (keep default).• Auth: "Use Strong Password Encryption".
• Root password: choose >= 12 chars. • Accounts: optionally add ecom_admin
user.
"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld" --initialize --console
generates the data directory.mysqld --install MySQL80
registers Windows service.net start MySQL80
starts the server.
Open PowerShell and run mysql -u root -p
. After entering your password, check with SHOW DATABASES;
.You should see mysql
, performance_schema
, and others.
Run:
CREATE DATABASE ecommerce;
USE ecommerce;
Then create tables like Customers
, Orders
, Products
, and OrderItems
.
• Store root credentials in a password manager.
• Create least-privileged users for apps.
• Enable automated Windows services start-up.
• Backup data\
folder or use mysqldump
.
Port already in use: Stop conflicting services or change MySQL port.
Forgotten root password: Start mysqld with --skip-grant-tables
, reset password, then restart normally.
Stop the service (net stop MySQL80
), remove it (sc delete MySQL80
), uninstall via "Apps & Features", then delete C:\ProgramData\MySQL\
.
.
Yes, the Community Edition and its installer are free and open source under the GPL.
Yes. Install each version in a separate directory, initialize with unique --datadir
, and assign distinct ports and service names.
If you used mysqld --install
or completed the installer wizard, the Windows service starts automatically on boot. Verify with services.msc
.