|
|
麻烦翻译一下,下面这段文章:xhan ) K9 b# u2 b5 G2 [3 |
8 M7 [6 X0 a1 M
-
8 b9 c( E1 _/ K6 m, Q0 h - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
* e4 O( ` K! u - : R" p. d8 c% M
- ### What we need ###9 ~1 |# w) w2 o7 I" w0 T/ f5 ^# V) Y
- Naturally, we will need a MySQL server to store the data for us, this document / W! }& ]6 T7 H7 k p
- will not explain how this can be done - there are documents out there for the
5 W% S& |, V' g- ~1 ]: T - interested. The requirements include a (empty) database for TeamSpeak to use
' s8 O7 X g% ` S8 T7 g - and a user account (username + password) that has the permissions to do stuff
. v! n$ {% G! L7 ` - with the database. Additionally, you will need a vendor library installed on the- E/ w0 |- f" B1 _9 f, ^% g
- local machine, this came with my MySQL install.
3 F* B9 a/ N$ s* M- F+ U3 Z, C - These instructions will not tell you how you might transfer your data from the
" k6 |& k/ X- m% T U D - SQLite database to the MySQL database, we start with a clean and empty MySQL
3 G; S6 P5 N, x, E; E1 C( V$ g - database.
: V3 _) r" ?( X+ s+ G& o! ^- ] - Some users have reported ways to import a SQLite database into MySQL, but at
) \% X2 E. T+ { g6 D: u g. }! D - the time of writing, there are still too many issues - check the current status; I* J5 [- I k d% v+ T+ u4 k% o, }
- in the TeamSpeak forums if you are interested.4 r) l3 Z9 ?- _
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from. U4 _/ w/ l# }) [. ]
- Borland was used. This driver can only interface with the client library that / X" C. O( T6 Z3 l8 w: }. B$ S
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this: w8 I+ C" k: X9 H( N q1 r8 |
- client library - basically all you have to do is to use a 3.x client library as ( `; l. {9 E' s0 i
- "VendorLib" and a 4.x database to connect to.
% V+ d/ p# ]' L- v2 K; y - If you need more info about dbExpress, you can contact Borland.
5 U$ ~# \* X6 ~. G- i - : u7 S% F( {3 S5 d% W: K* c1 ?
- ### Doing the work ###
9 f8 U9 v( [$ G% |$ F - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
4 v8 k5 f0 `) V( N; r# r4 y - the perquisites right, just open your server.ini file, and add this section at
% o+ J: \! _2 H S5 [7 G8 p+ h: b - the end:% X' A) ~$ z, i
- ---cut here---
$ w9 A( y0 @* ?! g( x% h - [DBEXPRESS]
: @+ [* [% n8 k( t- K; a5 p - sqldir=mysql_sql
+ I" T- P) Q4 q( J7 } - Drivername=mysql6 w4 T& D4 |& f- m! |
- Database=Your_Database_Name_Here
' f7 o* H+ S& F - Hostname=The_PC_the_MySQL-Server_is_on$ r# e" P" g8 N b5 P) e6 j7 y
- User_name=User_name_on_the_MySQL-Server
+ e8 B2 m% i/ i- L+ L& X - Password=Password_to_go_with_above_user_name4 {6 k' x; S! R0 U7 Z
- GetDriverFunc=getSQLDriverMYSQL5 e. V: A0 C/ B. a e* f1 i) `0 u/ ~
- VendorLib=path_pointing_at_your_mysql_vendor_lib2 Z* w1 L* U! M# d# w' K- c/ h/ q
- LibraryName=path_to_libsqlmy_libary. ^' ~; k$ g7 K+ v }: _" x. f
- Active=1* A. I# X, o# C
- ---cut here---0 l/ i/ m( w( D
- In my environment (a linux box with a MySQL server running locally) I have:# M2 m, [( u/ U1 c6 u1 s- x+ t$ K- V3 u& M
- ---example---! k" n2 v2 f' M, {. J( D
- [DBEXPRESS]. p) b& }, T2 o7 v- b
- sqldir=mysql_sql- ]$ o/ N- A$ v- C; V
- Drivername=mysql. m+ Z4 N: w. C j2 O
- Database=test
7 h" y, O7 O/ m/ j F2 x - Hostname=localhost: X' V- l. {6 z9 F( s3 `- l
- User_name=testuser9 }" n+ b0 D" _# D
- Password=my_password
( T/ {- O. P$ s" i: M - GetDriverFunc=getSQLDriverMYSQL
* Z. E. Z. D. x - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0) @3 \" _/ [ R4 O
- LibraryName=./libsqlmy.so
0 A6 ?9 Y+ U% q/ k, b - Active=1 A" P+ x$ I% d4 m" _
- ---example---% u* ~2 G5 N: @& h) {
- 0 E1 K* d0 B0 q; c& n
- On a windows box, also running the MySQL server locally, it would be:
; k; m% r% Q+ d5 Q5 p - ---example---7 Z0 S5 h- k1 i" x/ s
- [DBEXPRESS]
7 ~! I" r; u( m; s6 X6 N2 r9 r/ M - sqldir=mysql_sql
5 @! X0 [, J# ~, b) c - Drivername=mysql
& N: q9 y7 f9 U# o v( A - Database=test: I$ M) M% b' l& k# A
- Hostname=127.0.0.1; z+ O& j* S4 E' m; {
- User_name=testuser
. F6 |- v' O9 r9 z - Password=my_password
0 Y! Y; Y+ M% }( W - GetDriverFunc=getSQLDriverMYSQL
8 K H, m# A6 C" }6 L - VendorLib=libmysql.dll
; ]2 e0 z& m# E9 w, F' O - LibraryName=dbexpmysql.dll2 a' }* \: [' L3 E
- Active=1
; K2 R' h2 W& A; d0 v8 |. L - ---example----
6 t) P; k t6 M& y' [0 | - - written 02.03.04 by pwk.linuxfan
$ i& ?* Z! Z( T: A& ~9 D
9 v% Z. x% N' G2 a; k$ {' p
复制代码 |
|