|
|
麻烦翻译一下,下面这段文章:xhan # u, n* k+ b% {! a
3 e1 ~& R6 Q9 Q- - X" B0 v/ M; s! l' ?
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######0 l( t. Z! q S) T
- 4 L. [# i& V7 k) Z8 K( c( |
- ### What we need ###- \9 }5 S9 T4 G- ~* m. K, s0 B
- Naturally, we will need a MySQL server to store the data for us, this document
, ^: W4 ?1 ~; M9 y - will not explain how this can be done - there are documents out there for the
9 D' ~( A8 `! v! _ - interested. The requirements include a (empty) database for TeamSpeak to use
, Y# c! p; ~; \* j - and a user account (username + password) that has the permissions to do stuff
/ T/ z0 ?9 y# ]( j4 z/ h4 M - with the database. Additionally, you will need a vendor library installed on the
' p1 d" Y5 k7 D, `8 C - local machine, this came with my MySQL install.
0 N4 m5 q! {4 b( @ - These instructions will not tell you how you might transfer your data from the
7 J/ k) l5 M4 k: x3 n( W - SQLite database to the MySQL database, we start with a clean and empty MySQL
. k9 S/ u, D4 Z& c - database.: M* \4 M- V& ?) r' F7 t$ k
- Some users have reported ways to import a SQLite database into MySQL, but at
4 _! c- W5 `3 m1 N6 C - the time of writing, there are still too many issues - check the current status
O' Q; Y4 ~/ h9 C0 {3 F2 C - in the TeamSpeak forums if you are interested.
5 g1 B9 S+ ?4 t+ ^ - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from2 L0 @7 z6 H- t8 p
- Borland was used. This driver can only interface with the client library that $ f, j$ g6 Y& g/ u
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this( p" s2 [; B" E* t4 k# Y
- client library - basically all you have to do is to use a 3.x client library as & e8 P( W } M
- "VendorLib" and a 4.x database to connect to.
# m! u* _; {1 f) ]7 v - If you need more info about dbExpress, you can contact Borland.3 X" y+ Z# _3 X4 \6 ^% B
% g' e" I) E+ B J( k9 p- ### Doing the work ###; O- K, n* w" E% Z N% R) Z
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
* N: B5 Z2 P) n- f8 P2 d - the perquisites right, just open your server.ini file, and add this section at% {9 F4 v& T ^! @/ ~& V
- the end:
& N6 _* i% p9 c% h3 F - ---cut here---; R! q- U/ \/ X/ z+ h. ?
- [DBEXPRESS]# E8 G2 |4 @2 k- J, O" I
- sqldir=mysql_sql
, {/ H4 p4 n. B k$ O" i3 ^ - Drivername=mysql
7 a. u+ ^1 I1 O! c @/ P; z( I - Database=Your_Database_Name_Here
9 r0 Y+ F/ V, m/ ?( K8 N - Hostname=The_PC_the_MySQL-Server_is_on
. P+ `" \8 P( v3 m7 h - User_name=User_name_on_the_MySQL-Server9 h4 E2 j. i# i# v4 p
- Password=Password_to_go_with_above_user_name6 P5 S+ Q) _3 {* ?+ F( \. d
- GetDriverFunc=getSQLDriverMYSQL
" I+ a' G( ?1 }0 H% G - VendorLib=path_pointing_at_your_mysql_vendor_lib( Z* I9 K4 Z* A' h b
- LibraryName=path_to_libsqlmy_libary0 r% \& o% G) Q7 o
- Active=1% y- ^' J) n, w2 B# @
- ---cut here---
+ k$ A6 P* ?- X0 Y0 ]8 b. n - In my environment (a linux box with a MySQL server running locally) I have:# o- Y* B; b4 d+ U( E* }; N" |! z
- ---example---: T( J5 K/ ]; @( N+ ]
- [DBEXPRESS]! v- L" A+ f" t
- sqldir=mysql_sql7 F9 A3 u( A! ~- K' b- G' s
- Drivername=mysql
; E: c9 c" D( t) n; N2 a - Database=test
6 a* }" N: q* N9 t2 t# r - Hostname=localhost' r( p! P7 ]. m- i* T; i# z" r
- User_name=testuser
$ j/ f! j5 b0 G& a/ e- a - Password=my_password
' R! r' x5 g; ?7 {" b; A - GetDriverFunc=getSQLDriverMYSQL) u, G* N/ q! g( v
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0% r* r2 G Y) `0 S8 g% b: ?
- LibraryName=./libsqlmy.so
4 d: J/ E Z6 F4 Y5 Q+ r - Active=1
" E! k* k8 I u% D A - ---example---
9 [) V5 a+ R# A: Z2 x2 f - ; C3 T, r( W1 M: N
- On a windows box, also running the MySQL server locally, it would be:# K3 \6 h8 U: s8 q8 d$ p
- ---example---
1 K; ~ o S6 ~5 b3 r, P+ p. m - [DBEXPRESS]' |/ z4 M, v' F; y3 v
- sqldir=mysql_sql
/ U0 {3 m% X U# F) D: w - Drivername=mysql9 o# S/ B# t0 ^. c. F, Z
- Database=test
2 E" V/ x! d: s - Hostname=127.0.0.1
1 ]) `. ^) {7 h+ F1 K - User_name=testuser+ k+ H" H2 l) a
- Password=my_password
' G8 T( Q* m1 g' v% d - GetDriverFunc=getSQLDriverMYSQL% _- e! ~3 L7 `+ O5 ^
- VendorLib=libmysql.dll
* v4 [+ Y8 h/ b) N1 R6 y7 p - LibraryName=dbexpmysql.dll
( J. G5 \1 j/ V. O6 L' J3 C - Active=1
5 l/ t& P/ h" t X - ---example----) P* G' g$ C' w" M3 I$ [
- - written 02.03.04 by pwk.linuxfan
4 b2 q9 F7 @+ o
S6 b- e# S% S8 J* n6 { W! `
复制代码 |
|