|
|
麻烦翻译一下,下面这段文章:xhan 6 G( w% T0 M4 Y& F2 ]' c1 j' u
& X4 z/ @+ o% K2 C& B3 E- 3 W7 L6 K4 h* I7 U7 _
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######1 I" c3 u5 G, b+ ?' V/ k
; U9 j9 V+ L0 g% A5 J- ### What we need ###
) ^/ @. b J/ {2 b8 U - Naturally, we will need a MySQL server to store the data for us, this document
( j) [- ^0 _% ~8 N) j - will not explain how this can be done - there are documents out there for the
3 H( Y3 d* V# V# K- \ - interested. The requirements include a (empty) database for TeamSpeak to use6 {) X/ A/ W' N) L# n
- and a user account (username + password) that has the permissions to do stuff# o9 J5 J1 m' y# ] K; y1 ?; x
- with the database. Additionally, you will need a vendor library installed on the
& M3 R, @+ O9 h* _ - local machine, this came with my MySQL install.
) }! P- A1 F+ {; Q - These instructions will not tell you how you might transfer your data from the% m8 |+ @' q6 a4 e
- SQLite database to the MySQL database, we start with a clean and empty MySQL
" a$ M2 J4 w' f9 `9 I - database.* N/ l9 e; L5 x) _
- Some users have reported ways to import a SQLite database into MySQL, but at
0 Q5 l8 U+ J/ R, g# H' O - the time of writing, there are still too many issues - check the current status, {7 G a1 j" A
- in the TeamSpeak forums if you are interested.
9 c: \* p! j# O( g. _1 f - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
! ?, D$ F% q+ P( ^ - Borland was used. This driver can only interface with the client library that
1 m! V7 t, z2 ?& u7 ]$ f+ G - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
3 l/ t5 I& j# P7 r5 s- W - client library - basically all you have to do is to use a 3.x client library as
* @- D( e4 B! I% F: }0 c - "VendorLib" and a 4.x database to connect to.$ ~6 `) y U; G( o7 K. X
- If you need more info about dbExpress, you can contact Borland.1 m7 m+ n. l, g! ]
* Y7 {* x- |6 O& H/ U7 A# t- ### Doing the work ###6 c! L* K4 G# G6 j* M
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all6 j! B5 X1 E' i
- the perquisites right, just open your server.ini file, and add this section at
2 }" z' o; M& ]9 z* N - the end:4 F, R P* H9 Z! L2 h
- ---cut here---5 F0 R9 q6 Y) _9 S3 ~; M2 j. _3 n
- [DBEXPRESS]
" }/ R/ ^$ e* g! D - sqldir=mysql_sql
& V1 t9 Z* Y% o2 O - Drivername=mysql+ c6 q: {8 e: w
- Database=Your_Database_Name_Here
3 Z6 a1 H/ u1 u - Hostname=The_PC_the_MySQL-Server_is_on
6 U$ w- e8 ]; S- o3 }/ G! q8 m - User_name=User_name_on_the_MySQL-Server0 f2 u5 n5 p6 M) I
- Password=Password_to_go_with_above_user_name
6 K/ |( a4 a {2 _1 f0 W4 J l7 R - GetDriverFunc=getSQLDriverMYSQL
7 j/ A g$ R, g9 a Z - VendorLib=path_pointing_at_your_mysql_vendor_lib
( _+ Z! \4 S4 t c* k o# @ - LibraryName=path_to_libsqlmy_libary- C( @1 H' y2 t/ N' F
- Active=1 P" Q+ }( w* ~- |0 m! Z
- ---cut here---
! J* `( ~, }* P& `$ m( J - In my environment (a linux box with a MySQL server running locally) I have:
5 t1 ^+ ]6 y9 I. v4 Z; J) E% q - ---example---
5 Y* t% _. j* c' I - [DBEXPRESS]2 o8 o7 f( Z5 M9 @( Y
- sqldir=mysql_sql/ `, x) Y, d3 y4 D' N9 c4 g
- Drivername=mysql
- U1 G4 l& U* F! n2 p+ [ - Database=test
, ?7 B9 J. H# d/ z# C3 \1 u. s( | - Hostname=localhost2 w2 H1 C; {; [, Z- B
- User_name=testuser
! q% h. M) u/ Y1 p - Password=my_password
+ W% P+ M' g3 C6 S7 S5 B - GetDriverFunc=getSQLDriverMYSQL
3 \6 T. y2 L6 `8 W2 ^ - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0/ t, J3 a* [8 ?3 I
- LibraryName=./libsqlmy.so
. x6 ^! g4 r a7 q) z; m) W" R - Active=1
/ b5 {# p$ `5 z - ---example---1 [8 J3 B5 i, x
- 8 Y6 ]/ z% [& l) n- z
- On a windows box, also running the MySQL server locally, it would be:
9 L( j! A3 s) T - ---example---9 l. K( n. }! n
- [DBEXPRESS]
7 a7 d9 i( y, m" }3 l - sqldir=mysql_sql
* i: F5 f! T: }% y4 z; i - Drivername=mysql
' `" r- H( L& l1 {1 I - Database=test2 U2 E# T# p9 `0 \3 ?+ W4 X
- Hostname=127.0.0.1! | D% i! n$ b; g) k
- User_name=testuser
4 f$ y- F/ N9 ~( d6 e& g - Password=my_password
6 G: ^" p# t# F - GetDriverFunc=getSQLDriverMYSQL
5 N, B" a% I) K# } x& @ - VendorLib=libmysql.dll
' J+ u: O1 ?. o- P* c, H. m4 f" } - LibraryName=dbexpmysql.dll) j& X7 |/ T$ d
- Active=1& s$ b/ c3 M+ T* i* u$ y5 j
- ---example----: n3 `5 O; p& ~% |4 v
- - written 02.03.04 by pwk.linuxfan
: P* e4 f% e Y5 Y7 \: I: w - 2 w0 |. G8 m5 f! N( Q" Q
复制代码 |
|