|
|
麻烦翻译一下,下面这段文章:xhan ) L+ n0 g* l$ m$ j( p- Y, \5 H
7 a% ~# X ]2 a( V
-
# K. W2 U) t% R0 j8 E - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
, K0 Q- F8 F) y# P
1 p* l( |) V5 p- l2 h( @8 B6 a1 _- ### What we need ###4 B6 s5 Y. v$ V$ `; O: {
- Naturally, we will need a MySQL server to store the data for us, this document
+ C, R6 |: f4 e* F/ u5 Y - will not explain how this can be done - there are documents out there for the * C7 }: ] _* V4 C, m2 O
- interested. The requirements include a (empty) database for TeamSpeak to use* _, ]7 l0 O/ Y9 c
- and a user account (username + password) that has the permissions to do stuff, {4 V. P$ ]5 x3 U
- with the database. Additionally, you will need a vendor library installed on the
& _! j; Z# Y% t( q# `# X; S - local machine, this came with my MySQL install.
. R! `* s8 a* e: V - These instructions will not tell you how you might transfer your data from the1 a- h$ N7 _7 F% E& m; O
- SQLite database to the MySQL database, we start with a clean and empty MySQL
: r- k+ k0 m3 k8 L, |2 j" c+ T! l - database.
0 d# q" u, ^- t5 J% o* o" O. Q' c - Some users have reported ways to import a SQLite database into MySQL, but at& z3 X0 B8 \' w z
- the time of writing, there are still too many issues - check the current status$ |1 M$ r: B: i6 d. q) S' ^) h
- in the TeamSpeak forums if you are interested.
5 s4 q5 n- J2 v* n2 K4 b8 v - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from4 r8 y t: G: l0 Q0 Q' S
- Borland was used. This driver can only interface with the client library that
. n& y: B4 J" `, @ - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this- P0 t0 E6 G7 W5 c
- client library - basically all you have to do is to use a 3.x client library as
1 L4 L& s0 V+ W. V& {5 h K, C2 l - "VendorLib" and a 4.x database to connect to.
4 I; U7 J- S$ V1 X: E - If you need more info about dbExpress, you can contact Borland.
B8 V: |% H* X" v# T: a6 `9 r; T - . M) `/ {; ?0 x3 x) ]7 Z4 u
- ### Doing the work ###! z: u2 m) W& [& v q: c& |
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all/ O. Q" ^" b% ?$ O! o% T& c( d
- the perquisites right, just open your server.ini file, and add this section at' y, L7 f% ?5 D! Z3 F' J
- the end:
; O" ?* `# x! T! P - ---cut here---
7 d4 k5 Z/ Z( T9 L0 @ - [DBEXPRESS]! N# n" S" R8 e: T: X
- sqldir=mysql_sql
~$ g7 y( L" V7 j. O - Drivername=mysql% Q& u* P: j% }, d+ @
- Database=Your_Database_Name_Here
I3 A/ L5 l; W3 U% ]% X; i - Hostname=The_PC_the_MySQL-Server_is_on9 g2 P$ E: ^1 b2 N) M& S9 `
- User_name=User_name_on_the_MySQL-Server
; |' f5 Z( r4 e6 i! N: {, o - Password=Password_to_go_with_above_user_name
% e- H' _3 [& l! c. K) k Z - GetDriverFunc=getSQLDriverMYSQL2 ~) j' X- I" {2 o
- VendorLib=path_pointing_at_your_mysql_vendor_lib
$ ^- }7 Y# [0 y( i6 L* W - LibraryName=path_to_libsqlmy_libary
- N% m. `% ^+ q - Active=1
! W5 b% ^; I/ n: J' x% M& O - ---cut here---
8 b4 Q+ [' ~/ y1 _* K - In my environment (a linux box with a MySQL server running locally) I have:
' {! q: L/ I9 H0 p0 [3 ^. Z - ---example---+ w* e0 Y |# T9 H, r
- [DBEXPRESS]0 \3 C5 O* z+ K% G1 A, [ X- N+ b1 \
- sqldir=mysql_sql7 m; \' Y& v/ R* ~9 V Y) P
- Drivername=mysql- Z, j) W1 C2 d& L9 {7 g
- Database=test
; l' }9 J3 g, i, u - Hostname=localhost
5 ?4 C, \) Y3 w4 t3 u5 `. O3 P6 U - User_name=testuser
) H. @1 e: b$ C, a - Password=my_password7 B+ y' {8 `& x- B4 U
- GetDriverFunc=getSQLDriverMYSQL/ l5 j. R5 S) a z
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
" Z3 c& z( F3 \! U - LibraryName=./libsqlmy.so
! P5 Z9 q* I+ ` - Active=1
0 ?2 n5 K4 B- S - ---example---" P& B y0 m# ~9 v9 C5 b. v+ ~
- * k* k; f% x2 H+ { d2 i
- On a windows box, also running the MySQL server locally, it would be:
$ R/ H8 N( M3 ?0 `: g6 J - ---example---* W2 B6 a% ?. N
- [DBEXPRESS]
- O. c$ l7 a# s% i+ n5 A. z0 |2 E! a - sqldir=mysql_sql
! W3 I8 _- l: n: ? - Drivername=mysql' O1 k; G7 H$ ^( {
- Database=test
3 W2 g3 Y. N6 ?3 |- q; F - Hostname=127.0.0.1
I6 m" w( c9 b# U$ `# d - User_name=testuser5 [1 ^" N: \. {3 Z+ ?
- Password=my_password
3 [: B& F8 g5 H5 }( F - GetDriverFunc=getSQLDriverMYSQL
- Z# N% T- X, r- \& d - VendorLib=libmysql.dll8 ^8 E* g$ P- v7 U3 y) ]0 ]2 U# g
- LibraryName=dbexpmysql.dll$ B9 v9 Q; S' S) y6 i H
- Active=1
* Z) N2 R9 _0 v/ k' [8 K4 a - ---example----5 m2 u5 }8 _; @
- - written 02.03.04 by pwk.linuxfan
" [% u' l0 n9 I' Q5 b - * o! K9 V) ]' }# v$ c
复制代码 |
|