In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the simple methods of MySql5.5 data backup and restore, the contents of the articles are carefully selected and edited by the author, with a certain pertinence, the reference significance for everyone is still relatively great, the following with the author to understand the simple methods of MySql5.5 data backup and restore.
-- Export a table in the database mysqldump-uroot-pdbpasswd-d dbname test > db.sql
-- backup the database (only prepare the tables and the contents of the tables in the original database, not including the database itself)
-- DOS command line exports the database:
-1. Click start-> run-> cmd- > cd to enter the directory where mysql's bin is located.
-- 2. Use one of the following commands (- d for output structure)
-- 3. (a) mysqldump-uroot-pdbpasswd-d dbname test > db.sql; (the output file is in the bin directory of mysql)
-- (b) mysqldump-uroot-p account model > D:\\ model.sql; (the output file is under D: disk)
-- (c) mysqldump-uroot-p account > alltable.sql; (the output file is in mysql's bin directory)
If an error is reported: mysqldump: unknown option'--no-beep'
-- then change the code to: mysqldump-- no-defaults-uroot-proot account > alltable.sql
-- Note: it's too much-- no-defaults
-restore the database
-1. Enter the MySQL Command Line Client, enter the password, and enter the mysql > command interface.
-- 2. Enter the command "show databases" to view all existing databases to facilitate the following steps
-3. Create the database you want to restore, for example: enter "create database account;"
-- 4. Switch to the newly created database and type "use account"
-5. Import data, enter "source D:zhangyicun.sql"
-6. When you start the import, "mysql >" appears again and the restore is successful without prompting an error.
-7. View table restore results: enter "show tables" to view the restored table
After reading the above simple methods of MySql5.5 data backup and restore, many readers must have some understanding. If you need to get more industry knowledge and information, you can continue to follow our industry information column.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.