共享KDE的数据库

csslayer | 2011/08/27

KDE很多地方其实都有用到数据库,包括Digikam,Amarok,Akonadi。

但他们之间互相是无法共享数据库的。

其实完全可以让他们之间共享同一个数据库进程的使用,至于说能够得到的好处有什么的话。可能少少的节省资源的功效吧,如果你同时运行这几个东西的话。

实际上,让他们共享数据库是很简单的。

首先你需要按照你的发行版的设置,将mysql加入到你的系统的启动当中,建议复制mysql自己提供的 /usr/share/mysql/my-small.cnf 配置文件到你系统的my.cnf上。(降低占用资源)

然后创建一个自己的用户(纯粹的管理考虑)。这里使用mysql-workbench的话也不用纠结于记不住对应的命令,把用户的登陆权限设置为只能本地登陆。

然后分别为amarok,akonadi,digikam创建单独的数据库(create database 数据库名)。

具体的设置位置,Amarok本身的设置,Digikam本身的设置,还有Akonadi服务器配置,将用户和密码,数据库设置正确。

然后分别重启这三个东西即可。

如果你需要导出以前的数据,

这里有Amarok的导出数据教程,总之都是利用mysqldump进行导出操作。

http://amaroklive.com/wiki/MySQL_Server#Migrating_from_MySQL_Embedded_to_MySQL_Server

参考:

http://noughmad.eu/single-database-kde-programs

http://amaroklive.com/wiki/MySQL_Server#Migrating_from_MySQL_Embedded_to_MySQL_Server

Tags: , , ,

5 FEEDBACKS

Leave a Reply to csslayer Cancel reply

Your email address will not be published. Required fields are marked *

Note: Commenter is allowed to use '@User+blank' to automatically notify your reply to other commenter. e.g, if ABC is one of commenter of this post, then write '@ABC '(exclude ') will automatically send your comment to ABC. Using '@all ' to notify all previous commenters. Be sure that the value of User should exactly match with commenter's name (case sensitive).

This site uses Akismet to reduce spam. Learn how your comment data is processed.