exit Code language: SQL (Structured Query Language) ( sql ) Backing up a databaseįirst, open a Command Prompt on Windows or Terminal program on Unix-like systems. ( 'Charlie Brown', ' ') Code language: SQL (Structured Query Language) ( sql )įinally, exit the mysql program. ) Code language: SQL (Structured Query Language) ( sql )įifth, insert some rows into the employees table: INSERT INTO employees ( name, email) Third, switch the current database to hr: USE hr Code language: SQL (Structured Query Language) ( sql )įourth, create a new table inside the hr database called employees: CREATE TABLE IF NOT EXISTS employees ( Second, create a new database called hr: CREATE DATABASE IF NOT EXISTS hr Code language: SQL (Structured Query Language) ( sql ) Creating a sample databaseįirst, connect to the MySQL server using the mysql program: mysql -u root -p Code language: plaintext ( plaintext ) ![]() We’ll demonstrate how to back up and restore a database on a MySQL server. To restore a backup created by the mysqldump program, you use the mysql command-line program. ![]() ![]() To back up a database on the MySQL server, you use the mysqldump program that comes by default with the MySQL client installation. Summary: in this tutorial, you will learn the steps of how to back up a database on a MySQL server using mysqldump program and restore it using the mysql program.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |