|
麻烦翻译一下,下面这段文章:xhan
" h4 ~% |* {/ H! m" Q" C6 X
' q0 P6 a8 B! U0 `$ [4 U/ i- , C+ {6 T: l5 E$ }% g7 F# N
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
/ E9 S0 H q3 K/ y$ d3 _4 w- l
$ g7 p1 l, g& q3 ]: |- ### What we need ###
_1 R5 Z: O; f1 ~! W* L) x9 u9 D - Naturally, we will need a MySQL server to store the data for us, this document , g: \6 u! p4 Y9 f: ~! U
- will not explain how this can be done - there are documents out there for the
! S# }" V$ A& r# q2 u' \+ ^( e - interested. The requirements include a (empty) database for TeamSpeak to use+ e0 u @: S" m4 S# ~( @
- and a user account (username + password) that has the permissions to do stuff
: S4 ~; C7 v' P) ]2 n: ?' z! K - with the database. Additionally, you will need a vendor library installed on the
8 t$ X" M5 R1 H- i1 A6 b: Q - local machine, this came with my MySQL install.
+ |! i4 m3 g( P/ F$ D( v2 \; ` - These instructions will not tell you how you might transfer your data from the( v4 z h/ J# A! o0 D+ j
- SQLite database to the MySQL database, we start with a clean and empty MySQL4 o* M. ?% N; F. { m
- database.
' @8 x, z, O# ]: D - Some users have reported ways to import a SQLite database into MySQL, but at" I$ G8 x/ g3 k& q* j6 q D
- the time of writing, there are still too many issues - check the current status
5 \" @$ a o, S* N+ d( a - in the TeamSpeak forums if you are interested.
" J* E; c& L+ H8 B - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from; w6 s& `& G& H0 j ]/ V
- Borland was used. This driver can only interface with the client library that ) r7 n2 h4 G# W4 z$ l
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this; K! q6 f3 T/ R" N- }: ^, `+ Q' V' j
- client library - basically all you have to do is to use a 3.x client library as ! b1 }( ]$ N8 V T9 t0 j5 s
- "VendorLib" and a 4.x database to connect to.3 i; o0 V+ ~& m
- If you need more info about dbExpress, you can contact Borland.
, }. M$ q. v6 s& w% T/ M, T - ; z& o9 Z. S7 [4 Z- i
- ### Doing the work ###$ L; d/ M: W" n3 e( b1 m: X
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all( t# b% x9 q% t1 e0 b
- the perquisites right, just open your server.ini file, and add this section at1 O6 O) ~2 v, K5 o1 C
- the end:
1 Q0 _4 W3 t$ b3 I. G - ---cut here---
( e, I9 {, R3 X7 B2 J& T: e - [DBEXPRESS]
9 V( h* y% q% ]: { - sqldir=mysql_sql E( z; q% t1 m- u
- Drivername=mysql
/ s) O" X$ y& Y: L+ N - Database=Your_Database_Name_Here
6 R; C9 Q, o% y2 G W& H - Hostname=The_PC_the_MySQL-Server_is_on+ h2 a2 v h2 c6 D
- User_name=User_name_on_the_MySQL-Server
. E% @% h8 e, ?7 C& ?' z - Password=Password_to_go_with_above_user_name3 b4 G! F# C/ L0 e$ R5 K6 m
- GetDriverFunc=getSQLDriverMYSQL
; b# z1 J5 e w9 N2 k - VendorLib=path_pointing_at_your_mysql_vendor_lib
- o* W3 t7 D" ?7 H! J/ ^& E - LibraryName=path_to_libsqlmy_libary
( O/ E0 y& s$ ~ - Active=1
$ u5 h$ x4 t1 o* K+ w$ ^ - ---cut here---" }3 L* s6 u# a9 d7 ^
- In my environment (a linux box with a MySQL server running locally) I have:' C, N) F4 G/ y0 ~
- ---example---- P/ E+ v U( w" w; f1 m$ p
- [DBEXPRESS]3 |1 z) C3 M4 x$ i h6 m3 J
- sqldir=mysql_sql
' W2 f/ n; m2 j( v9 ^ - Drivername=mysql
3 j8 M" P2 S! F: V: e: O3 y( [ - Database=test9 b/ C$ ~ v6 D
- Hostname=localhost/ |8 [8 c9 c, Q
- User_name=testuser
' g; H0 S; C* z+ } - Password=my_password0 ~) H# e4 p! b2 e; w) _
- GetDriverFunc=getSQLDriverMYSQL/ E# S6 v! D D6 `" T
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0. n$ R# n' ^. P
- LibraryName=./libsqlmy.so
% C( v' k2 y/ f* ^# m# d - Active=1
& k. Y! I0 O, l) V K - ---example---
( R4 K3 D" c0 l
; \; E Y/ ]8 E: ?4 Z- On a windows box, also running the MySQL server locally, it would be:& Z4 G4 a) l4 t1 J/ i! U, ?
- ---example---
( a3 q: p% W* Q0 U - [DBEXPRESS]# i# i2 q$ Y; B6 v9 W7 `
- sqldir=mysql_sql$ V8 q5 s5 L( {1 n; J P+ L
- Drivername=mysql; E9 q2 N1 J( F$ G+ l3 q4 u& T
- Database=test
% Q6 D( ~6 n( H* ^* {5 H - Hostname=127.0.0.1! M7 Z e6 [0 J$ k- [
- User_name=testuser
5 K; z0 \6 L8 }4 W# D/ o - Password=my_password) b. S0 }* q+ y1 C
- GetDriverFunc=getSQLDriverMYSQL& F. h% o( a4 K
- VendorLib=libmysql.dll
" R# l: ~: r3 u5 L. Y2 _ - LibraryName=dbexpmysql.dll
) f8 h. ?$ k' S8 d* H' Q - Active=1: O/ k8 d# r5 v, l
- ---example----. Q, T- F/ ?+ E3 w( ]$ g M4 I9 W
- - written 02.03.04 by pwk.linuxfan
0 d( o+ }- B6 b1 M
; \; D: G4 o; I9 p
复制代码 |
|