|
|
麻烦翻译一下,下面这段文章:xhan + I, i1 _3 M# V! E3 A( Z
/ A- j2 s4 T6 |9 c$ Y- % h3 k x7 a. U8 [& a
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
, h* X/ V. [ m
' d r9 m. l" d- ### What we need ###% d# |0 H& [8 F8 f+ k! I
- Naturally, we will need a MySQL server to store the data for us, this document
4 B9 K+ P5 |7 [( C3 Z% M - will not explain how this can be done - there are documents out there for the ' K: N8 U3 A. T& U5 Q2 U
- interested. The requirements include a (empty) database for TeamSpeak to use& c ]' j8 m4 P/ p, I, {
- and a user account (username + password) that has the permissions to do stuff& V# C7 a( S3 t& d
- with the database. Additionally, you will need a vendor library installed on the% o5 \' s2 ~. d/ o5 I
- local machine, this came with my MySQL install.& A$ f x$ W1 R
- These instructions will not tell you how you might transfer your data from the
% ]0 Q1 S4 z! w% K+ r+ [0 o5 S# L - SQLite database to the MySQL database, we start with a clean and empty MySQL
1 Y, n; E! Z5 Z4 o H8 r& t - database.# k2 U& g( ^& w) K- L7 F% ]
- Some users have reported ways to import a SQLite database into MySQL, but at
8 s5 M2 e) W1 S+ T. y9 D - the time of writing, there are still too many issues - check the current status
! X! P6 {8 M# [3 U - in the TeamSpeak forums if you are interested.' z/ R4 t; ?7 Q/ R$ p
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from9 X9 _, {! {2 e
- Borland was used. This driver can only interface with the client library that 9 \6 k o' ]6 z
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this& n0 L, o4 k3 j0 n# s9 \2 _
- client library - basically all you have to do is to use a 3.x client library as 1 B- F6 f! t' V6 M- f. W, S+ j
- "VendorLib" and a 4.x database to connect to.
* V9 T( F' W: h0 Z( T - If you need more info about dbExpress, you can contact Borland.
! h' X, w. S0 t8 r0 u
* U. W/ l$ \/ h- ### Doing the work ###
4 ]5 U! H% F5 E4 F - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
4 M2 Y4 d3 C+ G8 [( k f - the perquisites right, just open your server.ini file, and add this section at
/ t0 c$ I) K7 q6 ]& Z3 ?9 M - the end:- f3 F0 b6 C! v
- ---cut here---
' [. G. n* P& E8 P: f# e& j3 P - [DBEXPRESS]
E5 c# G* l$ w( E - sqldir=mysql_sql& B: n; X( X+ e, E& { \, ^+ t
- Drivername=mysql! ]7 A( k# V! ]$ T7 T0 N
- Database=Your_Database_Name_Here
1 e$ E* B9 h- Q4 [) s - Hostname=The_PC_the_MySQL-Server_is_on
, D" m$ a. A7 D - User_name=User_name_on_the_MySQL-Server
; c1 c: q3 l. q* A' o - Password=Password_to_go_with_above_user_name1 Q1 ?: m: ^* `1 d3 D- }
- GetDriverFunc=getSQLDriverMYSQL
0 C+ p1 j, B" J5 K/ Z( ?9 K0 @ - VendorLib=path_pointing_at_your_mysql_vendor_lib
) w3 `9 @! g( w! f* l - LibraryName=path_to_libsqlmy_libary
$ w# @) o# F: {) E/ t- S - Active=1
) I5 k9 S3 T. K# i. N) ]8 a! _# I0 k - ---cut here---
+ F" R/ ]0 g4 R3 p& Z: ^, { - In my environment (a linux box with a MySQL server running locally) I have:6 q0 y! d( U( W- f V y' V
- ---example---
# p! z1 n2 M6 t# ~ - [DBEXPRESS]
* e# E1 L0 z$ q2 m( T; A. m9 P - sqldir=mysql_sql
7 [9 `2 q3 }4 q+ ]5 g+ e) y - Drivername=mysql8 D2 Q4 O" m% [8 b. V
- Database=test
) U5 b+ l% z+ F2 P3 s- K5 }* e - Hostname=localhost
/ o* B- h5 G7 C/ c - User_name=testuser$ f+ i2 U8 h6 A5 [6 c
- Password=my_password' H/ O6 C) q0 Y
- GetDriverFunc=getSQLDriverMYSQL
: ]% P* O( S; Z4 z# Z - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.03 {; N, ^3 ~, F+ X' g
- LibraryName=./libsqlmy.so
) r8 J% l! C9 U ~, ^; {6 V5 E - Active=19 \$ U% Y$ [5 v9 A( a
- ---example---, Q* q4 \: p' |- G2 K3 @
- 9 P. }" M' X, g# y5 ^! W
- On a windows box, also running the MySQL server locally, it would be:, e; h# }# J, A1 k# D
- ---example---# Y% O4 f8 v" U Y1 ~8 p
- [DBEXPRESS]. S$ g) Z. [7 ?- N$ T2 z' H
- sqldir=mysql_sql
?5 t8 }- x3 T0 z9 v; j; [ - Drivername=mysql
( m0 _3 g/ B/ r# D# ] - Database=test
4 B: K- k8 Z c, U - Hostname=127.0.0.1 Y8 f5 h( u1 I' s- k' G6 X. H
- User_name=testuser
' a: t5 K% g0 A: Z - Password=my_password& \3 f# P3 F0 J4 ~
- GetDriverFunc=getSQLDriverMYSQL1 r) r l& z% H( @! u, b/ |' s# z* `
- VendorLib=libmysql.dll
/ n+ t( I; j" P8 H" |$ N - LibraryName=dbexpmysql.dll% [; n6 n; R0 \ f
- Active=1
1 @8 I8 g8 o' b& z" Q - ---example----/ x. @4 F, m; ]
- - written 02.03.04 by pwk.linuxfan# f* S$ y8 ?# h& Y- S! v
. w! I0 s4 |, ?0 d
复制代码 |
|