Learn Databases MYSQL
2 min readJun 15, 2024
Sure! Here’s a guide on how to learn and use databases with XAMPP using the command prompt. This guide assumes you have XAMPP installed on your system.
Step 1: Install XAMPP
- Download XAMPP: You can download XAMPP from the official website.
- Install XAMPP: Follow the installation instructions. Choose the components you need, typically you will need Apache and MySQL.
Step 2: Start Apache and MySQL
- Open XAMPP Control Panel: Start the XAMPP Control Panel from your Start Menu or Desktop shortcut.
- Start Apache and MySQL: Click the “Start” button next to Apache and MySQL modules. Ensure both are running (indicated by green highlighting).
Step 3: Open Command Prompt
- Open Command Prompt: You can open the command prompt by pressing
Win + R
, typingcmd
, and pressingEnter
.
Step 4: Log in to MySQL
Step 5: Basic MySQL Commands
Here are some basic commands to get you started:
- Show databases:
SHOW DATABASES;
2. Create a database:
CREATE DATABASE mydatabase;
3. Select a database:
USE mydatabase;
4. Export Databases MySQL
C:\Users\LEGION>
mysqldump -u [username] -p [database_name] > [output_file].sql
4. Exit:
EXIT;
By following these steps, you should be able to set up and use a MySQL database using XAMPP and the command prompt. Happy learning! HermantoXYZ (Andi Hermanto)