|
|
麻烦翻译一下,下面这段文章:xhan
) {5 k. u% i! q* W+ M/ K+ t. h) [9 a }2 _4 }$ b6 i2 v: }
- + }( j( t/ K( Y7 d- i+ X+ }7 \
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
. C$ P S1 E, R$ Y5 D% i
( O0 J1 n f# C6 A/ _- ### What we need ###
* `+ b" w/ z3 i' U" s, l( v! E - Naturally, we will need a MySQL server to store the data for us, this document
) d# B- `/ a/ d; Z6 Y3 s - will not explain how this can be done - there are documents out there for the 0 R6 o* w; i- {. D: w
- interested. The requirements include a (empty) database for TeamSpeak to use3 w. u {2 v+ \# p9 I# o
- and a user account (username + password) that has the permissions to do stuff
: J' a# M- ?) v - with the database. Additionally, you will need a vendor library installed on the$ \/ v( O3 i, r! o
- local machine, this came with my MySQL install.
$ P, h% h, [- L$ ^ - These instructions will not tell you how you might transfer your data from the
l( b* `! l& k) B9 l# Q3 }( } - SQLite database to the MySQL database, we start with a clean and empty MySQL
( {2 x1 D2 H8 Q - database.% ?5 T7 } |1 q( O& C0 }
- Some users have reported ways to import a SQLite database into MySQL, but at
a0 i# J. L7 N1 g' L/ H0 R- n - the time of writing, there are still too many issues - check the current status
' \1 K# b4 I8 V - in the TeamSpeak forums if you are interested.
* J4 C) |3 ]% l8 } - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
$ ?3 J& j! F& m9 i' h l - Borland was used. This driver can only interface with the client library that
; J- N2 S1 f+ Q6 L - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
4 s$ W5 Y- E+ V7 Q - client library - basically all you have to do is to use a 3.x client library as ( B0 _9 l8 w0 ~- G- e3 |! T
- "VendorLib" and a 4.x database to connect to.
8 u/ L$ \& G. c+ ]4 @1 Y# z - If you need more info about dbExpress, you can contact Borland.
# d8 f( D( Q. ~+ c& C$ u" U
5 d. K4 p1 A# f6 M- ### Doing the work ###
9 `" |# T q% }2 i4 ~7 h9 E3 o( { - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all6 C' o8 H% x7 _: H e% b
- the perquisites right, just open your server.ini file, and add this section at
x' [/ v2 ?" i3 O3 Q$ L# v - the end:$ R- f$ X; l, o6 y5 M7 C& u
- ---cut here---
. g: ^& d1 U% Q - [DBEXPRESS]* U9 }3 s8 [$ f: y$ j7 {' r/ W* b
- sqldir=mysql_sql, a' }- S, N- P5 {
- Drivername=mysql& N* {' q+ r8 W* X b ?* T( B
- Database=Your_Database_Name_Here
7 f8 z5 x% ~$ g4 G0 V" C2 | - Hostname=The_PC_the_MySQL-Server_is_on5 m5 J% e+ J% D. g9 d! a2 `
- User_name=User_name_on_the_MySQL-Server
" I( c) ~3 W; @; G$ o - Password=Password_to_go_with_above_user_name# }/ U/ \7 `( @4 \9 D/ y6 K1 z
- GetDriverFunc=getSQLDriverMYSQL7 M# y# G, x' F
- VendorLib=path_pointing_at_your_mysql_vendor_lib
+ J: R: z& y% F: Z" y0 X2 M3 s) \ - LibraryName=path_to_libsqlmy_libary3 r5 |) A8 w/ d
- Active=19 T; z y! K7 f9 {6 h) N+ r
- ---cut here---
+ J5 p8 w L2 Y3 t1 N0 D( j - In my environment (a linux box with a MySQL server running locally) I have:
+ K8 C% T: V3 P: W - ---example---
' P+ F; r5 |" M' g) n, v - [DBEXPRESS] F C5 b0 I M% R. B3 h3 U, Y
- sqldir=mysql_sql: f% N! D/ p- ^+ i
- Drivername=mysql
* P9 b( S e- ?1 B- T - Database=test2 c0 F: L, B3 H: }3 `* ~! a
- Hostname=localhost
! Z, I4 L) y( |: k7 c% R2 y9 A - User_name=testuser) n3 q4 J% e& Z2 y
- Password=my_password0 s+ d3 N/ V+ S2 e J0 S
- GetDriverFunc=getSQLDriverMYSQL
- h9 f- F1 b2 L+ ]- K5 a3 z - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
3 z2 x8 L$ r( T1 K% g( U6 G - LibraryName=./libsqlmy.so
" `* }" m# l4 L( d: c' H* { - Active=1
; a. f: R9 z- C9 D1 g% ` - ---example---
- H0 f. D: W0 \( M - : G. Y1 }+ N- L" A8 e% h. s
- On a windows box, also running the MySQL server locally, it would be:
. S) P- |% m d - ---example---
1 s8 h1 b) P6 ~7 O* {2 m7 G7 I - [DBEXPRESS]' Y7 i6 p( @8 Q. q0 f
- sqldir=mysql_sql E( f/ X4 S: V/ R( G' T
- Drivername=mysql
$ A) G s, `) |, X4 \# y5 X - Database=test% B5 l" o* A/ K3 g
- Hostname=127.0.0.1
- ^6 a; v3 Q. z# j - User_name=testuser
% Q: A" T4 @ W, @ - Password=my_password* T2 n/ |' A# J/ a- n: K8 P
- GetDriverFunc=getSQLDriverMYSQL: h' _. ~: G2 s0 r; p5 f9 |- z2 @8 u
- VendorLib=libmysql.dll
% f" [ M* a l8 K$ D - LibraryName=dbexpmysql.dll
3 u5 g4 ]- u+ z5 v - Active=1
) D4 Y0 w' X. u% ]* b2 n - ---example----- U$ ^8 k B; w, J; p! r$ B" s
- - written 02.03.04 by pwk.linuxfan
u) E; E/ e2 c* f; B - ' g `# E! I5 I* a
复制代码 |
|