CREATE TABLE icon (
icon_id int(11) NOT NULL auto_increment,
icon_name varchar(30) NOT NULL default '',
image blob,
PRIMARY KEY (icon_id)
) TYPE=InnoDB;
变成
CREATE TABLE icon (
icon_id int(11) NOT NULL auto_increment,
icon_name varchar(30) NOT NULL default '',
image_name image,
PRIMARY KEY (icon_id)
) TYPE=InnoDB;
应该可以。
icon_id int(11) NOT NULL auto_increment,
icon_name varchar(30) NOT NULL default '',
image blob,
PRIMARY KEY (icon_id)
) TYPE=InnoDB;
变成
CREATE TABLE icon (
icon_id int(11) NOT NULL auto_increment,
icon_name varchar(30) NOT NULL default '',
image_name image,
PRIMARY KEY (icon_id)
) TYPE=InnoDB;
应该可以。
create table test1(id int, body blob);
2. 使用MySQL-Front的Im-/Export->Insert files into BLOB-fileds...菜单功能插入一条记录,body域为一张gif图片,此时查看body域可以看到图片
3. mysqldump -uroot -p tt test1 > test.sql
4. drop table test1;
5. mysql -uroot -p < test.sql
6. 在MySQL-Front中查看body域,图片被恢复了!
$mysqldump -uroot -p demo > demo.sql <---备份
$mysqldump -uroot -p < demo.sql <---恢复regards!