|
|
麻烦翻译一下,下面这段文章:xhan ) M6 |1 I8 l: S( S2 }$ f
' r) H7 y. }/ m! e6 u
- % L. Y* {1 n/ Y
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######' ^* A, A, A' a1 s1 O: T- g! `4 v$ {
- - V+ x0 g3 t/ p; G& q- _
- ### What we need ###
" x0 I3 _( F( Z5 ^1 ~' A - Naturally, we will need a MySQL server to store the data for us, this document
" b% r/ i: i& K4 \7 h - will not explain how this can be done - there are documents out there for the
9 `8 w c. w/ D& Q& d d# l - interested. The requirements include a (empty) database for TeamSpeak to use
$ l0 x( Y: t2 }* z. X5 i7 p7 b - and a user account (username + password) that has the permissions to do stuff% @/ I4 f0 L6 T8 X% _1 W: ~$ K
- with the database. Additionally, you will need a vendor library installed on the
, E( n! c: q* c0 o$ ` - local machine, this came with my MySQL install.- H0 Z4 V3 Q7 Q) {6 x
- These instructions will not tell you how you might transfer your data from the
) ?6 ~: x% B0 v; r - SQLite database to the MySQL database, we start with a clean and empty MySQL
@/ j% t ~' Y! L \ - database.
+ X% }. B) B2 g* x( |4 g - Some users have reported ways to import a SQLite database into MySQL, but at6 I5 q- ^: h5 l+ ~. Z! C& M; i
- the time of writing, there are still too many issues - check the current status
3 \& B6 Z0 U2 X - in the TeamSpeak forums if you are interested.
# B- w0 F. \) k- J" w) D - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from3 t+ y7 M+ Y7 H, {
- Borland was used. This driver can only interface with the client library that
3 I c I& `4 [4 z' ` - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this- f; H% t4 x$ \" a6 ]9 J5 l) o
- client library - basically all you have to do is to use a 3.x client library as
9 z0 A. y4 F& ^) n( q- l - "VendorLib" and a 4.x database to connect to.
/ r; u/ y9 y0 G+ L' L% {6 O - If you need more info about dbExpress, you can contact Borland.2 i0 F/ I$ Q* b0 R1 `8 a
- " c. C( a$ A& G: N* B8 I
- ### Doing the work ###) y+ l. t4 C7 e6 @& _ ]' O @# \1 B% O
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
4 z. n$ ^$ L3 h5 o- e$ M - the perquisites right, just open your server.ini file, and add this section at
# k# i* `% F6 s3 p$ ` - the end:
! c4 q/ h% R: B% `6 {/ v% @ b1 t - ---cut here---9 H- H$ y8 _# g) Q, `, s
- [DBEXPRESS]" W: j; b. {7 o+ w
- sqldir=mysql_sql) _) [- P3 ]% A) o& o
- Drivername=mysql$ T" }% @+ e8 y3 _
- Database=Your_Database_Name_Here. P) s2 v5 x. h" u, X0 {
- Hostname=The_PC_the_MySQL-Server_is_on3 w3 D1 L; v0 t( h# U' Z. ]$ \
- User_name=User_name_on_the_MySQL-Server4 T$ }1 U+ k! p) u2 m- e( A" _
- Password=Password_to_go_with_above_user_name7 T0 }* m7 e( A! C
- GetDriverFunc=getSQLDriverMYSQL
+ T$ C+ T" d0 L* P: O8 Z - VendorLib=path_pointing_at_your_mysql_vendor_lib2 w+ T P9 U9 X3 }7 t9 U5 J w# N# x, v
- LibraryName=path_to_libsqlmy_libary7 T( f9 `# z! e6 W M( f) c& F
- Active=1
$ h3 n; E8 @, d- E+ y- F5 q - ---cut here---% ~% E; y7 Y, x* H9 A5 `9 W
- In my environment (a linux box with a MySQL server running locally) I have:
9 R8 O1 X/ ?8 X: B+ W/ ], d/ H. a - ---example---
+ S+ U/ @* S+ O" H - [DBEXPRESS]
9 w/ n+ U& z5 {7 X. `9 b: } - sqldir=mysql_sql% E4 [$ ^. p E5 z8 a f
- Drivername=mysql
( }$ c: }9 K2 a4 X" ] - Database=test$ g) ~. |8 `' _* H: ?/ |4 @/ ]
- Hostname=localhost: K: `) W) E4 w5 d
- User_name=testuser
" l: W0 [6 `* O( x% v" J; R: g - Password=my_password1 ]" p; H V" n
- GetDriverFunc=getSQLDriverMYSQL, O/ n' L5 h9 E
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.03 A9 b j. _7 y
- LibraryName=./libsqlmy.so: T' o, y) a$ M6 c2 ]
- Active=1" B1 s0 E* N' t& M. r
- ---example---3 M" I5 _4 B) l+ r, P3 X1 \
9 h0 D* i! u: K5 p# b- On a windows box, also running the MySQL server locally, it would be:
7 i! A+ t( Y% V* Z! W$ z - ---example---
+ q; a$ h; U$ k! m' W* K' T3 L - [DBEXPRESS]
. y) |( s2 I6 {! s- F - sqldir=mysql_sql% ^0 i* K- d+ j9 m; |! V1 B/ h
- Drivername=mysql2 L9 ~: h/ j" }4 o7 s
- Database=test4 T, I! D' ]) ]+ t
- Hostname=127.0.0.1$ C! m9 f( c0 R" |* X: N j
- User_name=testuser
) E ^* [9 n* F' k n* d - Password=my_password
1 X/ m! F& p m$ V* h - GetDriverFunc=getSQLDriverMYSQL e! ^% V0 r6 p F( a4 u* A6 w; k
- VendorLib=libmysql.dll
$ ]6 r8 P: K. V* [+ g - LibraryName=dbexpmysql.dll$ }( w9 S" m& v% {
- Active=1
/ w) J4 Y: y3 F, m c" H0 @. k - ---example----6 z' @# m2 P' D6 ?
- - written 02.03.04 by pwk.linuxfan8 R, v& R# n" I( K9 \8 K
- 8 `! b" ~% _6 U) t e; u
复制代码 |
|