MySQL restores a database in Windows and Linux

Source: Internet
Author: User

Restore database code in Linux:

1. Create an empty database cddl
Mysql> create database cddl;
Query OK, 1 row affected (0.00 sec)

2. Restore the database
[Root @ chicago mysqlsoftware] # cd/etc/rc. d/init. d
[Root @ chicago mysqlsoftware] # cd/etc/rc. d/init. d
[Root @ chicago init. d] # mysql-h 192.168.92.100-uroot-ppassword cddl </mysqlsoftware/cddl20140703. SQL
Warning: Using a password on the command line interface can be insecure.

 

Database restoration code in Windows:


1. Create an empty database mydb
2. run --> cmd-> cd C: \ Program Files \ MySQL Server 5.5 \ bin
3. mysql-h 192.168.92.100-uroot-ppassword mydb <d: \ cddl20140703. SQL

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.