|
|
麻烦翻译一下,下面这段文章:xhan
c5 F) V! X- W
" r. M4 ~% y- l7 j( Y# H) e-
3 [/ K* g4 \# e( U5 O# s. z9 i1 V - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######) R. D4 _" j0 w; i! M
- 2 A0 v2 b E1 ]
- ### What we need ###/ w; Y+ D; e0 u9 W5 h: b8 P
- Naturally, we will need a MySQL server to store the data for us, this document - p& k' R c: |* @) G) G. R% e) A( h
- will not explain how this can be done - there are documents out there for the
0 p! R7 w3 w, j) \4 m( s - interested. The requirements include a (empty) database for TeamSpeak to use$ N% M+ s1 {5 r7 R1 C2 }# n- P
- and a user account (username + password) that has the permissions to do stuff& h9 e7 M# N4 S0 Z/ ]
- with the database. Additionally, you will need a vendor library installed on the) C+ O4 L) P- a" M
- local machine, this came with my MySQL install., U% M' E5 f" n# M
- These instructions will not tell you how you might transfer your data from the7 G6 \ v+ T, k8 w
- SQLite database to the MySQL database, we start with a clean and empty MySQL6 @) ~1 s4 ~5 C2 N5 G; I
- database.- W# c% e' T" \& j! L& }% j
- Some users have reported ways to import a SQLite database into MySQL, but at
8 |/ p5 K# j! z j& ?4 T - the time of writing, there are still too many issues - check the current status1 i9 n. E% b6 A! q9 i- b5 i) e
- in the TeamSpeak forums if you are interested.
5 W' t0 Z3 {' E+ Q$ J - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
% @" U: t* m6 t# j' O - Borland was used. This driver can only interface with the client library that 7 S7 \( Q* `8 E! e$ J: }
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this0 q+ j( l, |! C3 S: j% c- O
- client library - basically all you have to do is to use a 3.x client library as Q5 s" m% a2 p1 O
- "VendorLib" and a 4.x database to connect to.
; A6 ^ r' ]8 N* b - If you need more info about dbExpress, you can contact Borland.
$ w* x+ L+ n, P! Y6 _8 z
0 ^" R5 d6 w5 ~; |' U- ### Doing the work ###
4 J. L1 Q0 O# {, I - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all- x! H( ~8 ^' M' R1 o' i3 d
- the perquisites right, just open your server.ini file, and add this section at/ H8 B/ x2 d1 h3 J
- the end:
9 c# H. v; b; U1 U1 s7 C, a: W - ---cut here---( f# E B/ z N8 ?
- [DBEXPRESS]5 C$ J! A. x2 J. M$ F1 m
- sqldir=mysql_sql% c5 X. @# x2 s& K: b7 {) z' b
- Drivername=mysql4 ?: V2 Z$ H$ y! B: C
- Database=Your_Database_Name_Here
+ z- f) q8 V3 |0 K$ @1 ]; s- m - Hostname=The_PC_the_MySQL-Server_is_on
9 Z) A" x0 L# `, f6 V - User_name=User_name_on_the_MySQL-Server
! J/ A) _# E- D$ F - Password=Password_to_go_with_above_user_name
8 f9 ^0 e: A* f1 d3 T$ l5 A* U - GetDriverFunc=getSQLDriverMYSQL
$ `) R$ V9 j' y5 e; \' s - VendorLib=path_pointing_at_your_mysql_vendor_lib
" N, d; b. `; _ - LibraryName=path_to_libsqlmy_libary- L1 d$ M# I! [ d" L
- Active=1. H; C+ g/ K- a! r
- ---cut here---4 b2 q# P) ~# c% z, G
- In my environment (a linux box with a MySQL server running locally) I have:
# l! T1 i- G5 i( O6 k - ---example---3 U- h" d) x4 `& s* X* v2 m/ l
- [DBEXPRESS]. |! G$ r5 i/ M% @0 c
- sqldir=mysql_sql u/ v0 \$ t, K8 J
- Drivername=mysql
P# _& d! t7 ^# `8 p7 s+ p4 V - Database=test* [4 K2 `" B! ]. p4 |: X' h% l" v
- Hostname=localhost
" x& g3 q" W0 r' l q0 e9 b - User_name=testuser" W; p. ]0 }. d) J$ v; h$ b% t
- Password=my_password
& k6 }/ o* r5 V - GetDriverFunc=getSQLDriverMYSQL
& q, ~( @ O3 _ I7 t - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0# v9 Q( ^' M! S, g$ B, x5 b6 ^
- LibraryName=./libsqlmy.so& D) S4 f) a; N9 T' A& `# D% X
- Active=1
7 H5 G$ A$ k/ I, \* k" w' r - ---example---
2 ^# t: m8 u& o - : e8 V3 r5 R* k2 z7 C* h
- On a windows box, also running the MySQL server locally, it would be:/ j. ]' ?. ?: B/ M5 J- l6 K
- ---example---
" H$ _, b/ N' q3 | - [DBEXPRESS] |/ Q2 Y8 t+ A) B+ A, ]
- sqldir=mysql_sql7 U& P3 ~ X; D2 C& T, B
- Drivername=mysql
7 i3 D* w: D% f: e - Database=test
9 A5 m }' V8 _9 P+ @- s$ F7 ]& E - Hostname=127.0.0.1
; E O' A; e% J& L2 G1 B - User_name=testuser
5 T) M' S) g( ? - Password=my_password
% k" c) |; k/ s4 @2 O& l+ b - GetDriverFunc=getSQLDriverMYSQL6 \( g7 G/ t6 i* r, e; H# s% B# K
- VendorLib=libmysql.dll' \! U# B3 u% ^, r1 b" S) V
- LibraryName=dbexpmysql.dll0 k4 W; j+ J# Y( ~# I* _
- Active=1
2 t& G( J1 }4 J. c5 z9 T/ c5 G - ---example----
$ G- u3 g/ }0 \/ W - - written 02.03.04 by pwk.linuxfan
/ [$ W. X) }+ C" g( Z% G
( q% Z* ^( U7 g+ \9 _
复制代码 |
|