Di sini kami akan menunjukkan kepada Anda langkah demi langkah cara menginstal MySQL pada platform Windows menggunakan Installer MySQL Show
Unduh MySQLMetode paling sederhana dan direkomendasikan adalah mengunduh Penginstal MySQL untuk Windows dari https. //dev. mysql. com/downloads/installer/ dan jalankan Pilih Instal MySQLSetelah mengunduh, unzip, dan klik dua kali penginstal MSI. file exe Kemudian ikuti langkah-langkah di bawah ini 1. Layar "Memilih Jenis Penyiapan". Pilih jenis penyiapan "Penuh". Ini menginstal semua produk dan fitur MySQL. Kemudian klik tombol "Berikutnya" untuk melanjutkan 2. layar "Periksa Persyaratan". Pemasang memeriksa apakah pc Anda memiliki persyaratan yang diperlukan. Jika ada beberapa persyaratan yang gagal, klik pada setiap item untuk mencoba menyelesaikannya dengan mengklik tombol Execute yang akan menginstal semua persyaratan secara otomatis. Klik "Berikutnya" 3. layar "Instalasi". Lihat produk apa saja yang akan dipasang. Klik "Jalankan" untuk mengunduh dan menginstal Produk. Setelah menyelesaikan penginstalan, klik "Berikutnya" 4. layar "Konfigurasi Produk". Lihat produk apa saja yang akan dikonfigurasi. Klik "MySQL Server 8. 0. Opsi 23" untuk mengonfigurasi Server MySQL. Klik tombol "Berikutnya". Pilih opsi "Server MySQL Mandiri/Replikasi MySQL Klasik" dan klik tombol "Berikutnya". Di halaman "Jenis dan Jaringan", setel Jenis Konfigurasi ke "Komputer Pengembangan" dan "Konektivitas" ke "TCP/IP" dan "Port" ke "3006". Kemudian, klik tombol "Berikutnya". 5. Layar "Metode Otentikasi". Pilih "Gunakan Enkripsi Kata Sandi Kuat untuk Otentikasi". Klik "Berikutnya" 6. Layar "Akun dan Peran". Tetapkan kata sandi untuk akun root. Klik "Berikutnya" 7. layar "Layanan Windows". Di sini, Anda mengonfigurasi Layanan Windows untuk memulai server. Pertahankan pengaturan default, lalu klik "Berikutnya" 8. layar "Terapkan Konfigurasi". Klik tombol "Jalankan" untuk menerapkan konfigurasi Server. Setelah selesai, klik tombol "Selesai". 9. layar "Konfigurasi Produk". Lihat bahwa Konfigurasi Produk selesai. Pertahankan pengaturan default dan klik tombol "Berikutnya" dan "Selesai" untuk menyelesaikan instalasi paket MySQL 10. Di layar berikutnya, Anda dapat memilih untuk mengonfigurasi Router. Klik "Berikutnya", "Selesai", lalu klik tombol "Berikutnya". 11. Layar "Hubungkan ke Server". Ketik kata sandi root (dari langkah 6). Klik tombol "Periksa" untuk memeriksa apakah koneksi berhasil atau tidak. Klik tombol "Berikutnya". 12. layar "Terapkan Konfigurasi". Pilih opsi dan klik tombol "Jalankan". Setelah selesai, klik tombol "Selesai". 13. Layar "Instalasi Selesai". Instalasi selesai. Klik tombol "Selesai". Verifikasi Instalasi MySQLBuka Klien Baris Perintah MySQL dari cmd Anda akan melihat prompt mysql>. Jika Anda telah menetapkan kata sandi apa pun, tulis kata sandi Anda di sini Sekarang, Anda terhubung ke server MySQL, dan Anda dapat menjalankan semua perintah SQL di prompt mysql> sebagai berikut Anda dapat memilih hanya menginstal klien selama instalasi server. Situs web hanya menawarkan untuk memungkinkan Anda mengunduh penginstal lengkap (ambil versi apa pun yang Anda inginkan dari http. // www. mysql. com/unduh/mysql/) Di wizard penginstalan, saat diminta untuk jenis penginstalan (khas, minimal, khusus), pilih 'Kustom'. Di layar berikutnya, pilih untuk TIDAK menginstal server, dan lanjutkan dengan penginstalan lainnya seperti biasa Setelah selesai, Anda hanya akan melihat program klien yang relevan (mysql, mysqldump, dll) di C. \Program Files\MySQL. \tempat sampah 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
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: xxxxxxxx6, // 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: xxxxxxxx7, // 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: xxxxxxxx8, // 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: xxxxxxxx9, -- 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 ...... ...... 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 ...... ...... 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 ContohSistem basis data relasional mengatur data dalam hierarki berikut
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 ...... ...... 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 ...... ...... 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 ...... ...... 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 ...... ...... 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 ...... ...... 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 ...... ...... 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 ...... ...... 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 ...... ...... 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 ...... ...... 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 ...... ...... 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: xxxxxxxx6, // 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: xxxxxxxx7, // 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: xxxxxxxx9, // 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: xxxxxxxx8) untuk berinteraksi dengan sistem database relasional PILIHMENGHAPUSMENYISIPKANMEMPERBARUIBUAT TABELTABEL JATUHCatatan
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 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 MariaDBDiambil 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 SQLSaya 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 AndaPENTING. Sebelum memulai, periksa apakah Anda memiliki beberapa GB Ruang Kosong Buat direktori untuk menyimpan semua karya 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 MySQLUntuk Windows
Untuk macOS Catatan. MySQL versi terbaru (8. 0. 28) berfungsi dengan macOS Big Sur (11) dan Monterey (12). Jika Anda menjalankan macOS versi lama, Anda mungkin perlu menemukan versi arsip MySQL @ https. //dev. mysql. com/downloads/ ⇒ Arsip
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.8" (untuk Windows) atau " -- 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 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 Bye0 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
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 Bye1 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.1 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 Bye7" dari direktori yang diinstal MySQL Server pemulaUntuk 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 ...... ...... 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_8 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 ServerUntuk 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 Bye1" 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.1". (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 Bye1" 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 Bye2; 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 command4') 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" SuperuserSeperti 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 BaruKami 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 command1" - 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
Langkah 7. Buat Database baru, Tabel baru di Database, Sisipkan Rekaman, Kueri, dan PerbaruiIngatlah bahwa server MySQL mengatur data dalam hierarki berikut
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 ...... ...... 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 ...... ...... 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 ...... ...... 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 ...... ...... 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 ...... ...... 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 ...... ...... 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 ...... ...... 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 Sesi Klien (Kembali ke Bagian Ini Jika Anda Terjebak dalam Menjalankan Perintah)Sebelum kita melanjutkan, berikut adalah beberapa tips dalam menggunakan klien
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 command1" // 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
(Lewati Kecuali. ) Membaca "" Lebih Banyak Latihan
Relasi banyak ke banyakDi 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; 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_49 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 myWebProject51 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 myWebProject49 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 myWebProject50 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 myWebProject49 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 myWebProject50 Latihan
(Opsional) Backup dan Restore DatabaseCadangkan 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 myWebProject75 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_76" 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 ...... ...... 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 myWebProject78" 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: xxxxxxxx0 Pelajari file keluaran, yang berisi pernyataan // 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, -- 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 ...... ...... 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: xxxxxxxx7 untuk membuat kembali database dan tabel yang dibuang sebelumnya Pulihkan melalui perintah "sumber" di klien mysqlAnda 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 myWebProject82" 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 ...... ...... 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 MySQLPerintah MySQL yang sering digunakanPerintah 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 SEBAB. Anda tidak memiliki "runtime yang dapat didistribusikan ulang Microsoft Visual C++" yang diperlukan LARUTAN. Goto "Unduhan Visual C++ terbaru yang didukung" @ https. //dukung. 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_84" ⇒ 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 myWebProject85" 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 myWebProject86" Bagaimana cara menginstal klien MySQL?Menginstal MySQL Shell dengan Repositori MySQL APT . Perbarui informasi paket untuk repositori MySQL APT. sudo apt-get pembaruan Perbarui paket konfigurasi repositori MySQL APT dengan perintah berikut. sudo apt-get install mysql-apt-config. . Instal MySQL Shell dengan perintah ini. sudo apt-get install mysql-shell Bagaimana cara mengunduh klien MySQL untuk Windows 10?Metode yang paling sederhana dan disarankan adalah mengunduh Penginstal MySQL untuk Windows dari https. //dev. mysql. com/downloads/installer/ dan jalankan. Pilih mysql-installer-web-community-8. 0. 23. msi jika Anda memiliki koneksi internet yang baik, jika tidak pilih mysql-installer-community-8. 0.
Bagaimana cara membuka klien MySQL di Windows?Untuk meluncurkan klien, masukkan perintah berikut di jendela Prompt Perintah. mysql -u root -p . Opsi -p diperlukan hanya jika kata sandi root ditentukan untuk MySQL. Masukkan kata sandi saat diminta.
Bagaimana cara menginstal MySQL dari command prompt di Windows?Untuk menginstal binari MySQL Shell. . Buka zip konten file Zip ke direktori produk MySQL, misalnya C. \Program Files\MySQL\ Untuk dapat memulai MySQL Shell dari command prompt, tambahkan direktori bin C. \Program Files\MySQL\mysql-Shell-1. 0. 8-rc-windows-x86-64bit\bin ke variabel sistem PATH |