|
|
麻烦翻译一下,下面这段文章:xhan ) L( A: N* L+ a0 j) P
2 A2 U% j5 b$ Y& A! ^8 g
-
j. q: x* _7 o6 X) r- v - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######7 N" H0 S% {( J7 H$ C
- / p# | R* W M
- ### What we need ###5 k% \. X, s6 x; @7 `; K: V
- Naturally, we will need a MySQL server to store the data for us, this document 5 `( z" u: F. F
- will not explain how this can be done - there are documents out there for the 7 S2 z/ ?0 G6 Q- G0 @+ q9 V
- interested. The requirements include a (empty) database for TeamSpeak to use
5 G. }; o" A# ?0 ?2 ]( _8 V. J - and a user account (username + password) that has the permissions to do stuff
/ g5 F8 j- _; Z( ]; [ - with the database. Additionally, you will need a vendor library installed on the
9 r1 `* n% a7 O( B, f - local machine, this came with my MySQL install.
6 v% `& T0 n: _. R - These instructions will not tell you how you might transfer your data from the
4 s" f4 B f$ i# v+ `# S# N - SQLite database to the MySQL database, we start with a clean and empty MySQL4 h& a& z* E( m3 _* X9 H
- database.- s& }) u# p7 e ?" I7 Y
- Some users have reported ways to import a SQLite database into MySQL, but at! u- E: [1 L$ q3 R) l3 b ~
- the time of writing, there are still too many issues - check the current status
8 r, T- V5 K/ z5 v/ q/ N0 ]9 c - in the TeamSpeak forums if you are interested.5 U- {7 x! Q* V9 s6 C
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from/ ], j7 }5 s5 o- z' R+ Y# T3 t4 E
- Borland was used. This driver can only interface with the client library that 6 b2 S) h' v- K; o6 V! y
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this; B% O2 Y8 a1 V
- client library - basically all you have to do is to use a 3.x client library as
0 s- h! W7 H& e1 F2 D - "VendorLib" and a 4.x database to connect to.
- K" }! o! t b - If you need more info about dbExpress, you can contact Borland.. N+ o3 d' F& F8 r
3 K* p* g# Y, ~: d! j3 ^- ### Doing the work ###
' {) M* Q: p4 j9 g0 {6 m, Q - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
& K% U0 N& J; q5 _* J! l - the perquisites right, just open your server.ini file, and add this section at. |6 o- R$ ]+ S: s/ ~6 b
- the end:1 E$ q2 z, ?2 C
- ---cut here---
6 U8 N& H( g8 c+ p) R - [DBEXPRESS]
8 B( d X% X: e" { - sqldir=mysql_sql
! R! B9 S9 N5 _; b0 ~' L# B - Drivername=mysql
& T0 k& G7 [3 ~/ R! W8 [. m8 X - Database=Your_Database_Name_Here6 N& `' G' n: K* ?, ]( a
- Hostname=The_PC_the_MySQL-Server_is_on
1 C& T! X( m8 l9 P3 U6 ~ - User_name=User_name_on_the_MySQL-Server
% C, t- z* w8 V% v& C. w - Password=Password_to_go_with_above_user_name
1 S; }: K/ W5 M - GetDriverFunc=getSQLDriverMYSQL8 D" z S5 X1 D8 p. x
- VendorLib=path_pointing_at_your_mysql_vendor_lib
: [! Z; {( z# @1 ]( [* r6 a: k - LibraryName=path_to_libsqlmy_libary' k, E) w7 a! ~
- Active=1
5 [5 t, o |, @% @ - ---cut here---
% `0 b: `' d& v3 y3 G - In my environment (a linux box with a MySQL server running locally) I have:
$ y# V8 U# w* @2 o6 J2 m4 o6 j( e - ---example---
* J! V" l5 ]* e3 Y - [DBEXPRESS]
* ^4 b4 m' o0 \# H% s - sqldir=mysql_sql
: |3 e' a2 v* D( k - Drivername=mysql
) z) n: S# U+ ]$ W I - Database=test! n# F. d$ Y+ V4 j+ J
- Hostname=localhost: Q+ S0 M" d' ^" \9 U
- User_name=testuser
- X+ x2 r- d6 E$ }+ h/ W- [1 { - Password=my_password' w" X7 @8 w& h3 R
- GetDriverFunc=getSQLDriverMYSQL: e( m" G5 q: a& p+ K1 T+ E) e
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0" U1 N9 R6 ^! k' A% J* {
- LibraryName=./libsqlmy.so7 w& U6 d, I& y) I3 P+ T0 f% [
- Active=1
1 O7 f3 U: r$ ?2 T: C. o! D" F - ---example---
' \+ q$ I6 X, Z8 T* S1 D - 8 w1 g6 C8 x8 ]0 o& | y- z0 T/ t( l
- On a windows box, also running the MySQL server locally, it would be:# P# F( z/ ?. R+ B* @; F
- ---example---1 @6 a# V3 ~3 y5 y: Y
- [DBEXPRESS]: p/ t1 Q) i. k7 O: Z9 N B6 u: n
- sqldir=mysql_sql
; Z8 o7 P9 s7 l' j - Drivername=mysql
1 v9 P j, i- n5 b( j. Y e - Database=test
" e! K+ L7 c+ q% y - Hostname=127.0.0.1
% ?/ R& l; t$ u. K% x) B0 s - User_name=testuser
' ?# g8 `' ?+ a. A* P$ l+ }- O - Password=my_password
$ X) J/ @6 D' H3 j - GetDriverFunc=getSQLDriverMYSQL2 F+ \9 U7 F6 h3 e# `- T' u
- VendorLib=libmysql.dll
( s; k, L' ]$ C+ b9 n - LibraryName=dbexpmysql.dll
6 q0 ?# Q; n' i8 v! D - Active=1
+ _3 S* K" {; _: l; c( r5 N - ---example----$ k4 R2 O3 y5 @% U- v
- - written 02.03.04 by pwk.linuxfan
% W) A8 J0 \/ A! V- }7 ~: y: G - * N8 {' i7 h* C% Q* r! P2 h
复制代码 |
|