将mysql嵌入式数据库转储到SQL文本文件中 [英] Dump a mysql embedded database into a SQL text file

查看:139
本文介绍了将mysql嵌入式数据库转储到SQL文本文件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个mysql嵌入式数据库,需要将其移入服务器.我知道对于服务器,我可以使用mysqldump将数据备份到SQL文本文件中.但是我对嵌入式数据库有什么选择?

I have a mysql embedded database that I need to move into server. I know that for a server I can use mysqldump to backup the data into a SQL text file. But what option do I have for a embedded database?

谢谢, 卡洛斯.

推荐答案

我设法转储了嵌入式模式.我是从Amarok提示页面上获得的

I managed to dump the embedded schema. I got it from a Amarok tips page

libmysqld.dll使您可以在程序中使用mysql,而无需设置服务器或加载守护进程.它还创建与服务器相同的文件(mysql目录,模式目录和ibdata1文件).因此,我将这些文件放在一个目录中,并告诉mysqld linux deamon使用该目录作为datadir:

libmysqld.dll enables to use mysql in your program without setting up a server or load a deamon. Also it creates the same files as the server (mysql directory, schema directory and ibdata1 file). So I put those files in a directory and told the mysqld linux deamon to use that directory as datadir:

mysqld_safe --user=mysql --datadir=/data/myEmbededDB --skip-grant-tables

-skip-grant-tables将允许与任何用户或密码连接

--skip-grant-tables will allow to connect with any user or password

因为现在服务器指向该目录,所以我可以像其他任何mysql模式一样使用mysqldump转储嵌入式模式.如果您想将WorkBench与通过libmysqld.dll创建的架构一起使用,则同样适用.

Because the server point to that directory now I can dump the embedded schema with mysqldump just like any other mysql schema. The same applies if you want to use WorkBench with a schema created with libmysqld.dll

希望这可以帮助其他困惑的libmysqld.dll用户

Hope this help other confused libmysqld.dll users

:-)

这篇关于将mysql嵌入式数据库转储到SQL文本文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆