|
|
麻烦翻译一下,下面这段文章:xhan ; o: N. y) U7 r% Y0 G& m& c( m
3 m& z$ b* _+ a. e
-
; t. ^* l3 c3 j, _* E0 N+ D2 B - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######+ _$ h2 C" D6 u6 W- p* _
' R* ] j$ @! Y7 N* ~! |- ### What we need ###. K% x% a4 w: V
- Naturally, we will need a MySQL server to store the data for us, this document & \+ b1 \9 p7 C: R- \9 u" J' j
- will not explain how this can be done - there are documents out there for the $ {8 y! I; b- r* d
- interested. The requirements include a (empty) database for TeamSpeak to use
- L9 e0 c0 {# y. p) u* ~. | - and a user account (username + password) that has the permissions to do stuff
I8 J/ v9 k! p) E0 C* l! }) c - with the database. Additionally, you will need a vendor library installed on the6 `. j$ l, j: G" B% s/ x; k5 p
- local machine, this came with my MySQL install.
' R; q6 z' _5 I* u6 k( c - These instructions will not tell you how you might transfer your data from the' k/ l( [( B# N- @/ e' Q
- SQLite database to the MySQL database, we start with a clean and empty MySQL
) K0 N, H/ i2 G3 o* ]5 E - database.
* P- Q) Y0 y ]. e1 j/ d1 n# l - Some users have reported ways to import a SQLite database into MySQL, but at
, |! Y/ Y+ k+ c, q2 S J) N$ V1 T - the time of writing, there are still too many issues - check the current status7 R; _ L1 e- [. U6 B/ D, ~8 D
- in the TeamSpeak forums if you are interested.2 ?+ a2 K. f4 p! Y+ U/ F
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from) ^1 C- a$ l# P/ ?, L
- Borland was used. This driver can only interface with the client library that " p+ y: f( t% }- Q5 V
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
8 I5 E: Z; o( O5 g+ O/ l( ] - client library - basically all you have to do is to use a 3.x client library as 9 T/ a& p \% V8 e3 I, _
- "VendorLib" and a 4.x database to connect to.
6 H' q0 P; Z2 o0 R - If you need more info about dbExpress, you can contact Borland.
8 t% A9 T8 h# u: t( ~# K$ H) A& q - 5 {) r7 z& D3 @3 T) `; C
- ### Doing the work #### y! j' g3 `5 g, U# m
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all( }1 K9 l0 T. N1 ^( r& J
- the perquisites right, just open your server.ini file, and add this section at7 k( e( F! [- H* H
- the end:1 m& v! v6 U5 d9 S0 J
- ---cut here---: f2 d2 L9 P6 V+ j
- [DBEXPRESS]' e, x5 j& }7 O
- sqldir=mysql_sql9 N! K9 R: r8 z2 t4 c
- Drivername=mysql; m+ E/ A9 o/ s# Y8 y" E$ Y! \
- Database=Your_Database_Name_Here7 g' `2 p( w1 M. E1 L9 a
- Hostname=The_PC_the_MySQL-Server_is_on
& [6 A" K, o3 F; K1 c) @ - User_name=User_name_on_the_MySQL-Server
( S/ |* n( d/ i) Y5 u - Password=Password_to_go_with_above_user_name
3 M$ w4 J6 J7 x* o% y - GetDriverFunc=getSQLDriverMYSQL
8 g: W; z1 q6 [9 T- D - VendorLib=path_pointing_at_your_mysql_vendor_lib
7 t5 U8 s% N: S& S7 a - LibraryName=path_to_libsqlmy_libary' I: ~. j" E% u* e
- Active=10 H8 R: U3 v2 s1 F+ D1 l3 z
- ---cut here---1 u* O; i- _) Q4 |
- In my environment (a linux box with a MySQL server running locally) I have:; [0 H7 z- x4 @) ?, p
- ---example---
( y" T" Z# E' P - [DBEXPRESS]
, C4 T7 P% Z6 E p* e- X3 o - sqldir=mysql_sql, q. k$ |7 z. S4 C' H
- Drivername=mysql# j2 n9 [5 N& N* O3 ~) S2 ]
- Database=test- }5 l& \7 S* R( S* m4 [6 q- y1 d$ R
- Hostname=localhost, F/ T1 [0 t O2 J" M! S
- User_name=testuser( e2 Z$ g& w; \5 J
- Password=my_password
* f' Y/ D3 h8 d' y$ C - GetDriverFunc=getSQLDriverMYSQL
) O5 R% j3 C& }0 K - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
, X1 h3 O6 b- h( U7 f - LibraryName=./libsqlmy.so8 q$ g% v9 A4 j/ r4 w% H& G: w
- Active=1" l# z$ L# q/ Q
- ---example---" X- b d$ C5 \1 B( ^; A
E' L$ v' x0 `- On a windows box, also running the MySQL server locally, it would be:
t: U7 [! ]* d/ \ - ---example---
B( S4 `& X* d) V" Z; b - [DBEXPRESS]3 |. f( Z8 F) O6 |# W4 L" ]9 l) A
- sqldir=mysql_sql
' l2 L' i8 L* a# I1 o; Y% w( c - Drivername=mysql
6 }0 x1 a, ?7 Z- q - Database=test, _* D- ~; _4 V/ _8 K
- Hostname=127.0.0.1
% w0 R' l3 M# D+ P* f4 o W& D/ W - User_name=testuser
2 f" i- i$ L' d) s$ l - Password=my_password) _/ r- H, D! H, ~! z9 o+ o& k
- GetDriverFunc=getSQLDriverMYSQL6 | _7 j7 V- M, H
- VendorLib=libmysql.dll, Y5 M5 C/ c; F, |8 |' W
- LibraryName=dbexpmysql.dll
* H9 Y3 z9 l. |" m# x& y/ w' c - Active=1
- \2 T# C8 z4 X/ n+ J" ?# z" e0 ~4 D t - ---example----
8 t I9 D9 u9 S9 ]7 \" Z- g - - written 02.03.04 by pwk.linuxfan0 D! V/ f5 b+ Q/ o
- 6 R7 I" @+ K4 Q0 k, J9 g9 o. h8 T
复制代码 |
|