Bagaimana cara saya menginstal mysql di pc saya?

Database relasional mengatur data dalam tabel. Tabel memiliki baris (atau catatan) dan kolom (atau bidang). Tabel terkait berdasarkan kolom umum untuk menghilangkan redundansi data dan memastikan integritas data

Sistem Manajemen Basis Data Hubungan Populer (RDBMS) termasuk

  • Oracle komersial, IBM DB2, Microsoft SQL Server dan Access, SAP Hana
  • MySQL sumber terbuka, PostgreSQL, mariaDB, Apache Derby Tertanam (Java DB), mSQL (mini-SQL), SQLite, Basis Apache OpenOffice, dan mongoDB (non-relasional)

Struktur Query Language (SQL)

Bahasa pemrograman tingkat tinggi, yang disebut Structure Query Language (SQL), dirancang untuk berinteraksi dengan database relasional. SQL mendefinisikan sekumpulan perintah, seperti

// Change directory to the MySQL's binary directory
// Suppose that your MySQL is installed in "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
// Initialize the database. Create a root user with random password. Show the messages on console
mysqld --initialize --console
......
..... [Note] A temporary password is generated for root@localhost: xxxxxxxx
6,
// Change directory to the MySQL's binary directory
// Suppose that your MySQL is installed in "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
// Initialize the database. Create a root user with random password. Show the messages on console
mysqld --initialize --console
......
..... [Note] A temporary password is generated for root@localhost: xxxxxxxx
7,
// Change directory to the MySQL's binary directory
// Suppose that your MySQL is installed in "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
// Initialize the database. Create a root user with random password. Show the messages on console
mysqld --initialize --console
......
..... [Note] A temporary password is generated for root@localhost: xxxxxxxx
8,
// Change directory to the MySQL's binary directory
// Suppose that your MySQL is installed in "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
// Initialize the database. Create a root user with random password. Show the messages on console
mysqld --initialize --console
......
..... [Note] A temporary password is generated for root@localhost: xxxxxxxx
9,
-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
0,
-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
1, dan lain-lain

Edgar F. Codd dari IBM mengusulkan Model Basis Data Relasional pada tahun 1970. SQL, salah satu bahasa pemrograman awal, kemudian dikembangkan oleh Donald D. Chamberlin dan Raymond F. Boyce di IBM pada awal 1970-an. Oracle, kemudian, membawanya ke ketinggian baru

ANSI (American National Standard Institute) menetapkan standar SQL pertama pada tahun 1986 (SQL-86 atau SQL-87) - diadopsi oleh ISO/IEC sebagai "ISO/IEC 9075" - diikuti pada tahun 1989 (SQL-89), 1992 (SQL- . 2003), 2006 (SQL. 2006), 2011 (SQL. 2011) dan 2016 (SQL. 2016). Namun, sebagian besar vendor database memiliki arahan sendiri, mis. g. , PL/SQL (Oracle), Transact-SQL (Microsoft, SAP), PL/pgSQL (PostgreSQL)

SQL Dengan Contoh

Sistem basis data relasional mengatur data dalam hierarki berikut

  1. Sebuah sistem database relasional berisi banyak database
  2. Database terdiri dari tabel
  3. Tabel memiliki baris (atau catatan) dan kolom (atau bidang)

Misalkan kita memiliki database bernama

-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
_2, sebuah tabel bernama
-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
3 dalam database dengan 3 kolom (
-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
4,
-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
5,
-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
6) dan 4 baris seperti ilustrasi di bawah ini. Setiap kolom memiliki tipe data. Kami memilih.
-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
_7 (bilangan bulat) untuk kolom
-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
4,
-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
9 (string panjang variabel hingga 50 karakter) untuk
-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
5, dan
XXXXXX XX:XX:XX [Note] mysqld: Normal shutdown
......
XXXXXX XX:XX:XX  InnoDB: Starting shutdown...
XXXXXX XX:XX:XX  InnoDB: Shutdown completed; log sequence number 0 44233
......
XXXXXX XX:XX:XX [Note] mysqld: Shutdown complete
(You may need to press ENTER to get the command prompt?!)
1 (angka floating-point) untuk
-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
6

Database: studentdb
Table: class101
+-----------+--------------------+-------------+
| id (INT)  | name (VARCHAR(50)) | gpa (FLOAT) |
+-----------+--------------------+-------------+
|   1001    | Tan Ah Teck        |  4.5        |
|   1002    | Mohammed Ali       |  4.8        |
|   1003    | Kumar              |  4.8        |
|   1004    | Kevin Jones        |  4.6        |
+-----------+--------------------+-------------+

SQL (Structure Query Language) mendefinisikan sekumpulan perintah intuitif (seperti

// Change directory to the MySQL's binary directory
// Suppose that your MySQL is installed in "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
// Initialize the database. Create a root user with random password. Show the messages on console
mysqld --initialize --console
......
..... [Note] A temporary password is generated for root@localhost: xxxxxxxx
6,
// Change directory to the MySQL's binary directory
// Suppose that your MySQL is installed in "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
// Initialize the database. Create a root user with random password. Show the messages on console
mysqld --initialize --console
......
..... [Note] A temporary password is generated for root@localhost: xxxxxxxx
7,
// Change directory to the MySQL's binary directory
// Suppose that your MySQL is installed in "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
// Initialize the database. Create a root user with random password. Show the messages on console
mysqld --initialize --console
......
..... [Note] A temporary password is generated for root@localhost: xxxxxxxx
9,
// Change directory to the MySQL's binary directory
// Suppose that your MySQL is installed in "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
// Initialize the database. Create a root user with random password. Show the messages on console
mysqld --initialize --console
......
..... [Note] A temporary password is generated for root@localhost: xxxxxxxx
8) untuk berinteraksi dengan sistem database relasional

PILIH
MENGHAPUS
MENYISIPKAN
MEMPERBARUI
BUAT TABEL
TABEL JATUH
Catatan
  1. Sensitivitas Kasus. Kata kunci SQL, nama (pengidentifikasi), string mungkin peka huruf besar-kecil atau tidak, tergantung pada penerapannya
    • Di MySQL, kata kunci TIDAK peka huruf besar-kecil. Untuk lebih jelasnya, saya tampilkan kata kunci dalam HURUF BESAR di artikel ini
    • Untuk pemrogram, yang TERBAIK adalah memperlakukan nama (pengidentifikasi) dan string sebagai case-sensitive
      (Di MySQL, nama kolom selalu tidak peka huruf besar/kecil; tetapi nama tabel peka huruf besar kecil di Unix, tetapi tidak peka huruf besar kecil di Windows (bingung. ). Sensitivitas huruf besar-kecil dalam perbandingan string tergantung pada urutan susunan yang digunakan (?. ). )
  2. Rangkaian. String SQL diapit oleh tanda kutip tunggal. Tetapi sebagian besar implementasi (seperti MySQL) menerima tanda kutip tunggal dan ganda

Pengantar MySQL Relational Database Management System (RDBMS)

SQL adalah bahasa pemrograman untuk berinteraksi dengan basis data relasional. Di sisi lain, MySQL adalah perangkat lunak - Sistem Manajemen Basis Data Relasional

MySQL adalah salah satu Relational Database Management System (RDBMS) yang paling banyak digunakan, kekuatan industri, sumber terbuka, dan gratis. MySQL dikembangkan oleh Michael "Monty" Widenius dan David Axmark pada tahun 1995. Itu dimiliki oleh sebuah perusahaan Swedia bernama MySQL AB, yang dibeli oleh Sun Microsystems pada tahun 2008. Sun Microsystems diakuisisi oleh Oracle pada tahun 2010

MySQL sukses, bukan hanya karena gratis dan open-source (ada banyak database gratis dan open-source, seperti PostgreSQL, Apache Derby (Java DB), mSQL (mini SQL), SQLite dan Apache OpenOffice's Base), tetapi . MySQL mendukung semua fitur yang diharapkan dalam database relasional berkinerja tinggi, seperti transaksi, kunci asing, replikasi, subkueri, prosedur tersimpan, tampilan, dan pemicu

MySQL sering digunakan di lingkungan LAMP (Linux-Apache-MySQL-PHP), WAMP (Windows-Apache-MySQL-PHP), atau MAMP (macOS-Apache-MySQL-PHP). Semua komponen di LAMP gratis dan open-source, termasuk Sistem Operasi

Situs induk untuk MySQL adalah https. // www. mysql. com. Referensi utama untuk MySQL adalah "Manual Referensi MySQL", tersedia di https. //dev. mysql. com/doc. Manual referensi sangat besar - PDF memiliki lebih dari 3700 halaman

Bagaimana cara saya menginstal mysql di pc saya?

MySQL beroperasi sebagai sistem client-server melalui jaringan TCP/IP. Server berjalan pada mesin dengan alamat IP pada nomor port TCP yang dipilih. Nomor port TCP default untuk MySQL adalah 3306. Pengguna dapat mengakses server melalui program klien, menghubungkan ke server pada alamat IP dan nomor port TCP yang diberikan

MariaDB

Diambil dari Wiki. MariaDB adalah garpu sistem manajemen basis data relasional MySQL (RDBMS) yang dikembangkan oleh komunitas dan didukung secara komersial, dimaksudkan untuk tetap bebas dan perangkat lunak sumber terbuka di bawah Lisensi Publik Umum GNU. Pengembangan dipimpin oleh beberapa pengembang asli MySQL, yang bercabang karena kekhawatiran atas akuisisi oleh Oracle Corporation pada tahun 2009.

Cara Instal MySQL 8. 0 dan Mulai dengan Pemrograman SQL

Saya ingin Anda menginstal MySQL di mesin Anda sendiri, karena saya ingin Anda mempelajari cara menginstal, menyesuaikan, dan mengoperasikan sistem perangkat lunak industri yang kompleks. Instalasi bisa menjadi bagian tersulit dalam latihan ini

Langkah 0. Buat direktori untuk menyimpan semua karya Anda

PENTING. Sebelum memulai, periksa apakah Anda memiliki beberapa GB Ruang Kosong

Buat direktori untuk menyimpan semua karya Anda

  • (Untuk Windows) "
    XXXXXX XX:XX:XX [Note] mysqld: Normal shutdown
    ......
    XXXXXX XX:XX:XX  InnoDB: Starting shutdown...
    XXXXXX XX:XX:XX  InnoDB: Shutdown completed; log sequence number 0 44233
    ......
    XXXXXX XX:XX:XX [Note] mysqld: Shutdown complete
    (You may need to press ENTER to get the command prompt?!)
    7"
  • (Untuk macOS/Linux) "
    XXXXXX XX:XX:XX [Note] mysqld: Normal shutdown
    ......
    XXXXXX XX:XX:XX  InnoDB: Starting shutdown...
    XXXXXX XX:XX:XX  InnoDB: Shutdown completed; log sequence number 0 44233
    ......
    XXXXXX XX:XX:XX [Note] mysqld: Shutdown complete
    (You may need to press ENTER to get the command prompt?!)
    8" di mana "
    XXXXXX XX:XX:XX [Note] mysqld: Normal shutdown
    ......
    XXXXXX XX:XX:XX  InnoDB: Starting shutdown...
    XXXXXX XX:XX:XX  InnoDB: Shutdown completed; log sequence number 0 44233
    ......
    XXXXXX XX:XX:XX [Note] mysqld: Shutdown complete
    (You may need to press ENTER to get the command prompt?!)
    9" menunjukkan direktori home Anda
// For Windows: Use "C:\myWebProject"
// Launch a "CMD" and issue these commands:
c:
cd \
mkdir myWebProject

// For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
// Launch a "Terminal" and issue these commands:
cd
mkdir myWebProject

Gunakan antarmuka grafis Anda, mis. g. , File Explorer (Windows), atau Finder (macOS) untuk memverifikasi direktori ini. (Tentu saja Anda dapat menggunakan antarmuka grafis Anda untuk membuat direktori ini. )

Untuk pemula. Penting untuk mengikuti langkah ini. Jika tidak, Anda tidak akan sinkron dengan artikel ini dan tidak akan dapat menemukan file Anda nanti

Langkah 1. Unduh dan Instal MySQL

Untuk Windows

  1. Unduh MySQL Community Server "ZIP ARCHIVE" dari https. //dev. mysql. com/unduh/mysql/
    1. Di bawah tab "Rilis Ketersediaan Umum (GA)".
    2. Di bawah "MySQL Community Server 8. 0. {xx}", di mana {xx} adalah nomor pembaruan terbaru ⇒ Di "Pilih Sistem Operasi", pilih "Microsoft Windows"
    3. Di bawah "Unduhan Lainnya", unduh "Windows (x86, 64-bit), ZIP ARCHIVE (sekitar 223MB) (
      -- Change the current directory to MySQL's binary directory.
      -- Assume that the MySQL is installed in "c:\myWebProject\mysql".
      c:
      cd \myWebProject\mysql\bin
         
      -- Start a client as superuser "root" (-u), and prompt for password (-p)
      mysql -u root -p
      Enter password:   // Enter the root's password set during installation.
      Welcome to the MySQL monitor.  Commands end with ; or \g.
      Your MySQL connection id is 1
      Server version: 8.0.xx
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      
      mysql>
      -- Client started. The prompt changes to "mysql>".
      -- You can now issue SQL commands such as SELECT, INSERT and DELETE.
      0)"
    4. Di bawah "MySQL Community Downloads", TIDAK perlu "Login" atau "Sign up" - Cukup klik "No thanks, just start my downloads". "
  2. UNZIP file yang diunduh ke direktori proyek Anda "
    -- Change the current directory to MySQL's binary directory.
    -- Assume that the MySQL is installed in "c:\myWebProject\mysql".
    c:
    cd \myWebProject\mysql\bin
       
    -- Start a client as superuser "root" (-u), and prompt for password (-p)
    mysql -u root -p
    Enter password:   // Enter the root's password set during installation.
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 1
    Server version: 8.0.xx
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql>
    -- Client started. The prompt changes to "mysql>".
    -- You can now issue SQL commands such as SELECT, INSERT and DELETE.
    1". MySQL akan di-unzip sebagai "
    -- Change the current directory to MySQL's binary directory.
    -- Assume that the MySQL is installed in "c:\myWebProject\mysql".
    c:
    cd \myWebProject\mysql\bin
       
    -- Start a client as superuser "root" (-u), and prompt for password (-p)
    mysql -u root -p
    Enter password:   // Enter the root's password set during installation.
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 1
    Server version: 8.0.xx
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql>
    -- Client started. The prompt changes to "mysql>".
    -- You can now issue SQL commands such as SELECT, INSERT and DELETE.
    2". (Klik kanan pada file ⇒ Ekstrak Semua ⇒ Pilih folder tujuan sebagai "
    XXXXXX XX:XX:XX [Note] mysqld: Normal shutdown
    ......
    XXXXXX XX:XX:XX  InnoDB: Starting shutdown...
    XXXXXX XX:XX:XX  InnoDB: Shutdown completed; log sequence number 0 44233
    ......
    XXXXXX XX:XX:XX [Note] mysqld: Shutdown complete
    (You may need to press ENTER to get the command prompt?!)
    7". )
    Untuk KEMUDAHAN PENGGUNAAN, kami akan MEMPERSINGKAT dan MENGUBAH NAMA direktori menjadi "
    -- Change the current directory to MySQL's binary directory.
    -- Assume that the MySQL is installed in "c:\myWebProject\mysql".
    c:
    cd \myWebProject\mysql\bin
       
    -- Start a client as superuser "root" (-u), and prompt for password (-p)
    mysql -u root -p
    Enter password:   // Enter the root's password set during installation.
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 1
    Server version: 8.0.xx
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql>
    -- Client started. The prompt changes to "mysql>".
    -- You can now issue SQL commands such as SELECT, INSERT and DELETE.
    4". Catat dan ingat direktori terinstal MySQL Anda
  3. (BARU sejak MySQL 5. 7. 7) MENGINISIALISASI database. Mulai CMD sebagai Administrator (Klik tombol "Cari" ⇒ Masukkan "cmd" ⇒ pilih "Jalankan sebagai Administrator"
    Keluarkan perintah ini.
    // Change directory to the MySQL's binary directory
    // Suppose that your MySQL is installed in "c:\myWebProject\mysql"
    c:
    cd \myWebProject\mysql\bin
     
    // Initialize the database. Create a root user with random password. Show the messages on console
    mysqld --initialize --console
    ......
    ..... [Note] A temporary password is generated for root@localhost: xxxxxxxx
    Selama instalasi, pengguna super bernama
    -- Change the current directory to MySQL's binary directory.
    -- Assume that the MySQL is installed in "c:\myWebProject\mysql".
    c:
    cd \myWebProject\mysql\bin
       
    -- Start a client as superuser "root" (-u), and prompt for password (-p)
    mysql -u root -p
    Enter password:   // Enter the root's password set during installation.
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 1
    Server version: 8.0.xx
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql>
    -- Client started. The prompt changes to "mysql>".
    -- You can now issue SQL commands such as SELECT, INSERT and DELETE.
    5 dibuat dengan kata sandi sementara, seperti yang ditunjukkan di atas. CATAT PASSWORD, SALIN dan SIMPAN di suatu tempat;
    CATATAN. Jika kesalahan "VCRUNTIME140_1. dll tidak ditemukan" terjadi, periksa
  4. Jika Anda melakukan kesalahan atau lupa kata sandi, HAPUS seluruh direktori yang diinstal MySQL "
    -- Change the current directory to MySQL's binary directory.
    -- Assume that the MySQL is installed in "c:\myWebProject\mysql".
    c:
    cd \myWebProject\mysql\bin
       
    -- Start a client as superuser "root" (-u), and prompt for password (-p)
    mysql -u root -p
    Enter password:   // Enter the root's password set during installation.
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 1
    Server version: 8.0.xx
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql>
    -- Client started. The prompt changes to "mysql>".
    -- You can now issue SQL commands such as SELECT, INSERT and DELETE.
    6", dan ULANGI langkah 2 dan 3

Untuk macOS

Catatan. MySQL versi terbaru (8. 0. 32) bekerja dengan macOS Monterey (12) dan Ventura (13). Jika Anda menjalankan macOS versi lama, Anda mungkin perlu menemukan versi arsip MySQL @ https. //dev. mysql. com/downloads/ ⇒ Arsip

  1. Unduh Server Komunitas MySQL "Arsip DMG" dari https. //dev. mysql. com/unduh/mysql/
    1. Di bawah tab "Rilis Ketersediaan Umum (GA)".
    2. Di bawah "MySQL Community Server 8. 0. {xx}", di mana {xx} adalah nomor pembaruan terbaru ⇒ Di "Pilih Sistem Operasi", pilih "macOS"
    3. Jika mac Anda berjalan pada prosesor ARM (Apple M1/M2), pilih "macOS13 (ARM, 64-bit) DMG Archive" (
      -- Change the current directory to MySQL's binary directory.
      -- Assume that the MySQL is installed in "c:\myWebProject\mysql".
      c:
      cd \myWebProject\mysql\bin
         
      -- Start a client as superuser "root" (-u), and prompt for password (-p)
      mysql -u root -p
      Enter password:   // Enter the root's password set during installation.
      Welcome to the MySQL monitor.  Commands end with ; or \g.
      Your MySQL connection id is 1
      Server version: 8.0.xx
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      
      mysql>
      -- Client started. The prompt changes to "mysql>".
      -- You can now issue SQL commands such as SELECT, INSERT and DELETE.
      7)
      Jika mac Anda berjalan pada prosesor Intel, pilih "macOS 13 (x86, 64-bit) DMG Archive" untuk macOS 12 atau 13 (
      -- Change the current directory to MySQL's binary directory.
      -- Assume that the MySQL is installed in "c:\myWebProject\mysql".
      c:
      cd \myWebProject\mysql\bin
         
      -- Start a client as superuser "root" (-u), and prompt for password (-p)
      mysql -u root -p
      Enter password:   // Enter the root's password set during installation.
      Welcome to the MySQL monitor.  Commands end with ; or \g.
      Your MySQL connection id is 1
      Server version: 8.0.xx
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      
      mysql>
      -- Client started. The prompt changes to "mysql>".
      -- You can now issue SQL commands such as SELECT, INSERT and DELETE.
      8)
      • Untuk memeriksa versi OS Anda ⇒ Klik logo 'Apple' ⇒ "About this Mac"
      • Untuk memeriksa prosesor Anda ⇒ Klik logo 'Apple' ⇒ cari "Intel" (x86);
      • Untuk memeriksa apakah macOS Anda 32-bit atau 64-bit ⇒ Baca http. //mendukung. apel. com/kb/ht3696. Kecuali Anda memiliki mesin era dinosaurus, itu harus 64-bit
    4. TIDAK perlu "Login" atau "Sign up" - Cukup klik "No thanks, just start my download"
  2. Untuk menginstal MySQL (Lihat https. //dev. mysql. com/doc/refman/8. 0/en/macos-installation. html untuk tangkapan layar)
    1. Buka "Unduhan" ⇒ Klik dua kali "
      -- Change the current directory to MySQL's binary directory.
      -- Assume that the MySQL is installed in "c:\myWebProject\mysql".
      c:
      cd \myWebProject\mysql\bin
         
      -- Start a client as superuser "root" (-u), and prompt for password (-p)
      mysql -u root -p
      Enter password:   // Enter the root's password set during installation.
      Welcome to the MySQL monitor.  Commands end with ; or \g.
      Your MySQL connection id is 1
      Server version: 8.0.xx
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      
      mysql>
      -- Client started. The prompt changes to "mysql>".
      -- You can now issue SQL commands such as SELECT, INSERT and DELETE.
      9" file yang diunduh
    2. Klik dua kali "
      -- Change the current directory to MySQL's binary directory.
      cd /usr/local/mysql/bin
       
      -- Start a client with superuser "root" (-u), and prompt for password (-p)
      ./mysql -u root -p
      Enter password:   // Enter the root's password given during installation. You will NOT any * for maximum security
      Welcome to the MySQL monitor.  Commands end with ; or \g.
      ......
      mysql>
      -- Client started. The prompt changes to "mysql>".
      -- You can now issue SQL commands such as SELECT, INSERT and DELETE.
      _0"
    3. Di "Pengantar", klik "Lanjutkan"
    4. Di "Lisensi", pilih "Setuju"
    5. Di "Jenis Instalasi", klik "Instal"
    6. Di "Konfigurasi", pilih "Gunakan Enkripsi Kata Sandi Kuat", dan masukkan kata sandi untuk pengguna "root". Pastikan Anda mengingat kata sandi Anda
    7. MySQL akan dipasang di "
      -- Change the current directory to MySQL's binary directory.
      cd /usr/local/mysql/bin
       
      -- Start a client with superuser "root" (-u), and prompt for password (-p)
      ./mysql -u root -p
      Enter password:   // Enter the root's password given during installation. You will NOT any * for maximum security
      Welcome to the MySQL monitor.  Commands end with ; or \g.
      ......
      mysql>
      -- Client started. The prompt changes to "mysql>".
      -- You can now issue SQL commands such as SELECT, INSERT and DELETE.
      1
      -- Change the current directory to MySQL's binary directory.
      cd /usr/local/mysql/bin
       
      -- Start a client with superuser "root" (-u), and prompt for password (-p)
      ./mysql -u root -p
      Enter password:   // Enter the root's password given during installation. You will NOT any * for maximum security
      Welcome to the MySQL monitor.  Commands end with ; or \g.
      ......
      mysql>
      -- Client started. The prompt changes to "mysql>".
      -- You can now issue SQL commands such as SELECT, INSERT and DELETE.
      2". Perhatikan direktori yang terinstal ini
    8. Keluarkan ".
      -- Change the current directory to MySQL's binary directory.
      cd /usr/local/mysql/bin
       
      -- Start a client with superuser "root" (-u), and prompt for password (-p)
      ./mysql -u root -p
      Enter password:   // Enter the root's password given during installation. You will NOT any * for maximum security
      Welcome to the MySQL monitor.  Commands end with ; or \g.
      ......
      mysql>
      -- Client started. The prompt changes to "mysql>".
      -- You can now issue SQL commands such as SELECT, INSERT and DELETE.
      _3".
  3. Jika Anda melakukan kesalahan atau lupa kata sandi, hentikan server (Klik Ikon "Apple" ⇒ System Preferences ⇒ MySQL ⇒ Stop)
    Goto
    -- Change the current directory to MySQL's binary directory.
    cd /usr/local/mysql/bin
     
    -- Start a client with superuser "root" (-u), and prompt for password (-p)
    ./mysql -u root -p
    Enter password:   // Enter the root's password given during installation. You will NOT any * for maximum security
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    ......
    mysql>
    -- Client started. The prompt changes to "mysql>".
    -- You can now issue SQL commands such as SELECT, INSERT and DELETE.
    _4 (melalui Finder ⇒ Go ⇒ GoTo Folder ⇒ ketik
    -- Change the current directory to MySQL's binary directory.
    cd /usr/local/mysql/bin
     
    -- Start a client with superuser "root" (-u), and prompt for password (-p)
    ./mysql -u root -p
    Enter password:   // Enter the root's password given during installation. You will NOT any * for maximum security
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    ......
    mysql>
    -- Client started. The prompt changes to "mysql>".
    -- You can now issue SQL commands such as SELECT, INSERT and DELETE.
    4) dan hapus semua folder yang diawali dengan "
    -- Change the current directory to MySQL's binary directory.
    cd /usr/local/mysql/bin
     
    -- Start a client with superuser "root" (-u), and prompt for password (-p)
    ./mysql -u root -p
    Enter password:   // Enter the root's password given during installation. You will NOT any * for maximum security
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    ......
    mysql>
    -- Client started. The prompt changes to "mysql>".
    -- You can now issue SQL commands such as SELECT, INSERT and DELETE.
    6", e. g. , "
    -- Change the current directory to MySQL's binary directory.
    cd /usr/local/mysql/bin
     
    -- Start a client with superuser "root" (-u), and prompt for password (-p)
    ./mysql -u root -p
    Enter password:   // Enter the root's password given during installation. You will NOT any * for maximum security
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    ......
    mysql>
    -- Client started. The prompt changes to "mysql>".
    -- You can now issue SQL commands such as SELECT, INSERT and DELETE.
    7" dan "
    -- Change the current directory to MySQL's binary directory.
    cd /usr/local/mysql/bin
     
    -- Start a client with superuser "root" (-u), and prompt for password (-p)
    ./mysql -u root -p
    Enter password:   // Enter the root's password given during installation. You will NOT any * for maximum security
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    ......
    mysql>
    -- Client started. The prompt changes to "mysql>".
    -- You can now issue SQL commands such as SELECT, INSERT and DELETE.
    2", dan Jalankan Ulang Langkah 2

Saya berasumsi bahwa MySQL diinstal di direktori

-- Change the current directory to MySQL's binary directory.
cd /usr/local/mysql/bin
 
-- Start a client with superuser "root" (-u), and prompt for password (-p)
./mysql -u root -p
Enter password:   // Enter the root's password given during installation. You will NOT any * for maximum security
Welcome to the MySQL monitor.  Commands end with ; or \g.
......
mysql>
-- Client started. The prompt changes to "mysql>".
-- You can now issue SQL commands such as SELECT, INSERT and DELETE.
9" (untuk Windows) atau "
-- Change password for 'root'@'localhost'. Replace xxxx with your chosen password
-- (For macOS, there is no need to change the password, but there is no harm trying it out)
-- (For my students: use xxxx as the password. Otherwise, you will ask me what is your password next week.)
-- Take note that strings are to be enclosed by a pair of single-quotes in MySQL.
mysql> alter user 'root'@'localhost' identified by 'xxxx';
Query OK, 0 rows affected (0.00 sec)

-- Query the password
mysql> select Host, User, authentication_string from mysql.user;
+-----------+------------------+---------------------------+
| Host      | User             | authentication_string     |
+-----------+------------------+---------------------------+
| localhost | root             | $A$005...                |
| ...      | ...             | .......                  |
+-----------+------------------+---------------------------+
   -- Take note that the "HASH" of the password is saved, NOT the "PLAIN" password
   -- [Starting from MySQL 5.x, the "Password" field was removed?!]

-- logout and terminate the client program
mysql> quit
Bye
0" (untuk macOS). Tetapi Anda perlu MEMPERHATIKAN DIREKTORI TERINSTAL MySQL ANDA. Selanjutnya, saya akan menunjukkan direktori yang diinstal MySQL sebagai
-- Change password for 'root'@'localhost'. Replace xxxx with your chosen password
-- (For macOS, there is no need to change the password, but there is no harm trying it out)
-- (For my students: use xxxx as the password. Otherwise, you will ask me what is your password next week.)
-- Take note that strings are to be enclosed by a pair of single-quotes in MySQL.
mysql> alter user 'root'@'localhost' identified by 'xxxx';
Query OK, 0 rows affected (0.00 sec)

-- Query the password
mysql> select Host, User, authentication_string from mysql.user;
+-----------+------------------+---------------------------+
| Host      | User             | authentication_string     |
+-----------+------------------+---------------------------+
| localhost | root             | $A$005...                |
| ...      | ...             | .......                  |
+-----------+------------------+---------------------------+
   -- Take note that the "HASH" of the password is saved, NOT the "PLAIN" password
   -- [Starting from MySQL 5.x, the "Password" field was removed?!]

-- logout and terminate the client program
mysql> quit
Bye
1 dalam artikel ini

Langkah 3. Mulai "Server"

MySQL adalah sistem klien-server. Database dijalankan sebagai aplikasi server. Pengguna mengakses server basis data melalui program klien, secara lokal atau jarak jauh melalui jaringan, seperti yang diilustrasikan

Bagaimana cara saya menginstal mysql di pc saya?
  1. Program server disebut "
    -- Change password for 'root'@'localhost'. Replace xxxx with your chosen password
    -- (For macOS, there is no need to change the password, but there is no harm trying it out)
    -- (For my students: use xxxx as the password. Otherwise, you will ask me what is your password next week.)
    -- Take note that strings are to be enclosed by a pair of single-quotes in MySQL.
    mysql> alter user 'root'@'localhost' identified by 'xxxx';
    Query OK, 0 rows affected (0.00 sec)
    
    -- Query the password
    mysql> select Host, User, authentication_string from mysql.user;
    +-----------+------------------+---------------------------+
    | Host      | User             | authentication_string     |
    +-----------+------------------+---------------------------+
    | localhost | root             | $A$005...                |
    | ...      | ...             | .......                  |
    +-----------+------------------+---------------------------+
       -- Take note that the "HASH" of the password is saved, NOT the "PLAIN" password
       -- [Starting from MySQL 5.x, the "Password" field was removed?!]
    
    -- logout and terminate the client program
    mysql> quit
    Bye
    2" (dengan akhiran
    -- Change password for 'root'@'localhost'. Replace xxxx with your chosen password
    -- (For macOS, there is no need to change the password, but there is no harm trying it out)
    -- (For my students: use xxxx as the password. Otherwise, you will ask me what is your password next week.)
    -- Take note that strings are to be enclosed by a pair of single-quotes in MySQL.
    mysql> alter user 'root'@'localhost' identified by 'xxxx';
    Query OK, 0 rows affected (0.00 sec)
    
    -- Query the password
    mysql> select Host, User, authentication_string from mysql.user;
    +-----------+------------------+---------------------------+
    | Host      | User             | authentication_string     |
    +-----------+------------------+---------------------------+
    | localhost | root             | $A$005...                |
    | ...      | ...             | .......                  |
    +-----------+------------------+---------------------------+
       -- Take note that the "HASH" of the password is saved, NOT the "PLAIN" password
       -- [Starting from MySQL 5.x, the "Password" field was removed?!]
    
    -- logout and terminate the client program
    mysql> quit
    Bye
    3, yang merupakan singkatan dari daemon - daemon adalah proses non-interaktif yang berjalan di latar belakang)
  2. Program klien disebut "
    -- Change the current directory to MySQL's binary directory.
    cd /usr/local/mysql/bin
     
    -- Start a client with superuser "root" (-u), and prompt for password (-p)
    ./mysql -u root -p
    Enter password:   // Enter the root's password given during installation. You will NOT any * for maximum security
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    ......
    mysql>
    -- Client started. The prompt changes to "mysql>".
    -- You can now issue SQL commands such as SELECT, INSERT and DELETE.
    _2" (tanpa
    -- Change password for 'root'@'localhost'. Replace xxxx with your chosen password
    -- (For macOS, there is no need to change the password, but there is no harm trying it out)
    -- (For my students: use xxxx as the password. Otherwise, you will ask me what is your password next week.)
    -- Take note that strings are to be enclosed by a pair of single-quotes in MySQL.
    mysql> alter user 'root'@'localhost' identified by 'xxxx';
    Query OK, 0 rows affected (0.00 sec)
    
    -- Query the password
    mysql> select Host, User, authentication_string from mysql.user;
    +-----------+------------------+---------------------------+
    | Host      | User             | authentication_string     |
    +-----------+------------------+---------------------------+
    | localhost | root             | $A$005...                |
    | ...      | ...             | .......                  |
    +-----------+------------------+---------------------------+
       -- Take note that the "HASH" of the password is saved, NOT the "PLAIN" password
       -- [Starting from MySQL 5.x, the "Password" field was removed?!]
    
    -- logout and terminate the client program
    mysql> quit
    Bye
    3)

Program

-- Change password for 'root'@'localhost'. Replace xxxx with your chosen password
-- (For macOS, there is no need to change the password, but there is no harm trying it out)
-- (For my students: use xxxx as the password. Otherwise, you will ask me what is your password next week.)
-- Take note that strings are to be enclosed by a pair of single-quotes in MySQL.
mysql> alter user 'root'@'localhost' identified by 'xxxx';
Query OK, 0 rows affected (0.00 sec)

-- Query the password
mysql> select Host, User, authentication_string from mysql.user;
+-----------+------------------+---------------------------+
| Host      | User             | authentication_string     |
+-----------+------------------+---------------------------+
| localhost | root             | $A$005...                |
| ...      | ...             | .......                  |
+-----------+------------------+---------------------------+
   -- Take note that the "HASH" of the password is saved, NOT the "PLAIN" password
   -- [Starting from MySQL 5.x, the "Password" field was removed?!]

-- logout and terminate the client program
mysql> quit
Bye
2 dan
-- Change the current directory to MySQL's binary directory.
cd /usr/local/mysql/bin
 
-- Start a client with superuser "root" (-u), and prompt for password (-p)
./mysql -u root -p
Enter password:   // Enter the root's password given during installation. You will NOT any * for maximum security
Welcome to the MySQL monitor.  Commands end with ; or \g.
......
mysql>
-- Client started. The prompt changes to "mysql>".
-- You can now issue SQL commands such as SELECT, INSERT and DELETE.
2 disimpan di sub-direktori "
-- Change password for 'root'@'localhost'. Replace xxxx with your chosen password
-- (For macOS, there is no need to change the password, but there is no harm trying it out)
-- (For my students: use xxxx as the password. Otherwise, you will ask me what is your password next week.)
-- Take note that strings are to be enclosed by a pair of single-quotes in MySQL.
mysql> alter user 'root'@'localhost' identified by 'xxxx';
Query OK, 0 rows affected (0.00 sec)

-- Query the password
mysql> select Host, User, authentication_string from mysql.user;
+-----------+------------------+---------------------------+
| Host      | User             | authentication_string     |
+-----------+------------------+---------------------------+
| localhost | root             | $A$005...                |
| ...      | ...             | .......                  |
+-----------+------------------+---------------------------+
   -- Take note that the "HASH" of the password is saved, NOT the "PLAIN" password
   -- [Starting from MySQL 5.x, the "Password" field was removed?!]

-- logout and terminate the client program
mysql> quit
Bye
8" dari direktori yang diinstal MySQL

Server pemula

Untuk Windows

Untuk memulai server basis data, luncurkan shell CMD baru

-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
_

Catatan. Opsi

-- Change password for 'root'@'localhost'. Replace xxxx with your chosen password
-- (For macOS, there is no need to change the password, but there is no harm trying it out)
-- (For my students: use xxxx as the password. Otherwise, you will ask me what is your password next week.)
-- Take note that strings are to be enclosed by a pair of single-quotes in MySQL.
mysql> alter user 'root'@'localhost' identified by 'xxxx';
Query OK, 0 rows affected (0.00 sec)

-- Query the password
mysql> select Host, User, authentication_string from mysql.user;
+-----------+------------------+---------------------------+
| Host      | User             | authentication_string     |
+-----------+------------------+---------------------------+
| localhost | root             | $A$005...                |
| ...      | ...             | .......                  |
+-----------+------------------+---------------------------+
   -- Take note that the "HASH" of the password is saved, NOT the "PLAIN" password
   -- [Starting from MySQL 5.x, the "Password" field was removed?!]

-- logout and terminate the client program
mysql> quit
Bye
_9 mengarahkan pesan keluaran ke konsol. Tanpa opsi ini, Anda akan melihat layar kosong

Untuk macOS

CARA MUDAH. Melalui kontrol grafis. Klik Ikon "Apple" ⇒ Preferensi Sistem ⇒ MySQL ⇒ Mulai atau Berhenti

Server database MySQL sekarang dimulai, dan siap untuk menangani permintaan klien

Apa pun yang mungkin salah, tidak. Membaca ""

Matikan Server

Untuk Windows

Cara tercepat untuk mematikan server database adalah dengan menekan Ctrl-C untuk memulai shutdown normal. JANGAN MEMBUNUH server melalui tombol TUTUP jendela

Amati pesan-pesan ini dari konsol server MySQL

XXXXXX XX:XX:XX [Note] mysqld: Normal shutdown
......
XXXXXX XX:XX:XX  InnoDB: Starting shutdown...
XXXXXX XX:XX:XX  InnoDB: Shutdown completed; log sequence number 0 44233
......
XXXXXX XX:XX:XX [Note] mysqld: Shutdown complete
(You may need to press ENTER to get the command prompt?!)

Untuk macOS

CARA MUDAH. Melalui kontrol grafis. Klik Ikon "Apple" ⇒ Preferensi Sistem ⇒ MySQL ⇒ Berhenti

PERINGATAN. Anda harus mematikan server MySQL dengan benar. Jika tidak, Anda mungkin merusak database dan mungkin mengalami masalah saat memulai ulang. NAMUN, jika Anda mengalami masalah saat mematikan server secara normal, Anda dapat menghentikan proses "

-- Change password for 'root'@'localhost'. Replace xxxx with your chosen password
-- (For macOS, there is no need to change the password, but there is no harm trying it out)
-- (For my students: use xxxx as the password. Otherwise, you will ask me what is your password next week.)
-- Take note that strings are to be enclosed by a pair of single-quotes in MySQL.
mysql> alter user 'root'@'localhost' identified by 'xxxx';
Query OK, 0 rows affected (0.00 sec)

-- Query the password
mysql> select Host, User, authentication_string from mysql.user;
+-----------+------------------+---------------------------+
| Host      | User             | authentication_string     |
+-----------+------------------+---------------------------+
| localhost | root             | $A$005...                |
| ...      | ...             | .......                  |
+-----------+------------------+---------------------------+
   -- Take note that the "HASH" of the password is saved, NOT the "PLAIN" password
   -- [Starting from MySQL 5.x, the "Password" field was removed?!]

-- logout and terminate the client program
mysql> quit
Bye
2" di Pengelola Tugas (untuk Windows);

Langkah 4. Mulai "Klien"

Ingat bahwa MySQL adalah sistem client-server. Setelah server dimulai, satu atau lebih klien dapat dihubungkan ke server basis data. Klien dapat dijalankan di mesin yang sama (klien lokal);

Untuk masuk ke server MySQL, Anda perlu memberikan nama pengguna dan kata sandi. Selama instalasi, MySQL membuat superuser bernama "

-- Change the current directory to MySQL's binary directory.
-- Assume that the MySQL is installed in "c:\myWebProject\mysql".
c:
cd \myWebProject\mysql\bin
   
-- Start a client as superuser "root" (-u), and prompt for password (-p)
mysql -u root -p
Enter password:   // Enter the root's password set during installation.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 8.0.xx
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
-- Client started. The prompt changes to "mysql>".
-- You can now issue SQL commands such as SELECT, INSERT and DELETE.
5" dengan kata sandi sementara. Saya harap Anda telah mencatat kata sandi ini. (Jika tidak, instal ulang. )

Instalasi MySQL menyediakan program klien baris perintah yang disebut "

-- Change the current directory to MySQL's binary directory.
cd /usr/local/mysql/bin
 
-- Start a client with superuser "root" (-u), and prompt for password (-p)
./mysql -u root -p
Enter password:   // Enter the root's password given during installation. You will NOT any * for maximum security
Welcome to the MySQL monitor.  Commands end with ; or \g.
......
mysql>
-- Client started. The prompt changes to "mysql>".
-- You can now issue SQL commands such as SELECT, INSERT and DELETE.
2". (Ingat bahwa program server disebut "
-- Change password for 'root'@'localhost'. Replace xxxx with your chosen password
-- (For macOS, there is no need to change the password, but there is no harm trying it out)
-- (For my students: use xxxx as the password. Otherwise, you will ask me what is your password next week.)
-- Take note that strings are to be enclosed by a pair of single-quotes in MySQL.
mysql> alter user 'root'@'localhost' identified by 'xxxx';
Query OK, 0 rows affected (0.00 sec)

-- Query the password
mysql> select Host, User, authentication_string from mysql.user;
+-----------+------------------+---------------------------+
| Host      | User             | authentication_string     |
+-----------+------------------+---------------------------+
| localhost | root             | $A$005...                |
| ...      | ...             | .......                  |
+-----------+------------------+---------------------------+
   -- Take note that the "HASH" of the password is saved, NOT the "PLAIN" password
   -- [Starting from MySQL 5.x, the "Password" field was removed?!]

-- logout and terminate the client program
mysql> quit
Bye
2" dengan akhiran
-- Change password for 'root'@'localhost'. Replace xxxx with your chosen password
-- (For macOS, there is no need to change the password, but there is no harm trying it out)
-- (For my students: use xxxx as the password. Otherwise, you will ask me what is your password next week.)
-- Take note that strings are to be enclosed by a pair of single-quotes in MySQL.
mysql> alter user 'root'@'localhost' identified by 'xxxx';
Query OK, 0 rows affected (0.00 sec)

-- Query the password
mysql> select Host, User, authentication_string from mysql.user;
+-----------+------------------+---------------------------+
| Host      | User             | authentication_string     |
+-----------+------------------+---------------------------+
| localhost | root             | $A$005...                |
| ...      | ...             | .......                  |
+-----------+------------------+---------------------------+
   -- Take note that the "HASH" of the password is saved, NOT the "PLAIN" password
   -- [Starting from MySQL 5.x, the "Password" field was removed?!]

-- logout and terminate the client program
mysql> quit
Bye
3; program klien tidak memiliki akhiran '
-- Change directory to MySQL's binary directory
c:
cd \myWebProject\mysql\bin
-- Start a MySQL client
mysql -u root -p
Enter password:   // Enter the NEW password
Welcome to the MySQL monitor.
.....  
mysql>
-- client started, ready to issue SQL command
5')

Mari mulai klien baris perintah dengan superuser "

-- Change the current directory to MySQL's binary directory.
-- Assume that the MySQL is installed in "c:\myWebProject\mysql".
c:
cd \myWebProject\mysql\bin
   
-- Start a client as superuser "root" (-u), and prompt for password (-p)
mysql -u root -p
Enter password:   // Enter the root's password set during installation.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 8.0.xx
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
-- Client started. The prompt changes to "mysql>".
-- You can now issue SQL commands such as SELECT, INSERT and DELETE.
5"

Pertama, pastikan server berjalan. Lihat langkah sebelumnya untuk memulai kembali server jika telah dimatikan

Untuk Windows

Mulai Shell CMD BARU lainnya untuk menjalankan klien (Anda harus menyimpan CMD yang menjalankan server)

-- Change the current directory to MySQL's binary directory.
-- Assume that the MySQL is installed in "c:\myWebProject\mysql".
c:
cd \myWebProject\mysql\bin
   
-- Start a client as superuser "root" (-u), and prompt for password (-p)
mysql -u root -p
Enter password:   // Enter the root's password set during installation.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 8.0.xx
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
-- Client started. The prompt changes to "mysql>".
-- You can now issue SQL commands such as SELECT, INSERT and DELETE.

Untuk macOS

Buka "Terminal" BARU dan keluarkan perintah ini untuk memulai klien MySQL dengan superuser

-- Change the current directory to MySQL's binary directory.
-- Assume that the MySQL is installed in "c:\myWebProject\mysql".
c:
cd \myWebProject\mysql\bin
   
-- Start a client as superuser "root" (-u), and prompt for password (-p)
mysql -u root -p
Enter password:   // Enter the root's password set during installation.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 8.0.xx
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
-- Client started. The prompt changes to "mysql>".
-- You can now issue SQL commands such as SELECT, INSERT and DELETE.
5

-- Change the current directory to MySQL's binary directory.
cd /usr/local/mysql/bin
 
-- Start a client with superuser "root" (-u), and prompt for password (-p)
./mysql -u root -p
Enter password:   // Enter the root's password given during installation. You will NOT any * for maximum security
Welcome to the MySQL monitor.  Commands end with ; or \g.
......
mysql>
-- Client started. The prompt changes to "mysql>".
-- You can now issue SQL commands such as SELECT, INSERT and DELETE.

(Lewati Kecuali. ) Membaca ""

Langkah 5. Ubah Kata Sandi untuk "root" Superuser

Seperti disebutkan sebelumnya, instalasi MySQL membuat superuser yang disebut "

-- Change the current directory to MySQL's binary directory.
-- Assume that the MySQL is installed in "c:\myWebProject\mysql".
c:
cd \myWebProject\mysql\bin
   
-- Start a client as superuser "root" (-u), and prompt for password (-p)
mysql -u root -p
Enter password:   // Enter the root's password set during installation.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 8.0.xx
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
-- Client started. The prompt changes to "mysql>".
-- You can now issue SQL commands such as SELECT, INSERT and DELETE.
5" dengan kata sandi acak sementara. "
-- Change the current directory to MySQL's binary directory.
-- Assume that the MySQL is installed in "c:\myWebProject\mysql".
c:
cd \myWebProject\mysql\bin
   
-- Start a client as superuser "root" (-u), and prompt for password (-p)
mysql -u root -p
Enter password:   // Enter the root's password set during installation.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 8.0.xx
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
-- Client started. The prompt changes to "mysql>".
-- You can now issue SQL commands such as SELECT, INSERT and DELETE.
_5" adalah pengguna istimewa yang dapat melakukan apa saja, termasuk menghapus semua basis data. Anda diminta untuk mengubah kata sandi root segera setelah masuk

Catatan. Jika Anda terjebak memasukkan perintah, tekan Ctrl-C untuk membatalkan perintah saat ini

Mengubah Kata Sandi untuk "root"

Mari kita lanjutkan dengan sesi klien kita yang dimulai sebelumnya

-- Change password for 'root'@'localhost'. Replace xxxx with your chosen password
-- (For macOS, there is no need to change the password, but there is no harm trying it out)
-- (For my students: use xxxx as the password. Otherwise, you will ask me what is your password next week.)
-- Take note that strings are to be enclosed by a pair of single-quotes in MySQL.
mysql> alter user 'root'@'localhost' identified by 'xxxx';
Query OK, 0 rows affected (0.00 sec)

-- Query the password
mysql> select Host, User, authentication_string from mysql.user;
+-----------+------------------+---------------------------+
| Host      | User             | authentication_string     |
+-----------+------------------+---------------------------+
| localhost | root             | $A$005...                |
| ...      | ...             | .......                  |
+-----------+------------------+---------------------------+
   -- Take note that the "HASH" of the password is saved, NOT the "PLAIN" password
   -- [Starting from MySQL 5.x, the "Password" field was removed?!]

-- logout and terminate the client program
mysql> quit
Bye
Mulai Ulang Klien sebagai "root" dengan Kata Sandi Baru

Kami baru saja mengubah kata sandi untuk

-- Change the current directory to MySQL's binary directory.
-- Assume that the MySQL is installed in "c:\myWebProject\mysql".
c:
cd \myWebProject\mysql\bin
   
-- Start a client as superuser "root" (-u), and prompt for password (-p)
mysql -u root -p
Enter password:   // Enter the root's password set during installation.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 8.0.xx
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
-- Client started. The prompt changes to "mysql>".
-- You can now issue SQL commands such as SELECT, INSERT and DELETE.
5 dan keluar dari klien. Mulai klien dan login sebagai
-- Change the current directory to MySQL's binary directory.
-- Assume that the MySQL is installed in "c:\myWebProject\mysql".
c:
cd \myWebProject\mysql\bin
   
-- Start a client as superuser "root" (-u), and prompt for password (-p)
mysql -u root -p
Enter password:   // Enter the root's password set during installation.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 8.0.xx
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
-- Client started. The prompt changes to "mysql>".
-- You can now issue SQL commands such as SELECT, INSERT and DELETE.
5 lagi. Masukkan kata sandi saat diminta

Untuk Windows

-- Change directory to MySQL's binary directory
c:
cd \myWebProject\mysql\bin
-- Start a MySQL client
mysql -u root -p
Enter password:   // Enter the NEW password
Welcome to the MySQL monitor.
.....  
mysql>
-- client started, ready to issue SQL command

Untuk macOS

-- Change directory to MySQL's binary directory
cd /usr/local/mysql/bin
-- Start a MySQL client
./mysql -u root -p
Enter password:  // Enter the NEW password
Welcome to the MySQL monitor.
......
mysql>
-- client started, ready to issue SQL command

Langkah 6. Buat Pengguna Baru

"Root" superuser memiliki hak istimewa, yang dimaksudkan untuk administrasi basis data dan tidak dimaksudkan untuk operasional. Kami akan membuat pengguna baru - sebut saja "

-- Change directory to MySQL's binary directory
cd /usr/local/mysql/bin
-- Start a MySQL client
./mysql -u root -p
Enter password:  // Enter the NEW password
Welcome to the MySQL monitor.
......
mysql>
-- client started, ready to issue SQL command
2" - dengan hak istimewa yang lebih rendah. Untuk membuat pengguna baru, mulai klien dengan superuser "
-- Change the current directory to MySQL's binary directory.
-- Assume that the MySQL is installed in "c:\myWebProject\mysql".
c:
cd \myWebProject\mysql\bin
   
-- Start a client as superuser "root" (-u), and prompt for password (-p)
mysql -u root -p
Enter password:   // Enter the root's password set during installation.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 8.0.xx
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
-- Client started. The prompt changes to "mysql>".
-- You can now issue SQL commands such as SELECT, INSERT and DELETE.
5"

// For Windows: Use "C:\myWebProject"
// Launch a "CMD" and issue these commands:
c:
cd \
mkdir myWebProject

// For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
// Launch a "Terminal" and issue these commands:
cd
mkdir myWebProject
_0
Penjelasan
  • BUAT PENGGUNA 'myuser'@'localhost' DIIDENTIFIKASI OLEH 'xxxx'
    Kami menggunakan perintah "
    -- Change directory to MySQL's binary directory
    cd /usr/local/mysql/bin
    -- Start a MySQL client
    ./mysql -u root -p
    Enter password:  // Enter the NEW password
    Welcome to the MySQL monitor.
    ......
    mysql>
    -- client started, ready to issue SQL command
    4" untuk membuat pengguna baru bernama
    -- Change directory to MySQL's binary directory
    cd /usr/local/mysql/bin
    -- Start a MySQL client
    ./mysql -u root -p
    Enter password:  // Enter the NEW password
    Welcome to the MySQL monitor.
    ......
    mysql>
    -- client started, ready to issue SQL command
    5, yang dapat masuk ke server secara lokal dari mesin yang sama (tetapi tidak dari komputer lain), dengan kata sandi "
    -- Change directory to MySQL's binary directory
    cd /usr/local/mysql/bin
    -- Start a MySQL client
    ./mysql -u root -p
    Enter password:  // Enter the NEW password
    Welcome to the MySQL monitor.
    ......
    mysql>
    -- client started, ready to issue SQL command
    6"
  • BERIKAN SEMUA AKTIF *. * KE 'penggunaku'@'localhost'
    Pengguna yang baru dibuat TIDAK memiliki hak istimewa untuk melakukan operasi basis data apa pun termasuk
    -- Change directory to MySQL's binary directory
    cd /usr/local/mysql/bin
    -- Start a MySQL client
    ./mysql -u root -p
    Enter password:  // Enter the NEW password
    Welcome to the MySQL monitor.
    ......
    mysql>
    -- client started, ready to issue SQL command
    7. Kami menggunakan perintah "
    -- Change directory to MySQL's binary directory
    cd /usr/local/mysql/bin
    -- Start a MySQL client
    ./mysql -u root -p
    Enter password:  // Enter the NEW password
    Welcome to the MySQL monitor.
    ......
    mysql>
    -- client started, ready to issue SQL command
    8" untuk memberikan "
    -- Change directory to MySQL's binary directory
    cd /usr/local/mysql/bin
    -- Start a MySQL client
    ./mysql -u root -p
    Enter password:  // Enter the NEW password
    Welcome to the MySQL monitor.
    ......
    mysql>
    -- client started, ready to issue SQL command
    9" hak istimewa (termasuk
    -- Change directory to MySQL's binary directory
    cd /usr/local/mysql/bin
    -- Start a MySQL client
    ./mysql -u root -p
    Enter password:  // Enter the NEW password
    Welcome to the MySQL monitor.
    ......
    mysql>
    -- client started, ready to issue SQL command
    7,
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    _01,
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    02, dan seterusnya) kepada pengguna baru ini di SEMUA database dan SEMUA tabel ("
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    03"). Pengguna baru ini, dalam praktiknya, memiliki hak istimewa yang sama dengan
    -- Change the current directory to MySQL's binary directory.
    -- Assume that the MySQL is installed in "c:\myWebProject\mysql".
    c:
    cd \myWebProject\mysql\bin
       
    -- Start a client as superuser "root" (-u), and prompt for password (-p)
    mysql -u root -p
    Enter password:   // Enter the root's password set during installation.
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 1
    Server version: 8.0.xx
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql>
    -- Client started. The prompt changes to "mysql>".
    -- You can now issue SQL commands such as SELECT, INSERT and DELETE.
    5, kecuali bahwa ia tidak dapat mengeluarkan perintah
    -- Change directory to MySQL's binary directory
    cd /usr/local/mysql/bin
    -- Start a MySQL client
    ./mysql -u root -p
    Enter password:  // Enter the NEW password
    Welcome to the MySQL monitor.
    ......
    mysql>
    -- client started, ready to issue SQL command
    8. Untuk produksi, Anda harus memberikan hanya hak istimewa yang diperlukan pada database dan tabel yang dipilih, mis. g. , "
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    06,
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    01,
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    08" - dapat mengeluarkan
    -- Change directory to MySQL's binary directory
    cd /usr/local/mysql/bin
    -- Start a MySQL client
    ./mysql -u root -p
    Enter password:  // Enter the NEW password
    Welcome to the MySQL monitor.
    ......
    mysql>
    -- client started, ready to issue SQL command
    7,
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    01 dan
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    11 (tetapi tidak ada
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    02,
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    13) pada SEMUA tabel ____4 database _____

Langkah 7. Buat Database baru, Tabel baru di Database, Sisipkan Rekaman, Kueri, dan Perbarui

Ingatlah bahwa server MySQL mengatur data dalam hierarki berikut

  1. Sebuah sistem berisi banyak database
  2. Database berisi banyak tabel
  3. Tabel berisi baris (catatan) dan kolom (bidang)

Mari buat database bernama "

-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
_2", dan tabel bernama "
-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
3" di database. Tabel harus memiliki tiga kolom.
-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
_4 (tipe
-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
7 - bilangan bulat),
-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
5 (tipe
-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
9 - string dengan panjang variabel hingga 50 karakter),
-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
6 (tipe
XXXXXX XX:XX:XX [Note] mysqld: Normal shutdown
......
XXXXXX XX:XX:XX  InnoDB: Starting shutdown...
XXXXXX XX:XX:XX  InnoDB: Shutdown completed; log sequence number 0 44233
......
XXXXXX XX:XX:XX [Note] mysqld: Shutdown complete
(You may need to press ENTER to get the command prompt?!)
1 - angka floating-point)

PERINGATAN. Pemrogram tidak menggunakan karakter kosong dan khusus di NAMES (nama database, nama tabel, nama kolom). Itu tidak didukung, atau akan memberi Anda lebih banyak tantangan

Tips Menggunakan Sesi Klien (Kembali ke Bagian Ini Jika Anda Terjebak dalam Menjalankan Perintah)

Sebelum kita melanjutkan, berikut adalah beberapa tips dalam menggunakan klien

  • Anda harus mengakhiri perintah Anda dengan titik koma (
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    23), yang mengirimkan perintah ke server untuk diproses. e. g. ,
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    1
  • Sebuah perintah dapat menjangkau beberapa baris. Prompt untuk baris berikutnya berubah menjadi
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    24 untuk menunjukkan kelanjutan. Anda harus mengakhiri perintah dengan titik koma (
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    23). e. g. ,
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    2Dengan kata lain, jika Anda lupa mengetikkan
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    26, Anda dapat mengetikkan
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    26 pada baris berikutnya
  • Anda dapat menggunakan
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    _28 untuk membatalkan (batalkan) perintah saat ini. e. g. ,
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    3
  • Jika Anda membuka kutipan tunggal/ganda, tanpa menutupnya, permintaan kelanjutan berubah menjadi
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    29 atau
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    30 (bukan
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    24). Misalnya,
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    4
  • Anda juga dapat menekan Ctrl-C untuk membatalkan perintah saat ini
  • Anda dapat menggunakan tombol panah atas/bawah untuk mengambil perintah sebelumnya/berikutnya, dari "command history"
  • (Untuk Windows 10) Anda harus mengaktifkan fungsi Copy/Paste dari CMD shell. Untuk mengaktifkan Salin/Tempel, klik ikon CMD ⇒ Properti ⇒ Opsi ⇒ Opsi Edit ⇒ Centang "Aktifkan pintasan tombol Ctrl". Anda kemudian dapat menggunakan Ctrl-C/Ctrl-V untuk Salin/Tempel

Mari mulai klien dengan pengguna baru kita "

-- Change directory to MySQL's binary directory
cd /usr/local/mysql/bin
-- Start a MySQL client
./mysql -u root -p
Enter password:  // Enter the NEW password
Welcome to the MySQL monitor.
......
mysql>
-- client started, ready to issue SQL command
2"

// For Windows: Use "C:\myWebProject"
// Launch a "CMD" and issue these commands:
c:
cd \
mkdir myWebProject

// For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
// Launch a "Terminal" and issue these commands:
cd
mkdir myWebProject
_5
Latihan
  1. Pilih rekaman dengan nama yang dimulai dengan huruf ________25______33. (Petunjuk.
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    _34, lihat Bagian "")
  2. Pilih catatan dengan nama TIDAK dimulai dengan huruf ________25______33. (Petunjuk.
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    _36)
  3. Pilih catatan dengan
    -- Change the current directory to MySQL's binary directory
    -- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
    c:
    cd \myWebProject\mysql\bin
     
    -- Start the MySQL Database Server
    mysqld --console
    // If Windows Defender Firewall popup, choose "allow access".
    ......
    ......
    XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
    Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
    6 antara 4. 35 dan 4. 65. (Petunjuk.
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    _38)
  4. Pilih rekaman dengan nama yang memiliki huruf ________25______39. (Petunjuk.
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    _40)
  5. Pilih catatan dengan nama yang memiliki huruf
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    _39 atau
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    42. (Petunjuk.
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    _43)
  6. Pilih catatan dengan nama yang memiliki huruf
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    39 dan
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    45

(Lewati Kecuali. ) Membaca ""

Lebih Banyak Latihan

  1. Tampilkan semua database
  2. Buat database baru bernama "
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    46"
  3. Setel database "
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    _46" sebagai database default
  4. Tampilkan semua tabel di database default
  5. Buat tabel baru bernama "
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    _48" dengan kolom dan jenis yang ditunjukkan di bawah ini.
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    _6
  6. Tampilkan deskripsi tabel
  7. Masukkan catatan di atas dan daftarkan semua catatan
  8. Cantumkan catatan dengan nama yang mengandung "
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    _49"
  9. Daftar catatan dengan harga ≥ 1. 0
  10. Tingkatkan harga semua item sebesar 10%, dan daftarkan semua catatan
  11. Hapus "Pena Merah" dari tabel, dan daftarkan semua catatan

Relasi banyak ke banyak

Di toko buku, sebuah buku ditulis oleh satu atau lebih pengarang; . Ini dikenal sebagai hubungan banyak-ke-banyak. TIDAK MUNGKIN untuk menangkap hubungan banyak-ke-banyak dalam tabel TUNGGAL (atau satu spreadsheet) dengan jumlah kolom yang tetap, tanpa menduplikasi informasi apa pun. Misalnya, jika Anda mengatur data pada tabel di bawah ini, Anda tidak akan mengetahui berapa banyak kolom penulis yang akan digunakan;

Bagaimana cara saya menginstal mysql di pc saya?

Hubungan banyak-ke-banyak antara buku dan penulis dapat dimodelkan dengan 3 tabel, seperti yang ditunjukkan di bawah ini. Tabel

// For Windows: Use "C:\myWebProject"
// Launch a "CMD" and issue these commands:
c:
cd \
mkdir myWebProject

// For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
// Launch a "Terminal" and issue these commands:
cd
mkdir myWebProject
_50 berisi data tentang buku (seperti judul dan harga); . Tabel bernama
// For Windows: Use "C:\myWebProject"
// Launch a "CMD" and issue these commands:
c:
cd \
mkdir myWebProject

// For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
// Launch a "Terminal" and issue these commands:
cd
mkdir myWebProject
52 bergabung dengan tabel
// For Windows: Use "C:\myWebProject"
// Launch a "CMD" and issue these commands:
c:
cd \
mkdir myWebProject

// For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
// Launch a "Terminal" and issue these commands:
cd
mkdir myWebProject
50 dan
// For Windows: Use "C:\myWebProject"
// Launch a "CMD" and issue these commands:
c:
cd \
mkdir myWebProject

// For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
// Launch a "Terminal" and issue these commands:
cd
mkdir myWebProject
51 dan menangkap hubungan banyak-ke-banyak antara
// For Windows: Use "C:\myWebProject"
// Launch a "CMD" and issue these commands:
c:
cd \
mkdir myWebProject

// For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
// Launch a "Terminal" and issue these commands:
cd
mkdir myWebProject
50 dan
// For Windows: Use "C:\myWebProject"
// Launch a "CMD" and issue these commands:
c:
cd \
mkdir myWebProject

// For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
// Launch a "Terminal" and issue these commands:
cd
mkdir myWebProject
51

Bagaimana cara saya menginstal mysql di pc saya?
Latihan
  1. Buat database bernama "
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    _57"
  2. Gunakan "
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    _57" sebagai database default
  3. Buat 3 tabel "
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    50", "
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    51", dan "
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    52" di database "
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    57", dengan nama kolom dan tipe seperti yang ditunjukkan pada diagram database
  4. Masukkan rekaman masing-masing ke dalam tabel, dan daftarkan konten dari setiap tabel
  5. Coba kueri ini dan jelaskan hasilnya.
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    _7
  6. Coba kueri ini dan amati bagaimana tabel digabungkan.
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    _8
  7. Cantumkan semua buku (
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    63,
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    64,
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    65) oleh "Tan Ah Teck" dengan
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    64 kurang dari
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    67
  8. Cantumkan semua penulis (
    -- Change the current directory to MySQL's binary directory
    -- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
    c:
    cd \myWebProject\mysql\bin
     
    -- Start the MySQL Database Server
    mysqld --console
    // If Windows Defender Firewall popup, choose "allow access".
    ......
    ......
    XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
    Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
    5 dan
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    69) untuk judul buku "Java for Dummies"
  9. Cantumkan semua buku (
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    63,
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    64,
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    65) dan semua penulis (
    -- Change the current directory to MySQL's binary directory
    -- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
    c:
    cd \myWebProject\mysql\bin
     
    -- Start the MySQL Database Server
    mysqld --console
    // If Windows Defender Firewall popup, choose "allow access".
    ......
    ......
    XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
    Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
    5 dan
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    69) untuk buku dengan judul yang diawali dengan "Java" (Petunjuk.
    // For Windows: Use "C:\myWebProject"
    // Launch a "CMD" and issue these commands:
    c:
    cd \
    mkdir myWebProject
    
    // For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
    // Launch a "Terminal" and issue these commands:
    cd
    mkdir myWebProject
    _75)

(Opsional) Backup dan Restore Database

Cadangkan melalui Program Utilitas "mysqldump".

Anda dapat menggunakan program utilitas

// For Windows: Use "C:\myWebProject"
// Launch a "CMD" and issue these commands:
c:
cd \
mkdir myWebProject

// For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
// Launch a "Terminal" and issue these commands:
cd
mkdir myWebProject
76 untuk mencadangkan (i) seluruh server (semua database), (ii) database yang dipilih, atau (ii) tabel database yang dipilih. Program "
// For Windows: Use "C:\myWebProject"
// Launch a "CMD" and issue these commands:
c:
cd \
mkdir myWebProject

// For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
// Launch a "Terminal" and issue these commands:
cd
mkdir myWebProject
_77" menghasilkan skrip SQL yang nantinya dapat dieksekusi untuk membuat ulang database, tabel, dan barisnya

Misalnya, perintah berikut mencadangkan seluruh database "

-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
2" ke skrip SQL yang disebut "
// For Windows: Use "C:\myWebProject"
// Launch a "CMD" and issue these commands:
c:
cd \
mkdir myWebProject

// For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
// Launch a "Terminal" and issue these commands:
cd
mkdir myWebProject
79"

Untuk Windows

// For Windows: Use "C:\myWebProject"
// Launch a "CMD" and issue these commands:
c:
cd \
mkdir myWebProject

// For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
// Launch a "Terminal" and issue these commands:
cd
mkdir myWebProject
_9

Untuk macOS

// Change directory to the MySQL's binary directory
// Suppose that your MySQL is installed in "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
// Initialize the database. Create a root user with random password. Show the messages on console
mysqld --initialize --console
......
..... [Note] A temporary password is generated for root@localhost: xxxxxxxx
0

Pelajari file output, yang berisi

// For Windows: Use "C:\myWebProject"
// Launch a "CMD" and issue these commands:
c:
cd \
mkdir myWebProject

// For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
// Launch a "Terminal" and issue these commands:
cd
mkdir myWebProject
_80,
-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
0 dan
// Change directory to the MySQL's binary directory
// Suppose that your MySQL is installed in "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
// Initialize the database. Create a root user with random password. Show the messages on console
mysqld --initialize --console
......
..... [Note] A temporary password is generated for root@localhost: xxxxxxxx
7 pernyataan untuk membuat ulang database dan tabel yang dibuang sebelumnya

Pulihkan melalui perintah "sumber" di klien mysql

Anda dapat memulihkan dari cadangan dengan menjalankan perintah "

// For Windows: Use "C:\myWebProject"
// Launch a "CMD" and issue these commands:
c:
cd \
mkdir myWebProject

// For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
// Launch a "Terminal" and issue these commands:
cd
mkdir myWebProject
83" di klien MySQL. Misalnya untuk mengembalikan cadangan
-- Change the current directory to MySQL's binary directory
-- Assume that the MySQL installed directory is "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
-- Start the MySQL Database Server
mysqld --console
// If Windows Defender Firewall popup, choose "allow access".
......
......
XXXXXX XX:XX:XX [Note] mysqld: ready for connections.
Version: '8.0.xx'  socket: ''  port: 3306  MySQL Community Server (GPL)
_2 tadi

Untuk Windows

// Change directory to the MySQL's binary directory
// Suppose that your MySQL is installed in "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
// Initialize the database. Create a root user with random password. Show the messages on console
mysqld --initialize --console
......
..... [Note] A temporary password is generated for root@localhost: xxxxxxxx
_1

Untuk macOS

// Change directory to the MySQL's binary directory
// Suppose that your MySQL is installed in "c:\myWebProject\mysql"
c:
cd \myWebProject\mysql\bin
 
// Initialize the database. Create a root user with random password. Show the messages on console
mysqld --initialize --console
......
..... [Note] A temporary password is generated for root@localhost: xxxxxxxx
_2

Ringkasan Perintah yang Sering Digunakan

(Untuk Windows) Memulai Server dan Klien MySQL
(Untuk macOS) Memulai Server dan Klien MySQL
Perintah MySQL yang sering digunakan

Perintah MySQL TIDAK peka huruf besar-kecil

(Lewati Kecuali. ) Bagaimana Cara Men-debug?

"Segala sesuatu yang mungkin salah akan salah. " Hal terpenting yang harus dilakukan adalah menemukan PESAN KESALAHAN

MENYEBABKAN. Anda tidak memiliki "runtime yang dapat didistribusikan ulang Microsoft Visual C++" yang diperlukan

LARUTAN. Goto "Unduhan Visual C++ terbaru yang didukung" @ https. //mendukung. microsoft. com/en-gb/help/2977003/the-latest-supported-visual-c-downloads ⇒ Unduh "x64.

// For Windows: Use "C:\myWebProject"
// Launch a "CMD" and issue these commands:
c:
cd \
mkdir myWebProject

// For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
// Launch a "Terminal" and issue these commands:
cd
mkdir myWebProject
_85" ⇒ jalankan executable untuk menginstal "Microsoft Visual C++ 2015-2019 redistributable (x64)" ⇒ Restart komputer Anda ⇒ Anda dapat menemukan "
// For Windows: Use "C:\myWebProject"
// Launch a "CMD" and issue these commands:
c:
cd \
mkdir myWebProject

// For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
// Launch a "Terminal" and issue these commands:
cd
mkdir myWebProject
86" di bawah "
// For Windows: Use "C:\myWebProject"
// Launch a "CMD" and issue these commands:
c:
cd \
mkdir myWebProject

// For macOS: Use "~/myWebProject" (where "~" denotes your home directory)
// Launch a "Terminal" and issue these commands:
cd
mkdir myWebProject
87"

Bagaimana cara menginstal MySQL di komputer saya?

Proses instalasi mirip dengan sistem operasi lain. .
Buka situs web MySQL di browser. Klik tautan berikut. Unduhan MySQL
Pilih opsi Download
Pilih Pemasang MySQL untuk Windows
Pilih penginstal yang diinginkan dan klik unduh

Bagaimana cara menginstal MySQL secara manual di Windows?

Anda juga boleh memilih penyiapan lengkap karena ini akan menginstal semua sumber daya MySQL yang tersedia. Setelah Anda memilih opsi pengaturan, klik Berikutnya. .
Memilih jenis penyiapan
Mengunduh file
Menginstal perangkat lunak
Menyelesaikan instalasi

Bagaimana cara menginstal database MySQL di Windows?

Unduh dan instal server basis data MySQL. Anda dapat mengunduh server komunitas MySQL dari lokasi ini. Setelah penginstal diunduh, klik dua kali file setup untuk memulai proses penginstalan. Pada halaman Memilih Jenis Penyiapan, Anda dapat melihat empat opsi pemasangan

Bagaimana cara menginstal MySQL secara manual di Windows 10?

Cara Mengunduh Edisi Komunitas Gratis MySQL .
Buka situs web MySQL dan pilih Unduhan
Pilih Unduhan Komunitas MySQL (GPL). .
Pada halaman berikutnya, pilih MySQL Community Server
Gulir ke bawah ke bagian bawah halaman dan pilih Go to Download Page di samping Windows (x86, 32 & 64-bit), MySQL Installer MSI