|
|
麻烦翻译一下,下面这段文章:xhan ( f/ ]6 ]! [% Y: Y1 b$ A
8 h/ k4 h; t- r
- ) \5 I' l* `! I H
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
! C7 u- T W* X. y/ R; X7 f0 Q
( [3 ?, L2 w- G* H2 I, P; R$ Y! u- ### What we need ###
# u) j6 x- M* J' u: W! c! ~ - Naturally, we will need a MySQL server to store the data for us, this document
7 Q1 @5 ^, E1 t/ E# g - will not explain how this can be done - there are documents out there for the
5 F6 j; i ]* q* _/ O+ B - interested. The requirements include a (empty) database for TeamSpeak to use
3 T: m' B9 n N t. k9 I - and a user account (username + password) that has the permissions to do stuff6 D9 f$ v! @8 [! j; v+ u, t' S
- with the database. Additionally, you will need a vendor library installed on the) L. m) r0 N- w0 ~- u: ~ c
- local machine, this came with my MySQL install.
! L. p& w( w# a" j/ K* _- b$ p, R- i - These instructions will not tell you how you might transfer your data from the6 v8 H- F+ F7 d5 ]6 {& C' z; E
- SQLite database to the MySQL database, we start with a clean and empty MySQL6 z+ x+ A8 I6 P* G# b( P; B4 E
- database.' y; s S9 `9 z( W" r* O
- Some users have reported ways to import a SQLite database into MySQL, but at) {, v( w! K: {
- the time of writing, there are still too many issues - check the current status. K- F9 p4 Z9 Y1 s5 v
- in the TeamSpeak forums if you are interested.
/ {9 v1 F' k* o( S2 w - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from; N, [) [/ L I; @
- Borland was used. This driver can only interface with the client library that
5 G1 H4 @2 l) Z - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
- L) G# Q% [ a" ~" L - client library - basically all you have to do is to use a 3.x client library as
5 _' G0 { G1 h - "VendorLib" and a 4.x database to connect to.( Z3 q& u1 _: f( R5 X5 Z& s! q$ O/ Q5 X
- If you need more info about dbExpress, you can contact Borland.: j) j- k) f/ ~- H2 A0 Q5 _
- ) f" ]$ I! ]2 J! x& u/ `* X
- ### Doing the work ###& w/ l' o( Y v3 w4 C. \; V
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
- T# `; v/ G* P - the perquisites right, just open your server.ini file, and add this section at
3 i) r$ u" T! u5 K0 `) n - the end:
2 |5 p2 h. l5 {& G8 X - ---cut here---
3 K; r; r; F& M, t - [DBEXPRESS]
- x3 _0 b! k0 k. {, d8 @. s! O, P - sqldir=mysql_sql
% O) k4 W: ? N3 Q: C2 {$ N - Drivername=mysql. M& i0 J7 w1 Z9 M
- Database=Your_Database_Name_Here
' u& \& {* d Y6 n( F) ~ - Hostname=The_PC_the_MySQL-Server_is_on
4 q- B9 j* x1 O2 {- i# U - User_name=User_name_on_the_MySQL-Server
" K- R! U% Y8 s1 L6 `: e# Q$ a - Password=Password_to_go_with_above_user_name
. Z! N) C( L- S - GetDriverFunc=getSQLDriverMYSQL: m0 v4 U1 x9 R
- VendorLib=path_pointing_at_your_mysql_vendor_lib' i" f- `1 |+ [( C
- LibraryName=path_to_libsqlmy_libary
5 ~$ S6 N$ a3 p: V5 N - Active=1
, ~( T" q* S5 Q! M0 n - ---cut here---
( ]: D2 S) V1 h - In my environment (a linux box with a MySQL server running locally) I have:
8 z( K; X# K% R- O+ h: \3 y - ---example---, g5 D) \+ C1 g' M2 ?8 b$ ]
- [DBEXPRESS]+ K# w4 G8 {3 ^3 d
- sqldir=mysql_sql, t1 i8 @$ U+ i$ Q/ `
- Drivername=mysql6 f! A' K0 f( R2 T
- Database=test M5 ^! M9 |( k) n# z; A- L3 _
- Hostname=localhost
. S) ~5 p( u. K8 i1 e. K - User_name=testuser
6 I. o: _7 w* g. c. _, v8 c7 s - Password=my_password
: ^* A2 e+ L3 Z$ W! ^, \ - GetDriverFunc=getSQLDriverMYSQL) ^1 e4 _% a- K0 E+ P4 `( ~
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
3 o9 I4 @ [6 W2 n# z0 E/ T - LibraryName=./libsqlmy.so
; E7 [1 s0 Z; m( ]2 {% x/ E - Active=1; a, H; H8 |4 J
- ---example---
9 x ^0 d& e) F0 l( }
8 n8 S$ a' x: ]( J' z- On a windows box, also running the MySQL server locally, it would be:: M+ B, \% T$ r7 Z3 K: B
- ---example---! t4 z) v! w4 v. s7 p H9 B+ ?
- [DBEXPRESS]- X2 q! r$ a( Q
- sqldir=mysql_sql4 ?" |- ~) E, R- E8 v+ [
- Drivername=mysql+ v4 U' C1 Q1 z$ p
- Database=test# G. _0 Z X, M2 u6 j& [& ?6 K: Z; p. d' E
- Hostname=127.0.0.15 K% K$ v- j0 u
- User_name=testuser2 |7 f/ `8 j$ y5 V' a
- Password=my_password& z& l, o8 D& e: z' r* p
- GetDriverFunc=getSQLDriverMYSQL
# H" u8 `' ]3 U1 f+ y - VendorLib=libmysql.dll
, e6 O7 J6 a; X! J, C( m6 i - LibraryName=dbexpmysql.dll" g! ]' O! _5 O
- Active=1
" x, K# g1 g- a- K- h7 y5 g% s - ---example----1 \% s4 o% ~' y6 u8 u
- - written 02.03.04 by pwk.linuxfan
+ P; s: h5 j( w' ~3 I) `1 g+ b
U: V% f9 V: K/ A2 P2 I' E& V* r
复制代码 |
|