【使用方法】
Mysqlworkbench中文语言设置方法: edit-->preferences-->appearance-->configureFontsfor:选中SimplifiedChineseOK 1ServerAdministration *使用MySQLInstanceConfig配置MySQL以Service运行; *然后使用MySQLWorkbench的ServerAdministration的NewServerInstance创建新的server实例@localhost; *使用MySQLWorkbench的ServerAdministration的DataDump来导入我们的数据库实例sakila-db,首先导入sakilaschema,然后导入sakiladata,导入schema如下图: *导入的命令行可以在workbench的log中看到,schema的导入如下: mysql.exe--defaults-extra-file=“c:usersAAAappdatalocal emp mphjwdop”--host=localhost--user=root--port=3306--default-character-set=utf8--comments<“E:mysqlsakila-dbsakila-dbsakila-schema.sql” data的导入如下: mysql.exe--defaults-extra-file=“c:usersAAAappdatalocal emp mpbsop_e”--host=localhost--user=root--port=3306--default-character-set=utf8--comments<“E:mysqlsakila-dbsakila-dbsakila-data.sql” *同时也可以使用MySQLWorkbench的ServerAdministration的DataDump来导出数据库,导出有两种格式,第一为导出到dumpprojectfolder,每个表为一个sql文件,第二种为导出为selfcontainedfile,所有的表导出为一个sql文件; 2SQLDevelopment *使用MySQLWorkbench的SQLDevelopment的newconnection来创建链接localhost,链接到先前导入的数据库实例sakila,如下: *在MySQLWorkbench的SQLDevelopment的环境中查询数据库实例sakila的actor表内容,如下: 3DataModeling *使用MySQLWorkbench的DataModeling的openexistingEERmodel来打开数据库实例sakila中的sakila.mwb文件,如下图: *在MySQLWorkbench的SQLDevelopment的环境中查询数据库实例sakila的actor表内容,如下: *通常地,我们使用MySQLWorkbench的DataModeling从建模开始来设计数据库,在建模完成后导出为sql语句,然后再将sql导入到数据库,来完成数据库的创建;