Membuat Database MYSQL di XAMPP menggunakan CMD
Summary
TLDRThis tutorial demonstrates how to create a MySQL database using the command prompt in XAMPP. The video walks viewers through the entire process, from installing XAMPP to using commands like 'create database', 'create table', and 'insert' to manage data. It covers essential operations such as displaying tables, updating, deleting data, and even dropping a database. Ideal for beginners, it provides a clear, step-by-step guide on managing databases with MySQL in a local server environment using CMD.
Takeaways
- 😀 Make sure you have XAMPP (or similar) installed on your computer to work with MySQL databases through the command prompt.
- 😀 You can open XAMPP's control panel, but you only need to run MySQL, not Apache, to create and manage databases.
- 😀 To access MySQL through the command prompt, navigate to your XAMPP installation folder and use the command 'mysql -u root'.
- 😀 The latest versions of MySQL have been replaced by MariaDB, so you will see 'MariaDB' instead of 'MySQL' in newer XAMPP versions.
- 😀 Use the 'SHOW DATABASES;' command to view existing databases in MySQL/MariaDB.
- 😀 To create a new database, use the command 'CREATE DATABASE <database_name>;' followed by 'SHOW DATABASES;' to verify creation.
- 😀 Once the database is created, use the 'USE <database_name>;' command to start working within that database.
- 😀 To create tables within your database, use the 'CREATE TABLE <table_name> (...);' command and define the columns and their data types.
- 😀 To insert data into a table, use the 'INSERT INTO <table_name> (columns) VALUES (...);' command with the appropriate values.
- 😀 You can update data in the table using the 'UPDATE <table_name> SET column = value WHERE condition;' command.
- 😀 To delete specific data, use the 'DELETE FROM <table_name> WHERE condition;' command. To remove an entire database, use 'DROP DATABASE <database_name>;'
Q & A
What is the purpose of this tutorial?
-The tutorial demonstrates how to create a MySQL database using the command prompt (CMD) in XAMPP.
What software do I need to have installed before starting the process?
-You need to have XAMPP installed on your computer. This software package includes MySQL, Apache, and other necessary components for web development.
How do I start MySQL in XAMPP?
-To start MySQL in XAMPP, open the XAMPP Control Panel and start MySQL. You don’t need to start Apache unless you want to run a web server.
How do I open MySQL using the command prompt?
-Navigate to the XAMPP directory (e.g., `C:/xampp/`), then to the `mysql/bin/` folder using the `cd` command. After that, run the `mysql -u root` command to enter the MySQL prompt.
What is the purpose of the `show databases` command?
-The `show databases` command lists all the existing databases in MySQL, allowing you to see which databases are available on your system.
What command is used to create a new database in MySQL?
-The command used to create a new database is `CREATE DATABASE` followed by the database name. For example, `CREATE DATABASE studentDB;`.
What does the `USE` command do in MySQL?
-The `USE` command selects a specific database to work with. Once executed, all further operations will be performed on the selected database.
How do you create a table in MySQL?
-To create a table, you use the `CREATE TABLE` command followed by the table name and the column definitions. For example, `CREATE TABLE student_data (NISN INT(4) NOT NULL, name VARCHAR(50), ...);`.
What does the `INSERT INTO` command do in MySQL?
-The `INSERT INTO` command is used to add data into a table. For example, `INSERT INTO student_data (NISN, name, class, address) VALUES (101, 'Naura', '2PGL1', 'Pamekasan');`.
How can you modify an existing record in MySQL?
-You can modify a record using the `UPDATE` command. For example, `UPDATE student_data SET name = 'Naura Safarani' WHERE NISN = 101;` will change the name of the student with NISN 101.
How do you delete a record in MySQL?
-To delete a record, you use the `DELETE` command with a `WHERE` clause. For example, `DELETE FROM student_data WHERE NISN = 101;` will remove the student with NISN 101.
What happens if you use the `DROP DATABASE` command?
-The `DROP DATABASE` command completely deletes a database and all its associated tables. For example, `DROP DATABASE studentDB;` will remove the `studentDB` database from MySQL.
Outlines

此内容仅限付费用户访问。 请升级后访问。
立即升级Mindmap

此内容仅限付费用户访问。 请升级后访问。
立即升级Keywords

此内容仅限付费用户访问。 请升级后访问。
立即升级Highlights

此内容仅限付费用户访问。 请升级后访问。
立即升级Transcripts

此内容仅限付费用户访问。 请升级后访问。
立即升级浏览更多相关视频

Create Database Using XAMPP Server/MYSQL |Updated 2023|

Learn Basic Data Definition Language DDL Commands in MySQL With CMD Query

How to connect to XAMPP MySQL from VSCode Easily (2024)

Cara Membuat Koneksi PHP ke Database Mysql 2024 (How To Make PHP Connect To Mysql Database 2024)

manipulasi DBMS dari CMD part- 1

Konfigurasi Database Server - Administrasi Sistem Jaringan (ASJ)
5.0 / 5 (0 votes)