|
麻烦翻译一下,下面这段文章:xhan
! t. O/ B! D. B4 |. X/ ^; C% C7 P' h1 `( d! o$ S6 A
- 5 W7 a% H% f% P! f- Q; V
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
8 c5 T1 F N: i$ H9 t
: D V6 l7 F, T# X- ### What we need ###
9 [0 {/ u7 i3 ~3 X0 Z# ?4 J- Q9 I - Naturally, we will need a MySQL server to store the data for us, this document
# G7 X7 g, a% G8 b( p! F - will not explain how this can be done - there are documents out there for the 4 D8 H9 d" o# V# } m1 z8 z4 x
- interested. The requirements include a (empty) database for TeamSpeak to use
" N8 d7 q/ i1 V0 P6 p7 B% P Q - and a user account (username + password) that has the permissions to do stuff; M$ H$ i, b- W7 `& s4 Z% A; Q
- with the database. Additionally, you will need a vendor library installed on the
4 |8 u* ]- O* C' q1 y, W: G - local machine, this came with my MySQL install.
: s8 o$ \) W9 f% {) Y. f8 x, Q - These instructions will not tell you how you might transfer your data from the
" _+ s: u7 a" w! s; V - SQLite database to the MySQL database, we start with a clean and empty MySQL5 P# W$ ^) |, y0 H) U8 W( s; {
- database.- X( g' Y6 c: a/ F7 b1 F3 `" |# n
- Some users have reported ways to import a SQLite database into MySQL, but at
, w# _1 |- Q' d- i8 F S - the time of writing, there are still too many issues - check the current status: O- K$ G& x- f- l9 m
- in the TeamSpeak forums if you are interested./ n: s# e7 M. _- K
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from9 o+ s; C( ^ P- R
- Borland was used. This driver can only interface with the client library that
4 d( \6 E, y1 t - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
% a8 A9 G, u5 H( Y7 d# I% J - client library - basically all you have to do is to use a 3.x client library as 2 ] z. s' q+ [0 m
- "VendorLib" and a 4.x database to connect to.. s8 d. Q% J& t3 {" R% j. F0 [( s* {1 H
- If you need more info about dbExpress, you can contact Borland.
3 M" M- F' f/ T: ]& Z0 q - 3 x* k* o: B0 V: Y
- ### Doing the work ###
. l& U* a+ L2 P7 I - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all8 |' m* b0 U! n4 Y- N& O
- the perquisites right, just open your server.ini file, and add this section at1 C& z0 U! t) A$ L
- the end:
% O. ]% O o* J% N* h! p - ---cut here---
- P; ?$ d$ L* v. X Z - [DBEXPRESS]4 b q' b- K1 a; \$ _
- sqldir=mysql_sql
+ |% G0 @) L0 ^1 u. {% N7 j - Drivername=mysql( }$ T; t8 K) a: J1 k5 q
- Database=Your_Database_Name_Here M& m! _# i6 Y0 n+ p
- Hostname=The_PC_the_MySQL-Server_is_on
# c8 \ S# k! D, S& ~+ J6 o1 i - User_name=User_name_on_the_MySQL-Server
1 T1 G* q* l0 y! a+ p' r3 P - Password=Password_to_go_with_above_user_name
8 R- X8 v* G4 b W0 M - GetDriverFunc=getSQLDriverMYSQL
* Q7 G6 [6 \. A4 V5 v: @ - VendorLib=path_pointing_at_your_mysql_vendor_lib
! D% @) c* B) W O - LibraryName=path_to_libsqlmy_libary" i j$ M8 T. G6 h# e' N8 l
- Active=1
: e1 g$ ]2 ]* @# S - ---cut here---( L- {1 l( t* j" q2 X3 t# a
- In my environment (a linux box with a MySQL server running locally) I have:3 Y; {8 n/ }2 w! t3 e; ^ O7 B% s
- ---example---* ] y& p4 g% E
- [DBEXPRESS]
- b5 M! H7 C* Q- u0 V - sqldir=mysql_sql
" X$ c9 s' ~, h% m$ s - Drivername=mysql( ?) Z `% z2 z- N
- Database=test$ E4 g& L2 q8 Y& g7 w
- Hostname=localhost
& j' }: @+ @; O; t& Y1 E3 [ - User_name=testuser$ x3 H% M8 h' {5 o$ }/ j4 n
- Password=my_password
! {# i' q, u# b* k$ S - GetDriverFunc=getSQLDriverMYSQL
" v3 N5 ]5 t' x" G3 J9 c* ? - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
1 b9 c) ^% p* Y$ Q' ^. e - LibraryName=./libsqlmy.so
( ~6 e+ h5 l% [. d9 d' ~, N - Active=1
' p- t3 x6 j/ M& b) J* y - ---example---$ q6 k2 H- ~9 }4 }* r& D
- ' O# A6 d( E8 J/ B
- On a windows box, also running the MySQL server locally, it would be:
* {2 Q5 }1 Q0 w$ [1 _ - ---example---1 f& X: l0 w3 Z- w8 ?$ d2 K0 R0 Y
- [DBEXPRESS]' O, V! K- i& P5 P9 S4 I/ [7 l
- sqldir=mysql_sql- R0 I" X" Z) q7 e
- Drivername=mysql8 l, E& c$ ~' m( o0 H1 Q3 C% x
- Database=test
4 d- h! X! U% x1 i# a5 i0 ~ - Hostname=127.0.0.12 }0 J. m' ^$ {1 O- D" E
- User_name=testuser
/ N% d$ N1 K! S& Q# h - Password=my_password
- S* I9 s. t! D o/ s - GetDriverFunc=getSQLDriverMYSQL
) C0 {" _" `; n2 ]& j! y/ v7 T - VendorLib=libmysql.dll$ c2 e) S7 C( v/ E8 F f4 u
- LibraryName=dbexpmysql.dll
5 {* W0 H6 Z3 r# { b - Active=1
. Y: H# i2 c# M/ A" W6 l, H - ---example----
! ?6 R* r3 ]. F( \; r - - written 02.03.04 by pwk.linuxfan4 Y+ n/ f# }/ b3 z3 m$ C
- # k! e) z8 t: J# T& A( A$ R7 E" u/ |
复制代码 |
|