|
|
麻烦翻译一下,下面这段文章:xhan
/ ?& d& \/ _3 I( v# n+ p7 a) L. n8 ?' m" M& I& s- [! `
- 0 t( y6 O( o/ a% q- L3 r
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
0 ]0 \/ O& N) I8 k. R, k8 z8 T - % D6 B" I+ X; J/ `' d d0 X0 Z
- ### What we need ### K) W7 M% y+ e* C3 D
- Naturally, we will need a MySQL server to store the data for us, this document 7 u* L& Q' s* }6 D9 R1 [6 ~4 ~
- will not explain how this can be done - there are documents out there for the / |; Z1 A' w F% o- R
- interested. The requirements include a (empty) database for TeamSpeak to use6 x: p! Y# [+ _& b
- and a user account (username + password) that has the permissions to do stuff
, @* P6 {1 Q+ h$ m5 D$ c6 n& m - with the database. Additionally, you will need a vendor library installed on the
V. `# W; @9 m7 ] - local machine, this came with my MySQL install.
$ s! h- e( S% q - These instructions will not tell you how you might transfer your data from the/ O! ^6 n! h" ]% w0 Y) }
- SQLite database to the MySQL database, we start with a clean and empty MySQL4 e, q: C8 N$ Q) a
- database.
# ]0 m' Z6 { u5 d9 j' n/ D - Some users have reported ways to import a SQLite database into MySQL, but at
5 t- q+ v, k9 E: J. v - the time of writing, there are still too many issues - check the current status9 k p5 S/ }7 m$ G! {
- in the TeamSpeak forums if you are interested.
( d8 R3 N1 G' l1 a - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from3 K$ Y6 C! F- w2 @* |
- Borland was used. This driver can only interface with the client library that * R* A& ^3 j, x6 j t( _
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this' N) b6 Z* ~2 h. s4 S% w
- client library - basically all you have to do is to use a 3.x client library as
, g& u- p0 C- p+ m+ i, S - "VendorLib" and a 4.x database to connect to.
% M- k5 I/ h" l6 G' v - If you need more info about dbExpress, you can contact Borland.
9 h0 i$ S5 R* d
8 ?& P8 ?& f0 R- ### Doing the work ###: G. B+ T: C! E2 V
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all- I) i2 h( E+ a8 e$ [9 |9 L
- the perquisites right, just open your server.ini file, and add this section at: u, y2 Q7 {$ L" ~( B p4 U* t# I
- the end:7 b" a" k/ S4 Z8 ^ s+ \
- ---cut here---( l5 R: o( p3 G0 G9 U) P4 d
- [DBEXPRESS]
8 f2 y( w2 p3 U( A4 G1 [, j0 H' n - sqldir=mysql_sql# T, w5 f* L/ O2 W% t9 D( a- [# A) r
- Drivername=mysql' D) a8 h' z- _& @
- Database=Your_Database_Name_Here5 P7 Z& j$ e2 e! c* |( k
- Hostname=The_PC_the_MySQL-Server_is_on# _" H5 b6 x) J- J# {2 _
- User_name=User_name_on_the_MySQL-Server
/ E& e( W+ b/ N - Password=Password_to_go_with_above_user_name6 |3 L( ~- k2 a, k' m
- GetDriverFunc=getSQLDriverMYSQL
3 ?, n6 Z: D9 F - VendorLib=path_pointing_at_your_mysql_vendor_lib
4 u. ]" P. V8 r8 S1 n; V) B - LibraryName=path_to_libsqlmy_libary5 r* V! Q+ g8 H% L& b7 H6 F
- Active=14 m! \# ^* K1 h# M' S$ D
- ---cut here---
2 s( p- J9 J$ l3 s1 b - In my environment (a linux box with a MySQL server running locally) I have:, y2 ?: a$ e3 w
- ---example---
) N) V0 |5 c9 J) V - [DBEXPRESS]
4 x* r0 g4 l# Y8 _+ R7 z8 q - sqldir=mysql_sql
1 x* A7 Y' A/ r6 ?- k0 v - Drivername=mysql# ]: r" I& E/ `- x9 m5 v' v- v$ L
- Database=test. [# d! A$ j) y! G& h% s# ^
- Hostname=localhost% `6 ?3 N6 [. z B
- User_name=testuser, Z) g+ R, T/ B( J, t! {
- Password=my_password
& z2 Y9 z3 G& V7 @7 Q - GetDriverFunc=getSQLDriverMYSQL! L" j* g* K7 z, r0 U8 M
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.05 m* x4 k( u1 Z2 e& q+ U: x v
- LibraryName=./libsqlmy.so
- g2 A1 l0 T) w4 t6 ? - Active=1
9 ]0 `1 Z- h' P+ w& Q6 q y' b - ---example---! n$ N" m3 U1 ?5 Q _& B X
/ j3 L( p, C) \# q* L, R+ ], b1 c- On a windows box, also running the MySQL server locally, it would be:- D1 k& X2 G/ J5 X; h1 W- C
- ---example---
. t/ o% h- d# ] V, ~8 { - [DBEXPRESS]4 N* E7 `# m3 x) F$ G
- sqldir=mysql_sql0 s2 i. X' O$ {, U, J' T
- Drivername=mysql, o5 M- I' b6 ^% _
- Database=test( Q% D9 G6 s5 |, }8 b- ^
- Hostname=127.0.0.14 H* o; |- R2 R j
- User_name=testuser+ y& A, z& U: e4 f/ t
- Password=my_password- p p( w! c( m# l/ V
- GetDriverFunc=getSQLDriverMYSQL2 ]; z$ o" K" Q
- VendorLib=libmysql.dll
. _" o- B5 z, l# d - LibraryName=dbexpmysql.dll1 b( K: H) B7 [" s3 z) O
- Active=1; w/ q0 Q( V& o0 g! E2 s
- ---example----8 B5 o- Z; q) N! t
- - written 02.03.04 by pwk.linuxfan- m- ^- K) d$ i5 o
- {+ v% |5 m4 N+ M, Z) ]8 H* y
复制代码 |
|