适用于MySQL数据库的批量创建数据库脚本,省去手动一个个添加麻烦,如优米电玩批量创建数据库为例。
使用方法:
在Navicat Premium中,你可以打开一个新的SQL查询窗口,将你的批量创建数据库的SQL脚本粘贴进去,然后执行该脚本。例如:
CREATE DATABASE fish CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE fish_alading CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE fish_haiwang CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE fish_kuailebuyu CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE fish_leitingzhanji CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE fish_shenhaibuyu CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE game CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE game_club CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE game_hongbao CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE game_log CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE gameaccount CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE jindian_cow CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE la_ba CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE landlords CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE qiang_cow CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE runing CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE texas_holdem CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE ym_manage CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE yunning CHARACTER SET utf8 COLLATE utf8_general_ci;
执行上述SQL脚本后,将一次性创建多个数据库。
请注意,执行批量创建数据库的操作需要具有足够的权限,并且确保MySQL服务器上的磁盘空间足够。
发表评论