|
|
麻烦翻译一下,下面这段文章:xhan
* e l; s% {( S4 |) f( E% N- H
( V; e, k: C# ^6 Q# A) n: Q-
, y+ X; t, E8 @4 q2 V+ C - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
8 f# E% G! D$ G& |/ @0 ?( H
5 W7 j: H' E8 Y6 L6 S- ### What we need ###
: Z% h; h! A$ @3 A2 b% _( c1 T X - Naturally, we will need a MySQL server to store the data for us, this document
/ L; e$ q1 E9 V: ~ - will not explain how this can be done - there are documents out there for the + [0 O% I( J F- |9 k4 ` i
- interested. The requirements include a (empty) database for TeamSpeak to use- p p. @* F1 N
- and a user account (username + password) that has the permissions to do stuff
$ b0 m8 t; h. k7 j9 [; g" S - with the database. Additionally, you will need a vendor library installed on the
, N& r& d) f2 P Q4 r - local machine, this came with my MySQL install.
, @: l4 N3 @2 t6 P( u7 f - These instructions will not tell you how you might transfer your data from the
7 O/ u& o. o- }! D- [ - SQLite database to the MySQL database, we start with a clean and empty MySQL
9 x# z g+ D! n - database.
1 v/ k O, |1 b- E+ e6 ?- ~, `6 g - Some users have reported ways to import a SQLite database into MySQL, but at5 P4 J! ~7 ^3 u
- the time of writing, there are still too many issues - check the current status
6 C6 f C& G8 v) m( x5 i5 M) d1 @ - in the TeamSpeak forums if you are interested.
2 A0 }/ m+ m7 \" ~, | - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from3 v3 @6 M# n) F/ F7 |' g
- Borland was used. This driver can only interface with the client library that
4 d, w7 w1 ^2 o/ e7 M - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this2 @0 O7 `* J5 J* Z
- client library - basically all you have to do is to use a 3.x client library as
, V; T$ x6 o* J- R, h3 O9 K - "VendorLib" and a 4.x database to connect to.+ E+ L$ O1 e4 ~ J! ?0 s
- If you need more info about dbExpress, you can contact Borland.
0 K. {' N7 F% E; |
8 A2 ~3 Q+ R* a- ### Doing the work ###
" C/ L8 T6 U# _5 ]9 D( o" L( M - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all" v0 h6 k- Z/ g; W7 [4 N% H7 b# j. f
- the perquisites right, just open your server.ini file, and add this section at
/ T9 o! r0 ~0 a$ V1 \: r, n) X - the end:2 X `5 J" T7 d6 b& }# `; F5 E
- ---cut here---
2 `* S8 L: u- J5 Y. C Q; m( } - [DBEXPRESS]
& \! R# \3 |1 z: j: Q - sqldir=mysql_sql' b8 `1 C7 b3 o. m" `7 `0 E3 W
- Drivername=mysql$ j% w3 A5 ?' _
- Database=Your_Database_Name_Here
: p& a4 M) w( F& c - Hostname=The_PC_the_MySQL-Server_is_on
# @+ o/ w: }" A - User_name=User_name_on_the_MySQL-Server, x/ }# g. R# E, M$ t) R/ z
- Password=Password_to_go_with_above_user_name0 ^ p. C1 x0 z' I r9 `
- GetDriverFunc=getSQLDriverMYSQL6 T$ |+ M; I k7 R
- VendorLib=path_pointing_at_your_mysql_vendor_lib
' W8 k$ v: ]& O9 o3 n8 m$ m' m% C - LibraryName=path_to_libsqlmy_libary) E0 P+ b7 {1 P- H
- Active=1' I# ]8 G6 }6 u! Q' W# I$ y
- ---cut here---5 t7 b% d% G+ Z* F2 U0 \
- In my environment (a linux box with a MySQL server running locally) I have:
7 Q: {* v" n# N8 \9 A& f3 v) t2 T - ---example---
s- i: H" T# r6 f - [DBEXPRESS]
0 D. U, K# m( V5 V' ~4 N - sqldir=mysql_sql6 B) V) q% m. S$ k N) V7 F
- Drivername=mysql7 ]2 N) @. i6 Y9 B9 i% \
- Database=test" u/ y P& l* Z
- Hostname=localhost
% W/ S8 d/ {% w0 Z - User_name=testuser
, g- |* v2 p$ U& P4 p; g. H) S - Password=my_password5 k* L/ f- c3 Y6 t
- GetDriverFunc=getSQLDriverMYSQL3 u* T% s. K' x
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
" n% w6 B, ]9 E, n" { - LibraryName=./libsqlmy.so8 Y. N% `+ {( s' |9 h: Z
- Active=1
; N: p- q7 `) k+ H2 n. o2 o - ---example---
; d# S Y8 U8 l - 5 b: d; t) z# i- _
- On a windows box, also running the MySQL server locally, it would be:
" j2 @0 j) ^+ l- K - ---example---( [3 D; h+ W6 k# c2 o7 d' h7 f
- [DBEXPRESS]
' p/ Q' ]: N) }: x - sqldir=mysql_sql/ C: {0 C+ Q2 a1 _
- Drivername=mysql
0 C% S b% V% }8 P, e. V7 T' a - Database=test* i) S) @5 X3 H e4 X
- Hostname=127.0.0.1
* h- o; a! g1 p8 h9 F1 a0 S - User_name=testuser
( q% O$ {" r0 A0 S# Z, n - Password=my_password
1 k3 ~" M' M) C& E7 Y - GetDriverFunc=getSQLDriverMYSQL
6 H$ S' { L" ^- O7 f7 I8 B - VendorLib=libmysql.dll
6 h" j; a9 O5 I3 u% t. k - LibraryName=dbexpmysql.dll
" F# [ D4 |; K4 y- n. F4 j# L - Active=1
2 Y" B3 V. p$ \! v: \. S8 B' N - ---example----2 l! t Z! D' J, t8 m
- - written 02.03.04 by pwk.linuxfan0 ~+ d% T- x) S, T3 X
- 1 ^6 X7 ]: c2 F* J0 n/ {
复制代码 |
|