|
|
麻烦翻译一下,下面这段文章:xhan % W" J4 {1 y8 Y
4 M/ ^' z+ b- e3 G p; |3 X7 E- - K4 k8 W2 u9 ^" q8 k% K- K" ]
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######( b0 h) D' H3 r; ]8 g ]
- 3 l+ \0 `! t0 q; I+ Q8 X. C+ H
- ### What we need ###
$ ^2 C5 O3 X4 H0 q, S' S5 }% S - Naturally, we will need a MySQL server to store the data for us, this document 5 u+ P/ m; I. y+ J; i3 h. }
- will not explain how this can be done - there are documents out there for the
, f( ~/ f- B# S. W - interested. The requirements include a (empty) database for TeamSpeak to use" R+ w1 z4 c2 L1 v
- and a user account (username + password) that has the permissions to do stuff/ u) y0 {- R, n7 h* Q6 i- x' X
- with the database. Additionally, you will need a vendor library installed on the
; Y( m9 ~* ]. w( e% V - local machine, this came with my MySQL install., j8 k7 V3 b( ?5 O! Z$ G( L) ?
- These instructions will not tell you how you might transfer your data from the
U: L: b9 [. ^2 h/ X; U' x - SQLite database to the MySQL database, we start with a clean and empty MySQL% I0 J, v; j/ f! z+ m
- database.
( ]7 _& J/ l9 j& a e/ ? - Some users have reported ways to import a SQLite database into MySQL, but at
6 y. V$ F; d5 n' T+ ^ M, ?2 W - the time of writing, there are still too many issues - check the current status
! p2 q Z: ~" Y. L& N+ }0 Y$ g, C - in the TeamSpeak forums if you are interested.* R* M+ V4 S j% d' @5 z
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from1 s1 a D7 ^& ~5 h5 A5 {9 \
- Borland was used. This driver can only interface with the client library that
- y, P4 ]) P3 j* P [ - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
- \/ W+ Y$ V2 Q, H8 u - client library - basically all you have to do is to use a 3.x client library as
9 c! K) K6 S* q+ `' d) i# v+ W - "VendorLib" and a 4.x database to connect to.
1 j6 x D8 c6 F9 R5 h - If you need more info about dbExpress, you can contact Borland.3 G& m( A# m4 V# X8 q. y8 y
- / ^, R' ~. Z" K4 M& Z2 s4 j2 A! S
- ### Doing the work ###1 D% _+ ^1 P/ _+ W6 ]7 Y8 t8 t7 i, T
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all3 K9 I9 o4 R# P s( X/ o; b% @
- the perquisites right, just open your server.ini file, and add this section at
# o' e# E8 |* n' ]; c2 S0 X - the end:7 f7 ^0 ^- g5 a& w+ t
- ---cut here---
0 L$ h0 p2 _9 {" c2 l6 L0 h9 s. v - [DBEXPRESS]
+ k# t, q; z: }% \% V+ } - sqldir=mysql_sql
; n3 F- v" R0 G, T% F - Drivername=mysql7 o& w r: e) r- ^8 e
- Database=Your_Database_Name_Here
/ e; T) H+ h9 L! ]6 q* x - Hostname=The_PC_the_MySQL-Server_is_on! R$ d7 ^& a. M8 w1 ^* G$ U5 I! \
- User_name=User_name_on_the_MySQL-Server9 S( g- a) }( `. [4 ]& Q
- Password=Password_to_go_with_above_user_name4 D5 y& \8 q' `' X& _
- GetDriverFunc=getSQLDriverMYSQL
5 y$ D1 F8 f( P" t+ R - VendorLib=path_pointing_at_your_mysql_vendor_lib& n- q3 g' v' d
- LibraryName=path_to_libsqlmy_libary
( I r9 a s2 P* M( P% V, @4 U - Active=1; M# k" h" Y# f8 L# k) @- ]
- ---cut here---
J! ~# v. P1 I! z- x8 K. F% U3 [ - In my environment (a linux box with a MySQL server running locally) I have:
0 n' l/ }2 b$ @ - ---example---1 b3 g; l! r: q& Q
- [DBEXPRESS]9 w; i- h2 l; E( P8 J
- sqldir=mysql_sql' C- A. g! ?: f5 ~% a, W
- Drivername=mysql
% U& W8 Z6 _3 x" p - Database=test7 I( X1 K9 S/ \. D+ A/ S: a
- Hostname=localhost. q) P# T0 S! c7 p& k
- User_name=testuser
- @6 u2 y+ ~- q5 o - Password=my_password
6 o k( y$ z! ]$ T% z - GetDriverFunc=getSQLDriverMYSQL6 B7 X7 q6 O3 F* {- a+ z
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
, H9 U- ~* G K5 D2 M3 {- a - LibraryName=./libsqlmy.so
5 ] X/ Q! y: U6 B6 m: }7 `( V - Active=1
# L1 `( H: v# g' t3 u& Z. E8 e0 R - ---example---4 V$ I; V; E% N3 ]5 w
3 i7 [! k4 e+ W- f( e- On a windows box, also running the MySQL server locally, it would be:: ~2 h% ]) T% b3 ?, Y8 D- m/ x
- ---example---
$ \) _7 y9 t! u0 q# H8 ?# p- ] - [DBEXPRESS]
; b3 a) [/ x. W$ i: V - sqldir=mysql_sql
4 }8 u& J4 G2 f- C- n1 Q* D - Drivername=mysql
* A9 Y9 d. }( C- a* g) }3 H - Database=test
2 o6 W( e3 K( @- x- m$ j ~ - Hostname=127.0.0.1; C- J5 B& {+ l- ?
- User_name=testuser
# j# U: M( e r5 _ - Password=my_password
E3 p; ~5 P3 L8 e2 D L- C - GetDriverFunc=getSQLDriverMYSQL6 L* F4 j9 a8 W
- VendorLib=libmysql.dll+ g* P1 v1 k7 j5 T
- LibraryName=dbexpmysql.dll
5 f. Y- U7 b" k3 n - Active=1' a) x, C7 @. Q" Y/ m
- ---example----& }5 ]- J$ ?) H$ D, V
- - written 02.03.04 by pwk.linuxfan) b2 B: f3 O" Z2 h* F5 u% c
- 1 u5 M1 J' W/ J. d9 o, Q& M
复制代码 |
|