|
|
麻烦翻译一下,下面这段文章:xhan ; c- a* p- p; E; j! p, B2 a# x
; u4 }6 C# q) l2 i-
9 r0 D* I$ c; c+ h - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######; [. q! d/ q/ K) n$ z* t, H2 g( l$ M3 w
- 4 I# Y" o$ U$ i* N
- ### What we need ###
4 a3 T6 C/ g% [/ L% L - Naturally, we will need a MySQL server to store the data for us, this document : A4 F$ Y8 D2 o1 }2 d$ f- ] s" o
- will not explain how this can be done - there are documents out there for the 5 v* Q" j b5 y3 @$ b$ ?% j
- interested. The requirements include a (empty) database for TeamSpeak to use# C# M) i: R# x; K" v. x; X0 L
- and a user account (username + password) that has the permissions to do stuff
; B* D' {' ^4 L( { - with the database. Additionally, you will need a vendor library installed on the
( l4 f! ]7 e' q* q# V - local machine, this came with my MySQL install., I- J' d8 u" f( B
- These instructions will not tell you how you might transfer your data from the0 k. d7 q. z( k5 w* E) O
- SQLite database to the MySQL database, we start with a clean and empty MySQL
+ \& e3 O6 K3 n9 a2 _ - database.- w. s$ E* }! m8 B) U% I) g
- Some users have reported ways to import a SQLite database into MySQL, but at! ]1 P! o7 l! w$ L$ S/ Y* j
- the time of writing, there are still too many issues - check the current status+ v3 z' n9 J+ d+ f+ m& p- ~* l
- in the TeamSpeak forums if you are interested.
; C! U( o: ?- N+ G - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
, ` |, v* f) \4 l - Borland was used. This driver can only interface with the client library that 1 f l: J. i1 S# I; i
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
2 r% `: J" _; A - client library - basically all you have to do is to use a 3.x client library as 5 D" u+ }3 z( ~
- "VendorLib" and a 4.x database to connect to.
* n1 e2 f- M n- M - If you need more info about dbExpress, you can contact Borland., ^# V+ X9 l! Q$ P: T0 f
- 1 ~2 C; j, W& y6 n8 u8 L
- ### Doing the work ###5 T* q. y# q. z N9 i4 W& W
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all0 Y. h# ]. ]. r/ d
- the perquisites right, just open your server.ini file, and add this section at
{1 Q$ z8 M3 u) w1 A I* w" J - the end:
/ c( `+ n. S! k: l4 Q1 C2 y# G6 }- J - ---cut here---
$ m- |" n: g# v- o+ t5 A - [DBEXPRESS]
6 G) |# L- \6 y; A$ \" [- Q s - sqldir=mysql_sql
7 R0 a' X# a1 c1 ^" N2 Z - Drivername=mysql
; Q2 ~$ o( j( S$ } - Database=Your_Database_Name_Here
; c+ y" t5 Z4 X! f* i" h5 n$ v$ f1 V - Hostname=The_PC_the_MySQL-Server_is_on+ y) V, n$ _$ B4 O' T, _- T. o
- User_name=User_name_on_the_MySQL-Server/ K! _& X4 f5 R( Q+ b- Z- P
- Password=Password_to_go_with_above_user_name
) o: |" X& S5 z$ B) c - GetDriverFunc=getSQLDriverMYSQL" u J- s y8 i: D
- VendorLib=path_pointing_at_your_mysql_vendor_lib
- G2 |7 T; Q; J$ u - LibraryName=path_to_libsqlmy_libary
' y; ?, Y/ p0 ` - Active=1
7 M8 v: j& v6 B! n0 Y( {/ O; n - ---cut here---' z- K0 M3 X8 h; @9 G! w
- In my environment (a linux box with a MySQL server running locally) I have:
# u5 v% j" U1 K, P - ---example---+ }" ~2 X) O; Z7 ]* A
- [DBEXPRESS]
8 E. W1 m# x$ ? - sqldir=mysql_sql
) R6 N* O* A g' g: F. F - Drivername=mysql& u& b" L5 P6 G9 c+ W/ n/ F* j7 B
- Database=test* h& z# p2 v& z5 h8 A+ r
- Hostname=localhost
. g( R" A8 ~- h) Q# q - User_name=testuser
4 T, u$ i& a+ T l, H* h - Password=my_password& l5 [" V2 e8 ]# p3 R& z
- GetDriverFunc=getSQLDriverMYSQL. f1 l" a& L5 h" u
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.04 [/ O6 J" f6 _+ J
- LibraryName=./libsqlmy.so( _) F" J+ M. s! T6 D. z6 k
- Active=1
3 A+ T. Q" k# Y2 A - ---example---
5 x+ f+ i5 y% H/ L1 @
" z9 g7 I: A, E- On a windows box, also running the MySQL server locally, it would be:" Z9 x: h K. |# v7 x
- ---example---3 C# ~: G% t6 _1 _ K- Q' [9 k
- [DBEXPRESS]6 A) l+ G$ v" ~& \1 G
- sqldir=mysql_sql
6 J6 ~+ }' p4 A* G - Drivername=mysql
- ^1 h9 J9 E$ ]% D4 s7 U - Database=test
- m& f( [ F. Y) B - Hostname=127.0.0.1
' g% a$ k3 _! B2 ~# u( X - User_name=testuser
8 T9 A3 ~8 l. Y" C; b- x v8 W2 q - Password=my_password. }0 b5 j2 K' v. d8 o
- GetDriverFunc=getSQLDriverMYSQL
" n. S4 p) `+ h! }9 e1 O - VendorLib=libmysql.dll
1 T2 N. L+ f& ~) | - LibraryName=dbexpmysql.dll
1 E! }: Z, _ p& t$ F6 D - Active=18 j- O, L8 q" {( J. |* P& H
- ---example----/ e- A, S- V5 E0 e; M1 p9 _
- - written 02.03.04 by pwk.linuxfan
. x: e+ W" K7 d4 w! Q3 y
' U& c @) e0 Y) o
复制代码 |
|