|
|
麻烦翻译一下,下面这段文章:xhan . F2 T) \1 m9 i9 q; d$ M2 M
& _" C' ~7 y, z+ D
-
; v& _# b( I' H2 o2 u - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
; t# X* F9 K/ i( d - - ?" [9 a8 a% i0 C% M
- ### What we need ###
8 K1 z- b! A* S; K$ y - Naturally, we will need a MySQL server to store the data for us, this document
& p4 M# y: F0 y; g - will not explain how this can be done - there are documents out there for the
0 p8 O3 D k9 _# s7 {# C& z6 ` - interested. The requirements include a (empty) database for TeamSpeak to use0 n" _1 H$ c8 V+ m1 y" t3 }- p
- and a user account (username + password) that has the permissions to do stuff T* ]6 [* U" j' x
- with the database. Additionally, you will need a vendor library installed on the
8 N) F) s2 l% |: {' i9 _) C, u - local machine, this came with my MySQL install.% u# o( v4 w/ L9 T# A, ^
- These instructions will not tell you how you might transfer your data from the
) W, F# {5 |& l2 i5 b4 n' | - SQLite database to the MySQL database, we start with a clean and empty MySQL6 n. A0 r2 e3 K( ]' x
- database.) ^# t! e8 \. i; y" d" H( o
- Some users have reported ways to import a SQLite database into MySQL, but at. M+ e: M8 m+ H
- the time of writing, there are still too many issues - check the current status$ Z/ {' j# ^& i
- in the TeamSpeak forums if you are interested.
& W0 P) v) ~# k5 A$ P - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from* w% d _+ K3 \' D: n! V( o7 I0 ?
- Borland was used. This driver can only interface with the client library that
, |: Z! P4 T( u1 M& S6 Q8 p$ `8 a - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this6 Y& I/ K/ A8 G8 H
- client library - basically all you have to do is to use a 3.x client library as ) }% O& h% p/ N3 u* A e0 O
- "VendorLib" and a 4.x database to connect to.
% l. x" W$ D- p% o3 J+ ]' J% X - If you need more info about dbExpress, you can contact Borland.2 A; k8 g7 b! R# w
- ( p; D1 H& m* q/ J7 E; G4 x! T% R5 [
- ### Doing the work ###3 Q6 F! J( F2 p5 K) P. v
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all5 C, v2 k, S7 N0 K
- the perquisites right, just open your server.ini file, and add this section at; z, |, |0 X2 ~
- the end:
. f& x6 s( ]/ r; h# ? - ---cut here---
2 ^; W% S+ \, Z) i7 v; L - [DBEXPRESS]
. Y* [/ J' X% W, V - sqldir=mysql_sql5 n: V2 I5 @$ t* P( P
- Drivername=mysql
' V1 Q; w$ E- p7 ?7 f" ^: f - Database=Your_Database_Name_Here, {% U" k2 @! w9 ]* J$ e
- Hostname=The_PC_the_MySQL-Server_is_on
+ H3 p9 ^/ U0 t: T0 Q - User_name=User_name_on_the_MySQL-Server
: |- C0 I0 @2 H" A2 J% U/ x - Password=Password_to_go_with_above_user_name" C3 ?) s5 l( P+ |5 y |
- GetDriverFunc=getSQLDriverMYSQL
9 o7 w3 w2 f3 i% W$ `* Y) @" P; K - VendorLib=path_pointing_at_your_mysql_vendor_lib
, Y" T2 y6 a7 }+ x2 c T* X9 N0 V - LibraryName=path_to_libsqlmy_libary# t1 L6 ?9 b& ~$ f
- Active=1$ O2 u- P$ o% D4 [3 s& M' l
- ---cut here---
( P+ `- a, A+ z0 u/ D - In my environment (a linux box with a MySQL server running locally) I have:& s! N }* U0 v$ n( A- X' f
- ---example---6 q6 f5 S% n6 |$ ^- h0 E% g
- [DBEXPRESS]8 T: A5 ~3 s/ L5 S* \7 @4 {, n
- sqldir=mysql_sql5 |6 c R# q% u; W* Y1 U
- Drivername=mysql
$ C; d C0 r+ y3 O - Database=test
; g G, S* }, Y, O - Hostname=localhost
* x; S( \( e: u+ `. W - User_name=testuser
* {$ T) `0 E i2 U - Password=my_password
6 C9 x- n& H/ @5 }, P- q% g - GetDriverFunc=getSQLDriverMYSQL4 G4 p+ U9 h' o0 B: y
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
+ Y, x$ B4 O; s1 U7 H* e6 e v - LibraryName=./libsqlmy.so' L% k- M, Q( j
- Active=1
7 @4 Q: I$ d2 m4 G( E - ---example---
' Q8 N, k" h& q8 i( x8 e E - & K7 D2 c3 Z1 A7 R' j& ]% i7 c
- On a windows box, also running the MySQL server locally, it would be:
* } X6 }9 h' r5 u, h& o' h* g - ---example---
0 p! c L& p* a& [3 T2 o# P9 e8 l: M - [DBEXPRESS]# g' c# Z3 n/ q/ S
- sqldir=mysql_sql( g/ A2 ^' L+ k" C
- Drivername=mysql
/ B4 x* u9 v4 Y3 w' ?2 _8 V - Database=test! G" R8 K$ M0 @ L! M
- Hostname=127.0.0.1' _6 _) Q. u8 h! K/ t
- User_name=testuser# y8 ~7 _- I; [) O X
- Password=my_password: _- P5 e; R: q* [) V$ I
- GetDriverFunc=getSQLDriverMYSQL
7 W9 Z' ?% k. o% L, L - VendorLib=libmysql.dll
- j; Q0 u# i" x8 ~$ M! ?7 P - LibraryName=dbexpmysql.dll5 M+ Z' X* r5 `. ]! m2 |! \
- Active=1
6 f/ n) ~) S# S X$ U. q0 |0 z) ^ - ---example----1 _! ~7 T1 I5 p5 x" l! N S
- - written 02.03.04 by pwk.linuxfan+ c/ F" K: V% T; \0 J
+ n$ U# ?( \, }3 O6 i! x# u( e
复制代码 |
|