|
|
麻烦翻译一下,下面这段文章:xhan
_4 u- O4 P/ k, P; v* Z, }, P, W( L$ t: z, I% J
-
% s" ~. T9 l. x) o - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
' C4 ~5 c* }/ i9 c( X# L$ x
- M5 B8 d" ]- |2 {) q- ### What we need ###
- W9 ^. g$ a; l7 e# G - Naturally, we will need a MySQL server to store the data for us, this document 3 d" x) ~! U" H* O
- will not explain how this can be done - there are documents out there for the ( m7 _3 Y c; C+ n1 H' l
- interested. The requirements include a (empty) database for TeamSpeak to use
8 r3 P- b' J* R: S5 U$ W- ~ - and a user account (username + password) that has the permissions to do stuff' ?) c4 n& O# Y/ f6 h" s. ]
- with the database. Additionally, you will need a vendor library installed on the
6 i* ? s5 J0 [) d - local machine, this came with my MySQL install.
8 v. T/ }! p0 G- L ^7 S - These instructions will not tell you how you might transfer your data from the
$ b V" q& q% o ?) K+ \" X - SQLite database to the MySQL database, we start with a clean and empty MySQL" A5 v3 O* v8 B8 C8 X
- database.
% W9 {- q, c O3 h; u9 B - Some users have reported ways to import a SQLite database into MySQL, but at
" ?) Y" S) {( _* k9 a: ` - the time of writing, there are still too many issues - check the current status
- ~# g) C0 l4 A3 S* I0 E - in the TeamSpeak forums if you are interested.
* p; _6 }( j4 B; K6 Z - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
, ~3 S5 X, p. ~. n1 [2 l7 J - Borland was used. This driver can only interface with the client library that
$ M& G9 j" X0 M - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this/ {& w1 B/ U9 y: O' I3 N
- client library - basically all you have to do is to use a 3.x client library as 1 P' ~& r! W% y$ ?& L! Z$ s
- "VendorLib" and a 4.x database to connect to.2 i) i5 ?7 @* H" T N
- If you need more info about dbExpress, you can contact Borland.
4 F$ V, O$ P2 V' Z- _# \1 F
6 V- }8 {, q1 |; _& d- ### Doing the work ###8 N% q6 z0 ?! ]% h! ?
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
' d' B+ B0 _( U6 w - the perquisites right, just open your server.ini file, and add this section at# y0 H2 n/ `* O7 j
- the end:
; F G y+ R% b) D4 J - ---cut here---$ F. E/ b9 B3 X! J2 R* s4 E
- [DBEXPRESS]& t7 H r) {# p) y L, p
- sqldir=mysql_sql0 S9 J Q# F$ K; w2 o
- Drivername=mysql' f/ E% N: \1 k" z2 _
- Database=Your_Database_Name_Here
& {9 {" \1 X- T6 Y! D1 f' r" d: l - Hostname=The_PC_the_MySQL-Server_is_on3 `. [1 H6 x% ^% ^5 Q3 ?
- User_name=User_name_on_the_MySQL-Server% h8 e% @/ l- m. Q' ?$ g
- Password=Password_to_go_with_above_user_name
) L8 d0 v- x% Y- b( j K% _ - GetDriverFunc=getSQLDriverMYSQL) G- l* N, v8 L+ @2 \
- VendorLib=path_pointing_at_your_mysql_vendor_lib
1 }# a) Q# }3 X$ d( F6 l3 } - LibraryName=path_to_libsqlmy_libary5 e! k9 K& \- M& q" Z# h/ e' [3 Y
- Active=1
- g+ i* e2 o6 \ - ---cut here---
% q) h6 G/ S/ }8 ?1 K - In my environment (a linux box with a MySQL server running locally) I have:
" Q' e, v% k% i' _$ [ - ---example---
3 K! A; e6 r; E' n) m& o - [DBEXPRESS]
& o: i! K; W2 y' \+ h: |" I) o: U - sqldir=mysql_sql
' I8 d. k. B" h/ U1 D - Drivername=mysql& B* X3 K) r! |& N" ~6 M7 b/ t
- Database=test
1 Z0 Q* R7 ?0 T4 h% V$ n8 B V' w# J; I - Hostname=localhost8 [- ?5 U1 U' q6 c% C7 X
- User_name=testuser: @! H4 x6 ^6 U9 g5 E+ w
- Password=my_password h3 T# A/ `4 y
- GetDriverFunc=getSQLDriverMYSQL
$ |$ s7 o/ g) s% V1 p$ [& J, q6 _ - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
+ I! E( d& M$ a f- ], N# L - LibraryName=./libsqlmy.so; F2 j5 m! |- V4 U* z& ^5 B
- Active=1! l0 g" t& ]8 o; j2 p6 Z4 R0 L
- ---example---
' \6 P7 A& E, M2 H, R! O- \
% k4 M5 v1 }+ r- T/ Q* h- On a windows box, also running the MySQL server locally, it would be:
% g/ j/ I; V+ I/ T2 J/ u L& Q1 M - ---example---& e( h; y/ w0 r! r) F- [) w
- [DBEXPRESS]
t1 w! m3 j% @ ` - sqldir=mysql_sql' w/ U0 o @, q% ^3 B' M: ?
- Drivername=mysql9 u8 C6 b4 j- Y0 }! m. Q- Y
- Database=test
7 |0 m: @+ c5 U! B- S - Hostname=127.0.0.1& g$ G' _& Q! U
- User_name=testuser" f, J" z5 j9 J2 t0 e( w
- Password=my_password
/ Z9 ~# s& b; b6 A7 b& Z6 W$ L7 @ - GetDriverFunc=getSQLDriverMYSQL: d* t* Y% O0 {9 n+ ?6 B5 B
- VendorLib=libmysql.dll4 y. g, x4 z8 X; i9 E
- LibraryName=dbexpmysql.dll6 W' }6 _4 w, _3 f
- Active=11 E# j5 S8 U4 p; M0 u' t/ n
- ---example----& ]; P2 o& M' r0 Z- G
- - written 02.03.04 by pwk.linuxfan$ H! M4 ?" f+ v, `% ^
- , T H, |& t. z) H3 V* g$ E# i
复制代码 |
|