|
|
麻烦翻译一下,下面这段文章:xhan * ^" j) B6 z% j' ?; {
+ ^# k( c! o8 I* {
- * _0 Z! H0 C9 G0 x5 V6 c" l
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######8 I0 @+ P- P' j7 r* y, s
' }$ f- l; B/ e3 P! T, V; G. u9 Y- ### What we need ###
0 j% j! ]" I x2 X - Naturally, we will need a MySQL server to store the data for us, this document
( H6 G4 X9 P* w/ U - will not explain how this can be done - there are documents out there for the
0 Y! E+ q+ x0 }" Z1 c - interested. The requirements include a (empty) database for TeamSpeak to use
1 m9 r/ o4 Y2 @* D$ L! C - and a user account (username + password) that has the permissions to do stuff
5 t) q2 u( D6 E @+ v' K& ~- y - with the database. Additionally, you will need a vendor library installed on the9 }* c0 Q7 Z% Z$ ]- ~4 m
- local machine, this came with my MySQL install.$ i( @2 ]/ o6 E3 {0 [1 _
- These instructions will not tell you how you might transfer your data from the3 b' l% A8 ], @! H, d0 q% \- p
- SQLite database to the MySQL database, we start with a clean and empty MySQL
! G8 c1 H0 V/ P9 I; i - database.
7 }2 _8 x1 }2 x3 C$ a - Some users have reported ways to import a SQLite database into MySQL, but at
, Q( q, l' m% W - the time of writing, there are still too many issues - check the current status
( l7 Z6 s. j4 a - in the TeamSpeak forums if you are interested.
w* h) i! f. [- i# Y) Q% d - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from( t' ]+ {! Y. ^" P' I2 q, e2 N) F% g
- Borland was used. This driver can only interface with the client library that % D. v+ _4 z$ `- h& R
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
+ H% Y: z8 w- q' o - client library - basically all you have to do is to use a 3.x client library as
* | V3 s# x3 ]7 A M `. y; c - "VendorLib" and a 4.x database to connect to., a3 d7 B4 K ~9 {
- If you need more info about dbExpress, you can contact Borland.! o( z" L' K. U7 d6 o; J
1 t7 ~3 V- e5 a8 T) d- g2 Q' t- ### Doing the work ###6 T9 C' W# k$ d, x, X! o
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
7 v$ [: q: t3 \/ I - the perquisites right, just open your server.ini file, and add this section at
9 f5 C/ r+ S3 f3 k- v/ f) w - the end:1 b) T d' l: A8 J7 ?
- ---cut here---
0 k- v' [8 c8 y- D/ B1 o - [DBEXPRESS]$ W! x1 o! K, w" E3 M. i7 X
- sqldir=mysql_sql
+ M* `, ?5 e/ X" Y1 Y - Drivername=mysql/ o% {( l5 j7 U8 P/ M/ T0 ]
- Database=Your_Database_Name_Here
9 K) ^( r1 }. p% i9 l - Hostname=The_PC_the_MySQL-Server_is_on
, o J4 @) v( i* D5 V - User_name=User_name_on_the_MySQL-Server
8 ]; s3 L& w+ C* `; [$ a2 g g% M - Password=Password_to_go_with_above_user_name4 h# U# n+ W) j( l X/ b6 ]
- GetDriverFunc=getSQLDriverMYSQL6 F+ A1 E" `* K, t
- VendorLib=path_pointing_at_your_mysql_vendor_lib
4 ~" I; K8 Q; ]3 ]- x' [0 ~. v9 P/ o - LibraryName=path_to_libsqlmy_libary* u. W8 }% u1 {. p1 e* @8 y- a9 X7 ]( ?
- Active=1
' t* x+ `2 ?9 t- ~2 E' c - ---cut here---- t: {' y5 Y2 T! |$ [& |
- In my environment (a linux box with a MySQL server running locally) I have:" S" q) \# L1 a: I% Z
- ---example---
) u, e* j* C- m3 Y - [DBEXPRESS]
+ h* f* }- C. y6 P+ v( Z - sqldir=mysql_sql# l3 H$ o4 _# q3 j( M# t! J
- Drivername=mysql5 F0 ^( Y: |2 m# g
- Database=test9 `$ y" x( Z x7 U" d5 e) e9 m
- Hostname=localhost
0 ^' q1 d3 y& d+ U( x9 V8 W - User_name=testuser
3 m8 @# V$ y) z5 B/ G# j1 j' H2 J+ ^ - Password=my_password
5 n" _2 l4 ~3 P, W) M - GetDriverFunc=getSQLDriverMYSQL
, p! {# t/ W, r0 a" e& ^' X: d - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.02 F5 p& T+ ]- M6 v0 a
- LibraryName=./libsqlmy.so
& U( T7 Y1 T5 G) e$ }9 {& W9 p - Active=1
* w& I4 g% Y) [5 | - ---example---6 M& B; a' N& w" |2 e: W4 t
/ L! e6 g: Z, U+ r2 Q8 n- On a windows box, also running the MySQL server locally, it would be:* F7 W& o, k! |
- ---example---
8 N G8 ?, ^- |1 y; V - [DBEXPRESS]
8 A5 A7 K5 C0 B, v% O4 _) ~ - sqldir=mysql_sql
( U; u" K, j. M* P& R2 G+ i - Drivername=mysql: k: @& t% z( `
- Database=test/ \4 b& s* C6 a/ G2 F$ F; i2 O
- Hostname=127.0.0.1: \0 @( K, V5 g" h& D5 f G8 A
- User_name=testuser# m% v: M! u1 T1 s9 U
- Password=my_password+ V# Q$ `2 J2 \" R/ z; d# G. h. p
- GetDriverFunc=getSQLDriverMYSQL6 O8 h! U9 b' j9 u: J! t
- VendorLib=libmysql.dll8 H! j- r$ }8 N; v' q. K$ G
- LibraryName=dbexpmysql.dll; m# B# [! g3 d, p% L; Q6 B, Q4 |
- Active=1
& s) @4 i; L6 A - ---example----( z4 R! I% U2 x% L5 M
- - written 02.03.04 by pwk.linuxfan2 X0 B% m4 _1 R
8 |' I4 ^3 N! [, W' U
复制代码 |
|