|
|
麻烦翻译一下,下面这段文章:xhan " X, }& x! S& R) b5 r# \
; t) N2 P' V) `) C# e& [- T- D) F6 K-
5 {& x+ j( ~) X+ Q6 `. w - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
3 w$ h, N- [+ n3 i9 D; I K' q. L - 2 F! |2 Y. N# p5 b1 q2 ^
- ### What we need ###
2 R5 c: \1 t: T/ r. P; U; @ - Naturally, we will need a MySQL server to store the data for us, this document Y9 d( t( I6 `, ~/ F+ ?
- will not explain how this can be done - there are documents out there for the
" z. x) S4 _; p - interested. The requirements include a (empty) database for TeamSpeak to use- V& k! T0 o; r3 d+ d* w2 v2 t3 H. x
- and a user account (username + password) that has the permissions to do stuff( ]; v$ t( `' t0 E
- with the database. Additionally, you will need a vendor library installed on the
9 c; Y% y# W% V9 d2 d# Z - local machine, this came with my MySQL install.# }; ~6 z9 t' {4 p4 A. o/ W4 F" P
- These instructions will not tell you how you might transfer your data from the5 N u5 k$ H8 {; c% d
- SQLite database to the MySQL database, we start with a clean and empty MySQL
8 X+ F* Q( J* O; @! y; M; K - database.
- u' D; J- S8 k$ f0 ] \; v - Some users have reported ways to import a SQLite database into MySQL, but at* y2 Z- S, Q# s% ^& Q0 z
- the time of writing, there are still too many issues - check the current status0 z* d2 T! ]% b+ ^" V! D
- in the TeamSpeak forums if you are interested.
" ^* i% n# I! X% V0 j0 ] - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
& [0 N( Z( i4 K; J& z8 v& r. Y, x/ ~ - Borland was used. This driver can only interface with the client library that ) L: `- G( y8 ^5 Z9 q0 u8 ?3 [# \
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
3 u8 Q9 S6 ~1 [ o - client library - basically all you have to do is to use a 3.x client library as
$ C$ y" \4 V9 O$ K- D6 z/ W9 ?* U - "VendorLib" and a 4.x database to connect to.
+ O: A( F# \- N# s - If you need more info about dbExpress, you can contact Borland.
; E, V+ W$ Q$ I$ d+ N( M' F - ' a% m' b: X' s% F7 K
- ### Doing the work ###7 p& U, y( R+ X* M, u) y- _: N- q* `
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
- V# }5 ^! j. E4 D8 Y - the perquisites right, just open your server.ini file, and add this section at
3 E% w9 p& x7 i& S - the end:1 q; ~9 ^6 B& a
- ---cut here---. ]9 x, e& m7 v0 Y
- [DBEXPRESS]
; m5 q _! Z* P2 l! s7 z3 s - sqldir=mysql_sql
" p8 M. T6 k, g, y - Drivername=mysql
* [4 y8 A6 t1 z( C* J, a0 G L( x; p5 D - Database=Your_Database_Name_Here
# J: A+ N: Q8 T, |) y - Hostname=The_PC_the_MySQL-Server_is_on* H n3 ^& h4 U" ~7 I- r# W
- User_name=User_name_on_the_MySQL-Server
! G' ]8 T7 v) u# L# g - Password=Password_to_go_with_above_user_name
; D" |5 b, l& N - GetDriverFunc=getSQLDriverMYSQL
0 C; c9 }3 u3 g( D5 N0 O4 I - VendorLib=path_pointing_at_your_mysql_vendor_lib
& W8 |1 S/ `9 n$ T$ j - LibraryName=path_to_libsqlmy_libary
! q2 m( l0 }2 k4 g8 n( L8 { - Active=1
0 C) Y% [; |, f- w% L - ---cut here---
+ ~7 V9 ?, V1 K x' E1 }4 ~/ d - In my environment (a linux box with a MySQL server running locally) I have:
7 z( V* y" c: F5 v4 G - ---example---
& T$ H3 T% u, t4 }' m - [DBEXPRESS]
5 C, n1 o) k! ^7 h - sqldir=mysql_sql
- I1 r1 D' @' k. A# \( ? - Drivername=mysql
5 f! \. f+ e/ o - Database=test+ |0 v6 h0 m! I& l0 V- M* z+ u
- Hostname=localhost7 U+ r+ M3 n% \( Y4 p) i
- User_name=testuser
+ l/ z; q1 E9 f5 u/ |% ?6 { - Password=my_password
/ L( P& e9 O6 h8 H - GetDriverFunc=getSQLDriverMYSQL
, W- g* a( L; L! R# e: Q - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0* k$ F" ]1 [ [3 x' {# ?
- LibraryName=./libsqlmy.so
1 P- b- S; w" Q4 d# L$ g$ d% K - Active=1
( N _, o0 x3 W5 c/ f - ---example---# z P' H! q$ I" G; t8 i: o
- & J7 ^8 f" z7 T: x
- On a windows box, also running the MySQL server locally, it would be:
) z/ G, S+ V N0 u - ---example---$ d/ B! S& U2 s0 A V
- [DBEXPRESS]
?6 `. b0 [( v9 ? - sqldir=mysql_sql
; T5 @2 T' O! X" W3 [0 |+ X, F( s - Drivername=mysql" E. }( P* I0 I# x4 L# }
- Database=test
. f: \6 q: }6 c4 E' A6 w - Hostname=127.0.0.11 ]5 E% @$ j2 R6 b
- User_name=testuser
7 }( Y, m& I- h! E7 L: F# K - Password=my_password
- B: d. o! p2 w7 L' G h8 | - GetDriverFunc=getSQLDriverMYSQL1 b3 E3 j% Q; d
- VendorLib=libmysql.dll
, B8 Q1 y* K% n* r4 [ - LibraryName=dbexpmysql.dll
& y) e1 g6 |7 D$ K9 t) o6 L& f - Active=1
1 {0 m% j, L/ ~+ W' k% N! V - ---example----
$ S6 V v8 i- D6 c* L5 g# ^ }5 i - - written 02.03.04 by pwk.linuxfan
4 q9 |/ r8 n5 C% |4 m* S$ K# } - 5 |# l7 V: G8 s* f
复制代码 |
|