|
|
麻烦翻译一下,下面这段文章:xhan : ]3 e7 l x) I) k
8 Y* o+ \ ], D+ B" }-
! x6 K g1 U( ^& R - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######- O1 S& Q8 w. {. {: S
9 m* q; r# R; o, V& h- ### What we need ###, W; x9 P0 M, B" v
- Naturally, we will need a MySQL server to store the data for us, this document
8 b2 b4 l! Y! P; D4 | - will not explain how this can be done - there are documents out there for the
: A1 V# O3 I+ b% d" } - interested. The requirements include a (empty) database for TeamSpeak to use
6 y$ M5 Y9 F6 f6 w% C2 m' ~* { - and a user account (username + password) that has the permissions to do stuff5 r1 V* C- n! a# p
- with the database. Additionally, you will need a vendor library installed on the& [# v( R! {5 T* z7 s
- local machine, this came with my MySQL install.2 p: d5 \( S$ b5 k. A9 k0 @
- These instructions will not tell you how you might transfer your data from the$ P( _7 Y: C2 y+ u8 j) N
- SQLite database to the MySQL database, we start with a clean and empty MySQL4 K( t9 {! u$ C: a6 e
- database.6 ~9 E; y2 P2 n- i2 r" G. F
- Some users have reported ways to import a SQLite database into MySQL, but at
9 G4 d/ T J( G/ K. x3 O ^ - the time of writing, there are still too many issues - check the current status3 c0 c# i8 o% j
- in the TeamSpeak forums if you are interested.
3 z+ t7 f* ]+ z$ x& J, p - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
3 s0 Z4 S, P+ S. r1 L% B$ H1 _ - Borland was used. This driver can only interface with the client library that 7 r2 K4 y# N$ D+ p
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
( p3 E- ^7 V# N8 p5 j4 j2 P( ] - client library - basically all you have to do is to use a 3.x client library as
2 K2 k% Q1 D7 \$ w6 c% M - "VendorLib" and a 4.x database to connect to.! K q6 z& A0 X, \. k. m
- If you need more info about dbExpress, you can contact Borland.
`% \/ o# Z7 [( y
5 j6 t: ^( O8 ?2 n b- ### Doing the work ###
) z$ S0 R4 f; E- T; x0 Y - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
( r+ B3 i9 J2 F7 F+ N7 o - the perquisites right, just open your server.ini file, and add this section at
- D! X4 c' C; G |# J7 f! E - the end:
( u0 o/ f$ R& _/ G' W - ---cut here---
8 s1 i" c! |0 J2 ] - [DBEXPRESS]& {6 v6 L. U* i" j ?
- sqldir=mysql_sql/ u9 u& N& G3 T$ D$ Q
- Drivername=mysql
1 Y7 O/ h; c1 D; m - Database=Your_Database_Name_Here
/ E; S! k3 ]* L7 l3 G I6 v - Hostname=The_PC_the_MySQL-Server_is_on8 s- X. S6 ?. s! W
- User_name=User_name_on_the_MySQL-Server8 h# S" L: v" R9 A6 u8 [
- Password=Password_to_go_with_above_user_name
6 g# |/ t! ^1 {& g5 g4 ] - GetDriverFunc=getSQLDriverMYSQL
% i4 `: H8 T* L - VendorLib=path_pointing_at_your_mysql_vendor_lib
3 G& E. v* m' B A6 p9 o - LibraryName=path_to_libsqlmy_libary! f- m. l( e* R) H
- Active=11 f0 g' ?& m9 `, @" F$ v' w# j
- ---cut here---
, S/ J7 t5 n" j) x - In my environment (a linux box with a MySQL server running locally) I have:
, m7 n, ] {& M& G" p0 k! g8 H/ g - ---example---8 D' y( w- _" ~ ]3 B
- [DBEXPRESS]
6 z+ ? K+ [9 l- g! z - sqldir=mysql_sql
5 A5 v$ g' F" J% U8 @7 b+ W - Drivername=mysql
5 @% f {6 A+ K* o - Database=test
& O/ h3 [7 j' h- z - Hostname=localhost% U' F7 u3 @" O
- User_name=testuser4 B5 f! s4 a, x9 d, B
- Password=my_password# C" K/ i9 h; r& s! J
- GetDriverFunc=getSQLDriverMYSQL9 S! ]% |1 c W _) N
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
0 k8 V8 y1 E5 ?9 u( N - LibraryName=./libsqlmy.so7 U, I8 A1 ?9 ]- h8 ^) V" _
- Active=1
- P% { b6 C2 Q7 t# w - ---example---' H3 d- K9 w& F3 N- x
- , T: f1 V% Y7 ]. i
- On a windows box, also running the MySQL server locally, it would be:
# A. {9 r, [9 F5 U - ---example---
9 s# D, J( O8 {3 K6 Q! X - [DBEXPRESS]
7 ~: V1 u' b; y- f - sqldir=mysql_sql% Q8 Y& E5 g k# M# x
- Drivername=mysql
; I4 X0 A8 J# O/ m; H5 a - Database=test2 A) }! s6 O; }, a
- Hostname=127.0.0.1
. m- |4 b1 ? N( l$ K) X0 g% n - User_name=testuser
- n. C5 g( E5 i9 p- A4 \- m - Password=my_password
+ ]7 L; o( n" B& J/ C+ W - GetDriverFunc=getSQLDriverMYSQL
0 W/ D9 q }. T }3 V" n - VendorLib=libmysql.dll5 a7 W' x V, W$ D \
- LibraryName=dbexpmysql.dll
5 [' L0 r; T7 t. x - Active=1
6 O8 n/ |' g q! b- r$ q - ---example----
2 u$ R, v7 B" F. ^ - - written 02.03.04 by pwk.linuxfan" P4 l7 v. W |; m# ~- h
- + l- s( S9 ]9 H0 M# c
复制代码 |
|