In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
How do I import sql files into the database? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!
There are two ways to import sql files into the database, one is to import data from sql files using cmd debugging environment, and the other is to use MysqlWorkbence debugging environment to import data.
Method one
Import the data in the .sql file using cmd's debug environment:
Win+R key to open cmd input:
MySQL-u root-p
After entering MySQL
MySQL > use DR; MySQL > source c:/DR.sql
Note that the above DR is a pre-created folder, created in Mysql's data directory, DR.sql is the contents of the database you downloaded, note that DR.sql is to be placed in the outermost directory of the disk, otherwise the data cannot be imported.
Method two
Import data with Mysql Workbence debugging environment
Open the Mysql Workbence software, select Data Import/Restore, select Import from self-Contain File, then select the storage path of the DR.sql file you want to import data and the database name of Default Target Schema DR, and finally click Start Import.
Of course, the file format of the database imported by cmd is different from that of Mysql workbence, but both have frm files.
Thank you for reading! After reading the above, do you have a general understanding of how sql files are imported into the database? I hope the content of the article will be helpful to all of you. If you want to know more about the relevant articles, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.