|
|
麻烦翻译一下,下面这段文章:xhan 2 c H# v. W: g- O' P' U6 `
+ t2 y4 D3 n* h) X4 h" U z- ! @9 S( a# c' J. [7 g3 s. j
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######4 n3 p( y" z( V: h. N- X
$ ~( k7 @6 O) \9 h3 @- ### What we need #### c s; ]( i: m$ u a2 E# J
- Naturally, we will need a MySQL server to store the data for us, this document ( @5 r5 }( r" Q$ Y' H8 L
- will not explain how this can be done - there are documents out there for the
3 Z7 E# y7 \) u - interested. The requirements include a (empty) database for TeamSpeak to use4 U& U) V% a. w1 P/ v! ~) H+ P
- and a user account (username + password) that has the permissions to do stuff9 S5 Q5 ]+ T9 ~$ h& {
- with the database. Additionally, you will need a vendor library installed on the
/ L. G4 f- I9 A4 y - local machine, this came with my MySQL install.- u0 Y% } D3 g, S
- These instructions will not tell you how you might transfer your data from the# \/ F8 I0 p6 ]! H
- SQLite database to the MySQL database, we start with a clean and empty MySQL
p1 {4 z* H. @( Z+ c& A - database.7 A5 ~, F9 v N( a8 c z- q
- Some users have reported ways to import a SQLite database into MySQL, but at
% B8 W. L# b8 J5 d# |" Y! p - the time of writing, there are still too many issues - check the current status- _6 d0 ~2 X9 D2 g! y+ @
- in the TeamSpeak forums if you are interested.& Z2 z0 R+ P$ `$ v( w) s" I' p
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from7 ^2 R1 G& H( g t: x
- Borland was used. This driver can only interface with the client library that
4 @! ^8 `! m3 y7 B* M3 V - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
/ s9 W$ M. O; w! T K - client library - basically all you have to do is to use a 3.x client library as ( U' ?) z% {8 [. `: R& l7 S
- "VendorLib" and a 4.x database to connect to.2 `" L) o5 b- d
- If you need more info about dbExpress, you can contact Borland.
1 N/ D/ e/ P, s( a& A( l& `
( F- t' J. f5 X" z) F$ C2 x# ~- ### Doing the work ###
3 O1 F" Y0 w, I' J c6 v - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
. h4 |. I3 e$ j- e( C$ Z; K - the perquisites right, just open your server.ini file, and add this section at
, O5 }5 z, E, f& p. A - the end:* V0 b. \' |& g6 {6 e
- ---cut here---( ?' U: s1 F+ |
- [DBEXPRESS]( }0 {( q2 ?, Q* }/ ^
- sqldir=mysql_sql p& c# T! e* F5 t/ Z2 N, w
- Drivername=mysql
- I1 f, y' r% F* {/ v - Database=Your_Database_Name_Here* q% q1 W' I9 x* @( o" k( @& E
- Hostname=The_PC_the_MySQL-Server_is_on0 }1 M% `/ P" b- h
- User_name=User_name_on_the_MySQL-Server! z2 P6 L" y) K/ i7 ^
- Password=Password_to_go_with_above_user_name0 s. {5 h" S& G3 o3 C- H
- GetDriverFunc=getSQLDriverMYSQL0 i( q4 c2 C4 P0 _. I) S
- VendorLib=path_pointing_at_your_mysql_vendor_lib
9 l0 a" G4 i4 \ - LibraryName=path_to_libsqlmy_libary G1 K4 N' j4 `+ P. `4 \" A
- Active=1
2 [7 U. J$ F# _ - ---cut here---5 |1 x. N4 ~/ v& {; o$ A4 G- l
- In my environment (a linux box with a MySQL server running locally) I have:
/ K5 L) Q( C8 c6 h% G - ---example---
+ C# ^! x% V/ E" v" [! c - [DBEXPRESS]; w+ e& D: b0 u! Y( Q7 n+ M
- sqldir=mysql_sql) r' K0 o9 b- u1 t4 x
- Drivername=mysql/ i5 L; R2 o- n* R# q
- Database=test/ P9 M8 j1 P0 d% R# s& S w
- Hostname=localhost
/ j" b: N$ u) E8 L9 e0 ^ - User_name=testuser& d3 Q( X$ ~4 {& M# g1 |' O4 n
- Password=my_password8 Y. K( y# F# |1 F# _
- GetDriverFunc=getSQLDriverMYSQL
9 y% U+ e. K/ c4 b$ c - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
; ~; d# W7 G4 O" \" k) T3 W - LibraryName=./libsqlmy.so2 ~: Y+ o2 B- |
- Active=1
+ B* u/ [# G$ J( ~7 q- t) F - ---example---
; d: S+ p9 G6 c
2 A. K0 B5 V! v* U" W6 a) U- On a windows box, also running the MySQL server locally, it would be:
, }7 Y" d7 u: i2 D - ---example---
2 [% o0 L8 q/ S0 J - [DBEXPRESS]5 B% [/ [% w4 N
- sqldir=mysql_sql% G8 u5 s+ ?3 U) A
- Drivername=mysql+ d0 V) z" s: { i. Y! i, j0 b/ c
- Database=test# o" j% o) C, G u
- Hostname=127.0.0.1; ? F4 Q/ ~$ M# [ T" L
- User_name=testuser
w) j/ A0 `8 Q1 {: R& f2 | - Password=my_password
. O7 Y% e9 ^" b# a7 R7 Z) x- a - GetDriverFunc=getSQLDriverMYSQL) B5 o3 e! n/ h& H+ S% d
- VendorLib=libmysql.dll c! n$ k" n/ m4 A3 [0 |
- LibraryName=dbexpmysql.dll# x, z) e1 Y0 w3 e8 E: Q9 @% a8 h
- Active=17 S/ F2 P$ y X. m! W1 X
- ---example----
: l' n8 X: W R# T; [; h6 ] - - written 02.03.04 by pwk.linuxfan9 z6 h/ W x' p& P( o: j$ n
- , N0 n: l; \8 N& N
复制代码 |
|