|
|
麻烦翻译一下,下面这段文章:xhan 0 ]& E _9 t& u! y
6 o' H) n1 W# ~- . Z' }1 y) M# X Y8 i8 O7 ]# P
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
" u- W7 F% F" w, X - 3 s* o( h) }& m/ u
- ### What we need ###
1 T& Y4 E) J5 d. ]7 D - Naturally, we will need a MySQL server to store the data for us, this document ) s% x0 Q- T1 J' M( B
- will not explain how this can be done - there are documents out there for the 4 {6 g- B4 j) O9 ^1 J, ^5 B
- interested. The requirements include a (empty) database for TeamSpeak to use
! W( e) a4 y: v0 j0 [ - and a user account (username + password) that has the permissions to do stuff/ \# C, M) K' T1 ]4 a3 ?
- with the database. Additionally, you will need a vendor library installed on the2 |. Z) {3 b+ c! n
- local machine, this came with my MySQL install.. [0 }7 V X% S0 O- A
- These instructions will not tell you how you might transfer your data from the
/ \7 Q! l* A% ?; s. S& f5 C - SQLite database to the MySQL database, we start with a clean and empty MySQL% K& K- ]' n: Q- I, A
- database.
8 }0 `/ T0 B8 E' h( G/ M. T - Some users have reported ways to import a SQLite database into MySQL, but at1 @6 }- q5 B: _7 P& L2 s
- the time of writing, there are still too many issues - check the current status
5 K' [# e; {% ], P - in the TeamSpeak forums if you are interested.
4 i6 u Y2 a5 J/ i ^ - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from" b( P; V% S z2 B
- Borland was used. This driver can only interface with the client library that 6 e! b5 C3 R5 a( y0 [# U( S% k
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this3 I( ~9 I2 ~& O( q; ?
- client library - basically all you have to do is to use a 3.x client library as : m+ C, ]5 Q6 S" ?
- "VendorLib" and a 4.x database to connect to.% q3 z' \/ r, z. m1 u( y5 g. K
- If you need more info about dbExpress, you can contact Borland.5 Z0 L% P1 V+ v. k" w
- ! _4 v5 o) o9 O% \+ A
- ### Doing the work ###% [# b8 L p" f. c
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all6 v/ ~" I* c9 P. A
- the perquisites right, just open your server.ini file, and add this section at
* q' E0 M' J% m1 u5 A" G" y - the end:
. B3 M; ^- R. A+ y4 S - ---cut here---
. }# L/ v! r2 A" Y - [DBEXPRESS]/ K# ]) E% Y' |% I5 a0 |
- sqldir=mysql_sql# w/ C. s" l& v- C: ^4 Q" n( V
- Drivername=mysql- [! S( T+ M$ W
- Database=Your_Database_Name_Here
9 w* ?9 t3 g7 U5 w% t' O - Hostname=The_PC_the_MySQL-Server_is_on* W+ v- G" p( u0 H' r* y
- User_name=User_name_on_the_MySQL-Server3 x9 @& ^. D0 {' }; r) ~6 r
- Password=Password_to_go_with_above_user_name! ~1 H ^1 v+ h4 v* ]; Z
- GetDriverFunc=getSQLDriverMYSQL0 P3 n# z+ ~, }( X' _! ?, p
- VendorLib=path_pointing_at_your_mysql_vendor_lib
|8 W+ ^- Q) `$ r) B, ` - LibraryName=path_to_libsqlmy_libary5 u+ d2 K. q5 ]" G) y" r, M
- Active=1
& c7 D6 |4 O- w+ v - ---cut here---+ W* M6 V6 V, N) z
- In my environment (a linux box with a MySQL server running locally) I have:
, k1 i6 Y) a5 m: I: @3 X9 l! }) ^ - ---example---) l9 u l! S1 f: {. N* {
- [DBEXPRESS]% x; f1 c3 D" u3 [2 R& W% H% A8 A
- sqldir=mysql_sql
8 _% `& N6 T" l, i( p - Drivername=mysql" z; m5 h1 G( I2 r* Y) ?
- Database=test/ n" I' ~; D: N9 v. _1 ]3 y5 g; q# M% X
- Hostname=localhost$ ?; l' U: X3 r3 N
- User_name=testuser
6 v4 T+ A" b8 Y. v - Password=my_password3 |& l+ _8 I4 h0 C F) M3 p
- GetDriverFunc=getSQLDriverMYSQL7 H# c, S: h" q/ k g3 {! X5 c* Z
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
' P: y& w( a" h9 q; g8 D$ L - LibraryName=./libsqlmy.so! E3 |% y3 ^3 M/ d$ a' q
- Active=1
1 V) \: q: U- D" j- @, H8 n+ |9 y - ---example---
8 j0 F, T# r( F, R2 x( u - 4 c! _4 `7 q; R0 X
- On a windows box, also running the MySQL server locally, it would be:& [% v$ N1 R7 W! i) K B. p
- ---example---( F; G* m: K9 }2 ]9 o: [+ C
- [DBEXPRESS]
5 B. n( v+ d8 W. ?! ?2 a0 B# |# H - sqldir=mysql_sql' D" H7 M* f' D9 O9 i
- Drivername=mysql
& z; l/ M1 i7 _) E6 W* R - Database=test
" A1 L0 w; \9 T2 t9 B - Hostname=127.0.0.12 H' L0 w' i7 g, M% H) O! E$ J
- User_name=testuser% y% _1 E& [! a' ]) q) {& v- X3 }
- Password=my_password* I/ L6 |0 |' m4 I6 m8 b
- GetDriverFunc=getSQLDriverMYSQL
6 ] ^" o7 j* {: X7 E - VendorLib=libmysql.dll, t! u. Q! H6 F8 m) X# k
- LibraryName=dbexpmysql.dll3 c# A+ T7 Y7 o1 y+ g7 C: N* o% L6 s
- Active=1& O1 f8 F8 a% C7 A
- ---example----
. C% o3 T% _# V A, K5 H - - written 02.03.04 by pwk.linuxfan d% R6 `( A" m+ u+ k
- # k: M) T* o) r3 `
复制代码 |
|