|
|
麻烦翻译一下,下面这段文章:xhan
. x8 x' d8 t0 M$ h: r$ @; r
: `2 L" B. k2 @( X: j" D-
/ E. S( Z. ]0 }, { - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
7 ]+ Y$ c7 w2 {3 V
6 P( w7 E M: a. M- ### What we need ###
4 Y, |. J, G' i- \- [ - Naturally, we will need a MySQL server to store the data for us, this document ! s9 y' T' Q1 S' X
- will not explain how this can be done - there are documents out there for the
3 f9 g1 F" b& x - interested. The requirements include a (empty) database for TeamSpeak to use
7 T' X; K' t5 I7 _, l. o4 h - and a user account (username + password) that has the permissions to do stuff
. d0 |' K% D% x& l& L( a f6 O - with the database. Additionally, you will need a vendor library installed on the
( D0 z8 U( B- A2 C$ Z1 K1 s5 U' U - local machine, this came with my MySQL install.
& M+ r! P' i# Y+ H& a5 W+ Y! U - These instructions will not tell you how you might transfer your data from the. I |* d+ s+ A( l
- SQLite database to the MySQL database, we start with a clean and empty MySQL
! I7 b& y# j$ e6 G/ L% V" m- m - database.! w' J5 L5 j- h' w, B5 V
- Some users have reported ways to import a SQLite database into MySQL, but at8 X% a8 D$ J1 K. s' D# f
- the time of writing, there are still too many issues - check the current status
S( O4 X6 y1 m1 `3 c8 t9 ~ - in the TeamSpeak forums if you are interested.1 t" n' U. l. u* V: x+ H
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from+ a9 X: Q$ w: }/ `5 f5 M, N* w
- Borland was used. This driver can only interface with the client library that
9 h" Y/ J. [8 v( A$ C - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this9 s" ?7 b' u, F& J# K
- client library - basically all you have to do is to use a 3.x client library as ) \/ C7 O7 Y5 q3 @) V
- "VendorLib" and a 4.x database to connect to.
9 ?! P0 a, |( |: A% w" @/ M/ {3 H/ | - If you need more info about dbExpress, you can contact Borland.; o8 u6 J% k, b" Z$ }2 ~
- ' i: k. W g' z' w
- ### Doing the work #### I V# `$ U1 B( |' ?. ]
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
3 p: ^' [' ?8 {' {, E4 k - the perquisites right, just open your server.ini file, and add this section at
) H' @* Y" w+ ^' V - the end:
1 `. p7 w& w0 i! r4 O - ---cut here---
8 H, z0 P% P- ? k9 X4 O& _$ @; I/ { - [DBEXPRESS], l$ Y: \; ]2 y @) ?6 S# @
- sqldir=mysql_sql
4 [. }; x! q4 `! Y' X4 D# T' k+ I - Drivername=mysql/ a1 M* [# J6 J4 C: E0 V/ R7 A# W e
- Database=Your_Database_Name_Here8 Y& l h) Q) R, f
- Hostname=The_PC_the_MySQL-Server_is_on( N& I# r# w$ w& A
- User_name=User_name_on_the_MySQL-Server8 u% x' Z7 a8 t
- Password=Password_to_go_with_above_user_name
, M T0 e- M$ v' a8 w& x2 C - GetDriverFunc=getSQLDriverMYSQL
: k& f' Q9 X5 L/ r+ b1 ~( j - VendorLib=path_pointing_at_your_mysql_vendor_lib
5 ~7 V) @0 K, P" W9 F3 ^ - LibraryName=path_to_libsqlmy_libary* G; K0 u! O% N$ K5 h, D& Z, _2 g i
- Active=1% W$ X9 n8 w8 v
- ---cut here---& r$ j- S l5 `6 E" j
- In my environment (a linux box with a MySQL server running locally) I have:
7 J$ ~; |9 X! d0 M - ---example---
z& @6 O& i B - [DBEXPRESS]
9 K7 s9 m, N* k) x* V4 I( I7 k! p - sqldir=mysql_sql
) }- `/ |! a1 P* ] - Drivername=mysql
0 S& T9 U/ ]- z7 C5 M# Q - Database=test2 T( J8 `. X4 {; U/ E% G+ |
- Hostname=localhost/ a2 K9 U6 V; o8 b) |
- User_name=testuser
, i$ v' O: T: u: \! M' C - Password=my_password
" g& p; M$ J5 ]3 O - GetDriverFunc=getSQLDriverMYSQL& h0 p, A' \6 ^: r% F
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
- I5 R6 H# [2 d! q0 E0 n - LibraryName=./libsqlmy.so. G- }; w. z- e4 [
- Active=1/ p1 t( I' h6 K+ U0 N+ U
- ---example---, y M' D/ Z4 D5 E4 i" \
- ' @) J# A! w) h( y0 o i$ u
- On a windows box, also running the MySQL server locally, it would be:
- W, f" Y8 Q) E' A, M4 d - ---example---2 ~6 U7 ?1 k- P4 M
- [DBEXPRESS]
2 X+ K/ k* i2 Q+ F1 ~' ~ - sqldir=mysql_sql+ a5 P& b; U/ ~7 o9 g, g4 X
- Drivername=mysql
1 `$ Y7 t% x2 n2 l c - Database=test5 ]; i. \4 e* r! E4 V2 Y
- Hostname=127.0.0.1
2 r) ~: W3 o | - User_name=testuser
2 i, Q) n: I8 {9 B( H" v5 ? - Password=my_password# {$ U- Y, O7 ~& l/ j) b$ a
- GetDriverFunc=getSQLDriverMYSQL2 f8 _, Y- N; J# B" R: U
- VendorLib=libmysql.dll/ V; }/ _8 A1 O6 Q
- LibraryName=dbexpmysql.dll
8 f- u, j. c3 A& O - Active=1
t1 X, `- E7 E1 `$ O - ---example----
8 }9 T8 `* o6 o3 \3 I - - written 02.03.04 by pwk.linuxfan
* a' l u2 R1 x' T - : U- O/ K( D; ?) ^9 f
复制代码 |
|