|
|
麻烦翻译一下,下面这段文章:xhan " m' G2 ]( B$ m( n. n* j+ c, z+ K
; A6 s) B+ S4 L& s' l* M- f7 N- h-
: d8 b4 R3 L; q5 ]5 { - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
0 x/ z" D* m% K( b' l t* N; @
4 b: e& r/ L' R5 `5 ^# N- ### What we need ###
2 T- H0 y7 D- h! h, `* r! g - Naturally, we will need a MySQL server to store the data for us, this document
: H8 O! g. J( J: U7 }8 t - will not explain how this can be done - there are documents out there for the
6 x# c9 i9 X% k% B - interested. The requirements include a (empty) database for TeamSpeak to use
- }+ H5 v* W+ P- Z: P5 Q0 c - and a user account (username + password) that has the permissions to do stuff
6 W; p. {2 I8 j4 r; V - with the database. Additionally, you will need a vendor library installed on the
. z6 X& C" F- c; \- Y8 x7 r S - local machine, this came with my MySQL install.5 X7 m9 n" o+ N3 |, A1 A3 L9 f
- These instructions will not tell you how you might transfer your data from the
' R5 v/ B' l! ~$ R' j# @ - SQLite database to the MySQL database, we start with a clean and empty MySQL
2 N3 S" S" g a2 E5 Y+ Q - database.
5 y" g7 F4 e- V( T w, B - Some users have reported ways to import a SQLite database into MySQL, but at3 T7 i1 f# a8 B* p
- the time of writing, there are still too many issues - check the current status
" H" u8 N' C. e. A Z! y - in the TeamSpeak forums if you are interested.( c. I. S( N6 c% r: T- y l+ m
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
a/ P; [8 }( g9 C) _8 o - Borland was used. This driver can only interface with the client library that ( i5 H. v+ b B# e% i) E1 A
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this# O1 x: o4 q# ?+ f+ z9 ~
- client library - basically all you have to do is to use a 3.x client library as
. V c; c8 [; k; e% E3 Q7 d - "VendorLib" and a 4.x database to connect to.7 L. f% X" h) d( \$ G, h1 R
- If you need more info about dbExpress, you can contact Borland., i1 _/ @/ l. Y! ^+ Y: |4 `
9 u% t' j* A0 Y# k; I5 }- ### Doing the work ###9 V6 X* q2 d" J8 p* r
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all$ R; x" G+ D3 r) h% x
- the perquisites right, just open your server.ini file, and add this section at
2 y% I! c \9 `( o$ h/ k& G5 f6 F - the end:
j# Q0 O, _. n) u+ ? - ---cut here---
$ m2 H$ D' f9 |+ j$ L7 d - [DBEXPRESS]) G' P4 A- H# i$ f
- sqldir=mysql_sql
9 a# b6 Q6 a' Y3 [$ S @ - Drivername=mysql
2 q1 ^( p. k6 p. f - Database=Your_Database_Name_Here
* _) y# z8 v* @; @; r - Hostname=The_PC_the_MySQL-Server_is_on
1 g5 i! h9 d' U, o, O - User_name=User_name_on_the_MySQL-Server7 P: d1 @4 V: y2 E; [( ]
- Password=Password_to_go_with_above_user_name
4 d1 z+ @" a, \0 Z4 p/ c6 [& M - GetDriverFunc=getSQLDriverMYSQL+ `; f% g* \1 A7 j
- VendorLib=path_pointing_at_your_mysql_vendor_lib
B/ \ \( _# c. J9 v( i - LibraryName=path_to_libsqlmy_libary. d$ [" V0 e. a, u' }
- Active=1. p4 B5 U, G' _$ B0 G6 @
- ---cut here---0 M1 a+ u0 A& h9 z# g, Y& R& n
- In my environment (a linux box with a MySQL server running locally) I have:
8 m6 r& K, x- K# z; H8 j1 c - ---example---
T B7 K: T% ` - [DBEXPRESS]. w9 i8 h& I2 o9 r5 W( \
- sqldir=mysql_sql
' X2 C1 ?5 B% Q+ H! H7 A' n" ^ - Drivername=mysql
! \; ~; a- C2 ^7 ]" Z - Database=test0 j; z+ N1 o) K. e! q1 ~
- Hostname=localhost# L6 c: s# M, ?, ]
- User_name=testuser$ e \* Q5 c9 ?. G( M
- Password=my_password
! C5 R; ]! |! ^" D$ L - GetDriverFunc=getSQLDriverMYSQL
; Z* Z6 `: B. c1 g7 H - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
7 e2 K! ^/ A ` - LibraryName=./libsqlmy.so
2 }$ T( W3 B8 s+ g, P* R - Active=1
; J s; p- j. z e& N) ] K/ U1 s - ---example---
6 u' ?. F* l( I1 L3 R1 W1 S* q
- \" _! D! J7 m5 a& E6 S- On a windows box, also running the MySQL server locally, it would be:
' w4 ]& J4 [6 q1 e - ---example---
+ y7 M# E% K$ g0 L k - [DBEXPRESS]
8 i/ @' w1 h3 ~+ n& j: K c - sqldir=mysql_sql: K# c8 G( b* V8 W7 T
- Drivername=mysql
' M. q9 x8 S# A# {& n: m& O - Database=test
0 i7 Z5 C; H1 x7 ]" b7 K - Hostname=127.0.0.1
" [ k3 z- I7 [/ \, d - User_name=testuser& z5 S- ~, O; L% B# F
- Password=my_password
& j7 z# x) e- f - GetDriverFunc=getSQLDriverMYSQL
) M- p) V2 w! f3 [4 I4 a$ U - VendorLib=libmysql.dll
' R1 W5 r- h1 m. r - LibraryName=dbexpmysql.dll
: ^6 s. o$ p1 o7 {- b% i - Active=1
% z3 e8 ]4 m; e- _5 `) @6 q - ---example----
5 {- i3 K# F4 w6 t w - - written 02.03.04 by pwk.linuxfan
. }8 ~# S2 x0 ?% O. C: |- l; Y# Z( V
: l9 U7 ]0 w8 Z( x7 ^7 J8 N
复制代码 |
|