|
|
麻烦翻译一下,下面这段文章:xhan
8 n6 A* ^( R, i: d! X/ _* M$ W7 _0 z% j j( o# {
-
3 L; I7 M! R; n9 @0 R9 ? F2 M - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######7 X( ~4 K6 Y t
& A& w B% y: A- ### What we need ###
' }4 _2 L w) o9 o$ c8 ~1 m. @- ^* O8 Q - Naturally, we will need a MySQL server to store the data for us, this document + j5 A/ c" D( g: L
- will not explain how this can be done - there are documents out there for the ; w+ k3 ?* n% D/ i7 }! R
- interested. The requirements include a (empty) database for TeamSpeak to use$ z4 n( N1 t# Z+ ], u, B
- and a user account (username + password) that has the permissions to do stuff& [/ L4 [' e/ j- x2 V/ o
- with the database. Additionally, you will need a vendor library installed on the4 W1 l# i" S, R+ _
- local machine, this came with my MySQL install.
: z. o: ^' J* p% e& a/ |8 ~: y - These instructions will not tell you how you might transfer your data from the1 }7 k+ ?3 u5 p
- SQLite database to the MySQL database, we start with a clean and empty MySQL* [' Q7 i9 E+ t: ?2 }0 B
- database.7 ~' \1 Z: N# M
- Some users have reported ways to import a SQLite database into MySQL, but at/ g7 g9 T* a n
- the time of writing, there are still too many issues - check the current status
% m) Q9 H; P a F) n! @ - in the TeamSpeak forums if you are interested.
9 a/ f7 H Y j/ |/ } - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from6 [" A6 X' o" d0 {
- Borland was used. This driver can only interface with the client library that
& C/ V. C; N5 H+ ^7 m - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this5 s- R: V* k% b* D# r3 f
- client library - basically all you have to do is to use a 3.x client library as + q. m7 A" p0 r
- "VendorLib" and a 4.x database to connect to.
9 a: j" `( d K' n' g9 V& o& k - If you need more info about dbExpress, you can contact Borland.& T# e3 {6 a B; u% {% w
9 h& [! A0 ^ |% J- ### Doing the work ###( E1 i1 g7 M# y7 r6 n
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
N6 L9 ^1 Z8 Y$ J3 { - the perquisites right, just open your server.ini file, and add this section at/ Q" g/ L0 _. r, G$ h3 H( a
- the end:
+ `3 ~# y/ \! l - ---cut here---( U% V6 W/ x7 G* g: o
- [DBEXPRESS] V7 z* N3 u* P9 T
- sqldir=mysql_sql) c! b3 M: Y/ _7 j" G5 D
- Drivername=mysql& v& `5 b7 L9 I' H1 y0 J: ^$ `
- Database=Your_Database_Name_Here! R( @( y w7 g2 K; \. G
- Hostname=The_PC_the_MySQL-Server_is_on
! Z' Q" q+ I3 k' S( f - User_name=User_name_on_the_MySQL-Server
) g3 E! | d& i+ z6 X8 G! g - Password=Password_to_go_with_above_user_name! _5 ~- M) w) x- Q- V* F7 x
- GetDriverFunc=getSQLDriverMYSQL) u% n! A `( U7 q3 l4 T) ?
- VendorLib=path_pointing_at_your_mysql_vendor_lib# v9 d5 X2 b& d4 v/ b+ f. d* j
- LibraryName=path_to_libsqlmy_libary9 ^" E& ~) |9 g+ l- y& |
- Active=1
" k! }" g! ~& C. V2 a - ---cut here---- [' z1 q1 z- D P' J
- In my environment (a linux box with a MySQL server running locally) I have:
F: b- G( E2 ~# d7 p! M) a - ---example---. V: l! m+ A' d
- [DBEXPRESS]
, L$ y7 X* t+ U' U - sqldir=mysql_sql$ [0 X- \1 ~3 m% `0 F' Z/ ~* i) h0 o" `
- Drivername=mysql, k. s+ w: i# a% X' E/ b
- Database=test
, _: [8 @5 T: w% v - Hostname=localhost( b# l, q% R3 F; j/ ~
- User_name=testuser4 v; Z1 `- n/ B% n T
- Password=my_password
! Q6 e" \7 ]" C - GetDriverFunc=getSQLDriverMYSQL" v, G# B% I( N9 F, k7 } P# w
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
+ A$ m# x, E% I3 l0 V - LibraryName=./libsqlmy.so
0 j# l9 h) X4 ]2 P# U - Active=1
0 Z! C, S6 r6 e; N* O& L. I - ---example---
; l$ |7 z& f! `( e0 y3 q
& f4 k+ D1 K5 K d0 ?5 T- On a windows box, also running the MySQL server locally, it would be:
8 e2 g* R, q1 W' m B$ ]& D+ G( d/ V4 ] - ---example---
: n: {( C: l8 X - [DBEXPRESS]
$ i o8 ~/ U0 K/ j( p - sqldir=mysql_sql/ c2 o, l; M8 v
- Drivername=mysql
: ?$ J W! W( |4 H& G6 i6 J. n - Database=test" w& x/ I# H2 N/ Z
- Hostname=127.0.0.1
% n! I4 X5 u1 _- M r9 C - User_name=testuser
8 [7 b3 o5 ?# \9 x; E& b" A7 ] - Password=my_password4 T. ?0 G2 x/ l u& y
- GetDriverFunc=getSQLDriverMYSQL
& {% c- n0 I s" [: ]$ w5 H3 H' m - VendorLib=libmysql.dll8 ~& ^7 U$ m% ^) G% y0 d
- LibraryName=dbexpmysql.dll
( K% H/ Y+ N- p) e. p - Active=1/ Q- k" s) @ Z/ O4 s# Y
- ---example----
; ?' f3 a! H/ y. F2 ]/ R/ B9 _ - - written 02.03.04 by pwk.linuxfan
: u* z+ M* f1 v
7 e: M0 Y% w4 k9 w6 F
复制代码 |
|