|
|
麻烦翻译一下,下面这段文章:xhan $ A1 L( @% o; T4 W: |7 Z* Q
$ j* l2 ~3 w6 C1 J3 ?' J" K
- - { p6 D, I. k2 `0 Z( @. }# P x
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
) j) D" K8 n9 w/ V. e" P - : c# Q/ W6 \( b7 D6 h6 Z% v
- ### What we need ###! w9 t5 t- {# Z8 o/ B9 t$ V
- Naturally, we will need a MySQL server to store the data for us, this document $ c* N1 j/ p1 [* A- M% s
- will not explain how this can be done - there are documents out there for the , X4 B- I4 ?. \/ M3 l! ]3 U- q; V
- interested. The requirements include a (empty) database for TeamSpeak to use
* S4 b* {2 K( o4 }& A* E- z' h9 a* l - and a user account (username + password) that has the permissions to do stuff
+ V' }6 p. h }0 k) z3 D- a - with the database. Additionally, you will need a vendor library installed on the$ U- i: `7 D1 G4 W, @( s
- local machine, this came with my MySQL install.# S8 F/ X7 `2 i% Y4 z( R
- These instructions will not tell you how you might transfer your data from the
: R# }2 T* F7 `+ b: X - SQLite database to the MySQL database, we start with a clean and empty MySQL
- i, m$ H) q8 m( s - database.
3 D+ ], Z: ~$ {, D7 [ - Some users have reported ways to import a SQLite database into MySQL, but at
- N, r( F1 N( _% }0 D - the time of writing, there are still too many issues - check the current status
. l5 u& {5 i8 n1 L% D" |, s6 y - in the TeamSpeak forums if you are interested.
6 i9 }1 l. m% i' p: t0 l - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
( `8 `; I0 G+ U0 m1 d - Borland was used. This driver can only interface with the client library that ( s' h2 K) @, w; y$ o4 b2 y
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
0 G3 l" o$ H& {) C - client library - basically all you have to do is to use a 3.x client library as
5 `, ]# x+ u. |+ ~ - "VendorLib" and a 4.x database to connect to.2 g8 P) `/ M! n/ W: X
- If you need more info about dbExpress, you can contact Borland.1 E: }4 M5 W& ~" n E# }: T
( Y I* Q; p, B: K$ T7 N( }- ### Doing the work ###! Q, Q7 M* k6 P) W4 I
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all m2 z; ]. R. _4 e* i, v
- the perquisites right, just open your server.ini file, and add this section at6 \% \0 Q; N7 |
- the end:- I4 ^% _1 _& x; c1 E$ r
- ---cut here---
+ ~; Q% @# s2 r o' f3 h' ?& D - [DBEXPRESS]
; J# D# Z! R2 v Z2 ]) g8 s: t) h0 j { - sqldir=mysql_sql
9 C# W S8 X8 n, E: U# \) B" t0 z; k4 _ - Drivername=mysql8 P; H; H4 G. y8 |+ J. v
- Database=Your_Database_Name_Here
0 ~1 b1 w d3 E6 I - Hostname=The_PC_the_MySQL-Server_is_on; Q, h+ O- y* e) b$ o, y: e
- User_name=User_name_on_the_MySQL-Server9 U4 R2 j; n- Y2 y% \( C. S
- Password=Password_to_go_with_above_user_name# r3 ?, K9 S+ ^+ v' h( w
- GetDriverFunc=getSQLDriverMYSQL
/ e# o$ }, U; H5 S - VendorLib=path_pointing_at_your_mysql_vendor_lib) p( v4 E* G& q5 s$ s! V( L3 i
- LibraryName=path_to_libsqlmy_libary
; z' s9 ]# E, I0 j# n1 L0 H- \ - Active=1
5 ]2 s. } m' g - ---cut here---
\* F6 D3 N7 c3 P - In my environment (a linux box with a MySQL server running locally) I have:
% {% [) y' f7 o& U! l, _7 r - ---example---
. q1 O7 s) z* _. o4 }3 b - [DBEXPRESS]
6 }0 E5 y, _" C+ B/ V# d - sqldir=mysql_sql i4 Y# h( m# h6 x! L
- Drivername=mysql7 \; X+ t& n3 Q
- Database=test- O+ r1 L& g* }* D5 x- V2 h
- Hostname=localhost
' Y& i4 ?& h! t' J% e5 j - User_name=testuser
: W q8 p% w, C) f: T - Password=my_password
( m# F+ s2 @$ A5 v5 a - GetDriverFunc=getSQLDriverMYSQL
& U% C! C, w9 X! C! f - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0% V1 b: N& ] F& t; L& k }
- LibraryName=./libsqlmy.so
4 y3 ` g3 p2 J( a- t# P/ K* D) z2 O - Active=1
/ O, B) O8 _1 i, b - ---example---; A% a; D# K7 G
- ' t% g9 u+ H' ^3 X; U! V
- On a windows box, also running the MySQL server locally, it would be:
& p4 L) A2 s! H - ---example---
9 ?5 h( V7 z' m1 b1 I - [DBEXPRESS]$ G: ]: P% R, \: q; j, g! f6 Z1 D
- sqldir=mysql_sql4 y, b, B- f, Z7 M4 G9 h) ^
- Drivername=mysql. w* n7 ?: x" f1 G4 c
- Database=test
( {& K9 b0 G' G - Hostname=127.0.0.1
2 M( v9 Y9 m' L2 s; y* I W - User_name=testuser
( e6 P! |2 ` G$ q9 F/ H( U- ] - Password=my_password+ k' f; ]4 E/ o: J' _
- GetDriverFunc=getSQLDriverMYSQL
/ E; u( {3 {2 }6 b, e+ H9 B: O* j - VendorLib=libmysql.dll( g9 c4 {1 X, u) h3 m' _% @
- LibraryName=dbexpmysql.dll
* n1 n1 \6 Y2 [% f& U4 _% a, X - Active=1
1 C( N4 e9 m& j; C0 ] - ---example----
9 a- Z9 L$ M& z( |# D - - written 02.03.04 by pwk.linuxfan
' b9 A v: t0 n - , ]6 O# {2 s2 i4 u! n8 e
复制代码 |
|