最新下载
热门教程
- 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
相关文章
- 原神6月21日2026兑换码 06-18
- 星神纪元如何进行合成强化 06-18
- 原神2026年6月20日兑换码 06-18
- 蚂蚁新村2026年6月18日答案更新 06-18
- 战为王好玩吗 战为王玩法介绍 06-18
- 使命召唤21:黑色行动6: Black Ops 1 与 2 将在下月正式移植至新平台 06-18