|
|
麻烦翻译一下,下面这段文章:xhan ; B6 ?) X2 G- g& V! O
: q/ I, t( P. |7 v" {2 k' A- * |. e( L4 _' N* o' _
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######( y, q) C/ `5 P$ F! W
9 m9 l7 p; H5 q; r: q) j# c6 Q6 K2 F- ### What we need ###
7 E* e, P6 S8 n( |" ` T - Naturally, we will need a MySQL server to store the data for us, this document : v# O- Q5 V6 P
- will not explain how this can be done - there are documents out there for the ( A% u* K. f# i$ k
- interested. The requirements include a (empty) database for TeamSpeak to use/ [- t9 M# |3 l$ a9 \
- and a user account (username + password) that has the permissions to do stuff1 k$ U3 R! T# Q8 {0 M: A4 K0 V
- with the database. Additionally, you will need a vendor library installed on the/ k. M4 i, H, L4 n
- local machine, this came with my MySQL install.0 ~7 W! P) F( m" `) a5 O) f, x
- These instructions will not tell you how you might transfer your data from the% g8 E2 m. h- h6 i6 r8 j
- SQLite database to the MySQL database, we start with a clean and empty MySQL8 N6 d4 x, {* o$ O g
- database.* [( c0 H( A0 g
- Some users have reported ways to import a SQLite database into MySQL, but at
1 g2 x2 I* e2 E5 i6 w% l3 `4 K - the time of writing, there are still too many issues - check the current status+ `3 @& U' I+ `6 M7 n
- in the TeamSpeak forums if you are interested.& Q2 p! r* @0 U
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from# W: L" {( y) {1 S& G- D
- Borland was used. This driver can only interface with the client library that : @, a ], P& }; }
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this" Y, B9 i; \! \* K
- client library - basically all you have to do is to use a 3.x client library as
G* o9 M0 H" K, `9 o! I* B6 V - "VendorLib" and a 4.x database to connect to.
; N5 j5 q7 K; A" T2 w - If you need more info about dbExpress, you can contact Borland.; v }9 F+ B3 j( E4 ~ V
- * Y: J- ^; F; d4 H3 m x5 o
- ### Doing the work ###. m/ h: m7 [9 S5 [! S. S. j7 p
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
* A) H8 }7 h; Z) U9 @ - the perquisites right, just open your server.ini file, and add this section at) |' Q2 X2 h4 N+ Y, a) w
- the end:
) U B3 U4 \4 E3 S7 n. g% H - ---cut here---
% b# I2 q6 W- f - [DBEXPRESS]2 F$ p, p3 w# z, [
- sqldir=mysql_sql
0 ^/ S/ h# Q- R* a: U# I - Drivername=mysql+ A1 }: z N! _; f
- Database=Your_Database_Name_Here. ~4 S& P! J$ n% P- E; a& I$ L) p! X/ f
- Hostname=The_PC_the_MySQL-Server_is_on1 W1 R3 I# [$ u* H' C
- User_name=User_name_on_the_MySQL-Server8 A7 Q2 x4 A' S5 w" c% J2 D3 r( i3 `
- Password=Password_to_go_with_above_user_name8 [8 J+ p5 `9 V% M
- GetDriverFunc=getSQLDriverMYSQL
' D) s+ m# }- u; V7 l - VendorLib=path_pointing_at_your_mysql_vendor_lib
# ~9 b y# j7 L3 W6 x" |% u - LibraryName=path_to_libsqlmy_libary
! D2 z$ A% C) s4 q3 @8 j' D7 X# W - Active=1
% c4 |- x8 u% h, l" Y8 [7 K2 U" P - ---cut here---' }" U9 h# j: n; i8 N
- In my environment (a linux box with a MySQL server running locally) I have:# y7 D# i5 U: g. o0 m
- ---example---+ j" y2 Y- m- U) j& I* k E
- [DBEXPRESS]& Z& v3 d0 L! |2 S
- sqldir=mysql_sql
Z, j1 V d) H' a3 m, }" ~) u6 A - Drivername=mysql
( z* @$ r- \, E0 e - Database=test; T7 B! g9 ]0 k* c3 C) ]: i) j3 ?' @8 L
- Hostname=localhost
# W; e4 i* G2 y1 A) `2 a% B - User_name=testuser
& e! n2 H* S2 [' J. W - Password=my_password
[8 V6 r; A2 D+ P - GetDriverFunc=getSQLDriverMYSQL& ]5 k) d# r4 T4 a3 I' j5 k1 |
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0$ ?1 {0 r" X9 E6 O1 }; |
- LibraryName=./libsqlmy.so
' D' G! ]: c) a; @5 @4 N - Active=1) L5 \: i4 j2 [7 f! J' Z
- ---example---, N l; t& J. l3 {, |, R8 ^
- " {# a+ J+ d! j* ]$ u
- On a windows box, also running the MySQL server locally, it would be:# o, n; s# E3 W( Y1 m2 f
- ---example---; H$ z3 @, k; X* r+ M- w1 r
- [DBEXPRESS]
( z. j; R( c% v - sqldir=mysql_sql7 t0 ?! ]- b I; G5 J" P t" w1 X
- Drivername=mysql
: T" m+ \2 W3 ]2 g - Database=test3 N- z' C' {, i4 u% E) ?! d, b2 [
- Hostname=127.0.0.1$ B# u2 f5 S- g0 P$ G( W: X
- User_name=testuser2 ], S9 }* Y5 ]; v& [3 S$ c
- Password=my_password
+ b! f3 D, l. s3 @' C g - GetDriverFunc=getSQLDriverMYSQL
( @: u2 ]% M4 J1 A! f3 S$ g: a3 V - VendorLib=libmysql.dll. {7 A4 \2 q g+ O2 E
- LibraryName=dbexpmysql.dll
$ a* L8 ]' R4 [" M; `8 o4 \8 [( F - Active=1
7 {' [* Z- B# l; [ `/ F: i - ---example----
* m% j' Q/ o0 Z" `$ ? - - written 02.03.04 by pwk.linuxfan
% C* U7 r8 `. v0 n, ~ - 3 p5 v. o' \( ]4 E3 r% o
复制代码 |
|