最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
MySQL数据库附加(MySQL database add-on)_mysql doc附加数据库.doc
时间:2026-06-18 09:03:01 编辑:袖梨 来源:一聚教程网
MySQL数据库附加(MySQL database add-on)

How to import a MYsql database under SQLyog 6.56 graphical interface, the database file format is: FRM and MYD and MYI, not SQL scripts, how to import them.
Don't tell this:
Export the entire database (command in the mysql bin directory of DOS)
Mysqldump - u user name-p database name >
Mysqldump - u root - p aaa > triple-a SQL
Mysqladmin-uroot-p create database; / / create database
Mysql - uroot - p database < database. SQL; / / import database
No use, look at the question in answer, high score reward!
How do you separate and attach databases using SQL statements?
For a separate database, we can use the Manage Studio interface or stored procedures. But for each method, you must ensure that no user is using this database. The next step is to use commands to separate or attach a database. You can handle the interface with the Manage Studio itself.
Separate database:
To use stored procedures to separate DATABASE, if can't find end user link, you can use the ALTER DATABASE command, and use a can interrupt existing links termination options to set the DATABASE to SINGLE_USER mode, set to SIGLE_USER code is as follows:
ALTER DATABASE [DatabaseName] SET SINGLE_USER WITH ROLLBACK IMMEDIATE is the CMD command to separate the DATABASE
Once a database is successfully isolated, the EXEC sp_detach_db DatabaseName is no different from the SQL Server perspective of deleting the database.
Additional database:
FOR additional DATABASE, you can use sp_attach_db stored procedure, or use the CREATE DATABASE command, with options FOR the ATTACH is recommended to use in a SQL Server2005 or higher version of the latter, the former is to forward compatible, it is being phased out, while the latter is more to provide more control of the file.
The CREATE DATABASE databasename
ON (FILENAME = 'D: Database dbname MDF')
FOR ATTACH | FOR ATTACH_REBUILD_LOG
However, for such an additional, we should pay attention to several places. Because it involves rebuild
相关文章
- 在国内稳定用Claude Code的三种姿势小结实用指南 08-21
- sketchup如何设计外墙内保温 08-21
- FigmaAI写独立书店海报提示词如何更贴合真人需求 08-21
- 保姆级教程:OpenClaw从入门到入土实用指南 08-21
- 影音转霸如何合并视频 08-21
- Sketchup如何设计楼梯模型 08-21