|
|
麻烦翻译一下,下面这段文章:xhan
; r7 x# f& }! b% b F U- ^8 @3 o" Y, Q+ m0 t. V8 L* L! c
- , t* T2 {+ s4 r7 a" T8 D* M4 W& d- c
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
* J! m6 f2 s, A8 z. L, x! E
, v3 f2 B% U2 O' U- ### What we need ###( [3 T3 A' W" S
- Naturally, we will need a MySQL server to store the data for us, this document
. h; C0 J; F& x' p - will not explain how this can be done - there are documents out there for the - m) k; E, Z# G5 x9 }
- interested. The requirements include a (empty) database for TeamSpeak to use! ? [: G! p$ U" b' t! D
- and a user account (username + password) that has the permissions to do stuff
9 m* m8 H. O1 L0 s+ n* g& q8 E4 k - with the database. Additionally, you will need a vendor library installed on the
+ Y; C3 G6 g' A6 v' M) Y - local machine, this came with my MySQL install." t; b) g+ b' ]: u
- These instructions will not tell you how you might transfer your data from the
( P* H: o% D1 J6 Z: z- M - SQLite database to the MySQL database, we start with a clean and empty MySQL
: t& G5 E1 ?) _* {, d6 x - database.) V$ P$ m9 u! I& |
- Some users have reported ways to import a SQLite database into MySQL, but at* Z2 V+ m# ~7 @- q) l
- the time of writing, there are still too many issues - check the current status& O. a! I! _, `2 j& F) R2 b$ p9 S
- in the TeamSpeak forums if you are interested.
" x% _- Q% J3 o9 E* x - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
( m: q0 H1 l" d+ X - Borland was used. This driver can only interface with the client library that
+ _& k6 K6 @1 a& ]: g: a. Z0 J - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
; r0 K4 Q- a7 I6 O3 @. X, [& c - client library - basically all you have to do is to use a 3.x client library as
' V# p+ l3 h3 {) \7 V - "VendorLib" and a 4.x database to connect to.
. \, u) h0 V9 X$ s: B8 r2 V - If you need more info about dbExpress, you can contact Borland.+ ]) }5 b% U0 G" t
- - u+ [' M! B- A& V
- ### Doing the work ###
, {" x2 D1 S+ H W- G! p8 V' ^9 c3 \ - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
6 Z8 r. U i# d - the perquisites right, just open your server.ini file, and add this section at- E8 t+ O+ o3 v3 Y! e5 I/ I
- the end:8 @4 I( {& E' K5 s- K7 y. N. O, Z
- ---cut here---
4 J3 q" J: w9 j" @# S% @1 k! @. w - [DBEXPRESS]
: F7 Z Q1 M' t1 w2 ~ - sqldir=mysql_sql* D6 J5 h% _# i+ |" M
- Drivername=mysql; Q4 B; T* N) E8 Y' v! ~# s+ P C7 \
- Database=Your_Database_Name_Here
3 E/ Y) L7 d6 L6 e - Hostname=The_PC_the_MySQL-Server_is_on
, _" [( h6 u4 ]0 \ - User_name=User_name_on_the_MySQL-Server4 v" }& l; U) f) T! Q" J5 L2 `0 ]
- Password=Password_to_go_with_above_user_name7 B7 M8 A' s: a0 F
- GetDriverFunc=getSQLDriverMYSQL
. r) A$ h0 `1 b: m1 Z - VendorLib=path_pointing_at_your_mysql_vendor_lib7 e+ U3 j7 y( l0 A& L
- LibraryName=path_to_libsqlmy_libary8 y0 m/ r/ g/ o4 X1 I7 w
- Active=17 D, |7 h6 I5 x( a
- ---cut here---
4 X; B) w8 E9 S- z- d5 I - In my environment (a linux box with a MySQL server running locally) I have:/ U; I4 c% E; v; B; h
- ---example---
9 v! a2 E* w B0 L& I - [DBEXPRESS]
8 Y B' Z+ M% E4 K - sqldir=mysql_sql. M4 }1 a, l& x; m$ L$ R
- Drivername=mysql
7 r+ ~; l7 K- m - Database=test% o; f2 u2 T. [/ B0 |. U
- Hostname=localhost) R% l; n3 l* U* R! O. x
- User_name=testuser
# R5 X4 f- N. X2 k! E9 M8 v - Password=my_password- F9 q4 o, ~$ e0 U! P M5 H
- GetDriverFunc=getSQLDriverMYSQL/ j m s) Q$ J
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
2 C5 _ M( w- ~, Y; q3 [ - LibraryName=./libsqlmy.so5 ?! V/ N5 y: G2 B) m- _% l* J7 v
- Active=17 r$ ?# L% { H+ T l
- ---example---3 y# u2 A9 L- r8 [0 s& h8 I
u5 j0 F1 n, |' |! R- On a windows box, also running the MySQL server locally, it would be:: W) D$ m! E2 x9 T1 c" b% j
- ---example---8 R2 ~2 d) C4 {4 h" m7 Z
- [DBEXPRESS]
" V& Y9 G. F, x5 d7 ?- K6 r9 X9 E - sqldir=mysql_sql, p1 Q: O7 q4 H
- Drivername=mysql# @3 w+ n5 {* b- ]
- Database=test
2 Y" v0 p* Q3 { - Hostname=127.0.0.1
7 R6 e2 {! {5 g2 N/ I - User_name=testuser
0 g5 p: F( U2 a8 i0 [- v! J - Password=my_password
3 T# I) I4 f8 W9 j* C: z4 m+ L6 a# A" Y - GetDriverFunc=getSQLDriverMYSQL
4 u; p& ?* Y6 G. N T2 i - VendorLib=libmysql.dll
( G6 V6 z# _+ m; O7 Q - LibraryName=dbexpmysql.dll
+ ]$ j: F3 S+ w6 l - Active=1
9 u2 f$ A! H9 Y% A8 ~9 K( _' h8 m - ---example----
% B( n" c$ |- M8 i4 O - - written 02.03.04 by pwk.linuxfan& O4 Y- ^! o2 B6 d1 U3 d" N4 m( Q" g
/ w. s# R( w( ~6 Z7 H) e
复制代码 |
|