|
|
麻烦翻译一下,下面这段文章:xhan 3 A+ b. m, w) E6 g8 v4 a* H* q
1 Y0 e1 J& |3 S4 T-
h6 w. I" k) q" |- G( ]6 A5 U - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
. c) ]7 `5 U# _* U2 d- W R: R - . ?0 K9 `9 n0 x( G
- ### What we need ###
2 @: Z- B; Z1 s s' \8 W; O) F# Q( J - Naturally, we will need a MySQL server to store the data for us, this document
2 A5 U( U9 p8 d0 e4 j. D" t - will not explain how this can be done - there are documents out there for the K5 ^* a9 h5 L5 U4 A
- interested. The requirements include a (empty) database for TeamSpeak to use+ @2 [9 D6 \& R3 y- ^
- and a user account (username + password) that has the permissions to do stuff' `" j) J5 d; |6 {# n7 C+ Z7 Q; k
- with the database. Additionally, you will need a vendor library installed on the
- d& i3 M6 O) a M$ Z - local machine, this came with my MySQL install.3 N5 K" s0 a1 Q% y
- These instructions will not tell you how you might transfer your data from the
2 } }# M1 E. o7 V# Y5 ^ r5 s - SQLite database to the MySQL database, we start with a clean and empty MySQL
5 B: @/ {2 J# }! @8 e - database.
$ i7 U4 f3 D+ J0 E% y+ t - Some users have reported ways to import a SQLite database into MySQL, but at3 Y, n2 Y# V" f0 [
- the time of writing, there are still too many issues - check the current status, G8 r2 q3 ?$ Z* h/ K5 M
- in the TeamSpeak forums if you are interested.! A5 u& f1 W* x; ]8 }
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from7 p4 t2 p/ P9 O- I- D' a% Z* y$ S
- Borland was used. This driver can only interface with the client library that
+ L# }! U6 N8 H7 _ X6 ] - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
1 g2 b) \" k( Q) C. Q, H - client library - basically all you have to do is to use a 3.x client library as
# n3 | a: o% P/ k* P - "VendorLib" and a 4.x database to connect to.
( V7 q4 L) b" W$ Q, N: F0 K5 \$ E - If you need more info about dbExpress, you can contact Borland.
\5 N! a( P* K: _
& h, F+ x& s' _( B6 ]8 t- ### Doing the work ### r2 N( P2 K" X: p
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all- Q0 N4 V' l, S" ?6 j
- the perquisites right, just open your server.ini file, and add this section at
, [% Y, |. T" h( v - the end:
4 S- F! e/ K3 [7 a - ---cut here---
/ }" S5 m& {7 ]; e! x& ~5 L - [DBEXPRESS]
9 [/ v. p) u4 `8 t) Y1 }% }! L - sqldir=mysql_sql
6 e4 i1 ?- V. ~: B! n5 Y - Drivername=mysql" C5 {% ]6 q) A! e- Y% q) m# ]$ G% ?6 K
- Database=Your_Database_Name_Here" m+ L( p; a$ h* r3 N. B
- Hostname=The_PC_the_MySQL-Server_is_on: e* z3 }* w' m3 S3 D: h
- User_name=User_name_on_the_MySQL-Server1 B/ P/ o0 M2 h0 z( ?: B
- Password=Password_to_go_with_above_user_name# F# x8 R% Q2 L3 {
- GetDriverFunc=getSQLDriverMYSQL4 H; I0 Q+ C5 ]' m5 e
- VendorLib=path_pointing_at_your_mysql_vendor_lib f1 C1 o, M( I. N7 p# G ^
- LibraryName=path_to_libsqlmy_libary
4 B- ~9 z$ T: b - Active=1
& b# s; N G2 k, [ - ---cut here---* f) v5 B; Y9 P- I! d
- In my environment (a linux box with a MySQL server running locally) I have:( h$ b4 |# @. W9 Q2 z% B
- ---example---
9 K/ [5 v. E, w5 a" \ L - [DBEXPRESS]* R* Y) o6 |. i' L: Z8 p
- sqldir=mysql_sql8 C9 S8 y* P" e5 ~
- Drivername=mysql
& y5 d/ P: L) b7 M8 o" E! ~4 @ - Database=test: I& g' _+ z1 Z8 }* }8 R# x
- Hostname=localhost
[9 V+ h. ]: A# j! W# _0 Z: K - User_name=testuser3 V; R& T/ @% }
- Password=my_password
* s! D# |/ k( {+ ^; C3 N& r - GetDriverFunc=getSQLDriverMYSQL4 ~1 N7 V$ S. o; h2 d! F8 U
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0/ c. U1 c7 F$ c1 s' e
- LibraryName=./libsqlmy.so
/ c5 S% _' m4 _- | - Active=18 T/ a9 X% K$ t% z
- ---example---* l, B1 |( e; U1 {/ e! m# w1 a
. S. w0 d5 M9 V& k- On a windows box, also running the MySQL server locally, it would be:; s% y7 K5 |5 n. u) D* ~) Q
- ---example---
4 |' E8 e) U# r& e6 a3 S - [DBEXPRESS]
3 l( M- ?$ }7 b J - sqldir=mysql_sql4 o: o1 s; D$ ~0 A% D8 X* I
- Drivername=mysql5 S# }& i f0 }! q& c2 _. R1 a
- Database=test) _0 p/ O* J' P. Q* @# ?$ a
- Hostname=127.0.0.1
3 s& Q: ~! U& S - User_name=testuser
, o6 w; f6 S; d w; V - Password=my_password# W# n! U6 d# m$ r1 c
- GetDriverFunc=getSQLDriverMYSQL6 \9 e# k; @ o/ ?, K2 J' S9 n! L
- VendorLib=libmysql.dll
5 n @( q: i/ A6 `4 X4 b# ] - LibraryName=dbexpmysql.dll. L7 H9 K6 e& ~ a) K6 C& h
- Active=1
/ F2 T) U+ p5 X - ---example----
4 M: o& P m; ^) |* N. P' W - - written 02.03.04 by pwk.linuxfan
& T2 J0 S- o6 E7 Q" r' `
" C' s* [$ o. Z1 T* b
复制代码 |
|