|
|
麻烦翻译一下,下面这段文章:xhan " U; `' K# F! s8 Y& L! \
, I p' e: I3 M" y9 H- I0 S8 f1 j Z! Z' s0 A! a
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######- G/ \0 D: K8 Q; D7 {6 k# d' k/ m
* G1 `: A- h9 J2 D4 z6 m% x7 }- ### What we need ###
/ y+ ^% L2 i0 Y9 Q6 D! N - Naturally, we will need a MySQL server to store the data for us, this document
2 `( G7 E, @& {2 F - will not explain how this can be done - there are documents out there for the 6 n+ ]( T# z4 k- j9 ?6 W% c
- interested. The requirements include a (empty) database for TeamSpeak to use
4 ~% }' A; G# {2 W8 R. m6 C - and a user account (username + password) that has the permissions to do stuff/ h. o2 U- D, S( E
- with the database. Additionally, you will need a vendor library installed on the n \" U7 X0 p# W- x
- local machine, this came with my MySQL install.+ x0 q! I9 p" H1 e5 I* }( K
- These instructions will not tell you how you might transfer your data from the
' Z0 Q9 D4 N/ n - SQLite database to the MySQL database, we start with a clean and empty MySQL
, I$ [. H s9 n" m+ q( `3 ` - database.
3 N5 z$ p' D4 O' r0 W5 D - Some users have reported ways to import a SQLite database into MySQL, but at
9 w6 O" H' f" G9 Z - the time of writing, there are still too many issues - check the current status
4 ~. c2 S9 }5 [ - in the TeamSpeak forums if you are interested.
% D o6 X# l8 D2 U - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from3 @+ r& q- I; {0 n
- Borland was used. This driver can only interface with the client library that
4 W/ W- u% F3 K/ R - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this. Z5 J& @- c9 P" @2 Z5 m7 `
- client library - basically all you have to do is to use a 3.x client library as
8 h0 D4 B5 H2 O5 k, v5 c: t' e7 S% e - "VendorLib" and a 4.x database to connect to.
* u p# \3 a2 |& R+ ] - If you need more info about dbExpress, you can contact Borland.
2 k- G, Y& S! _1 b: p
6 U- x/ Z5 C# y$ |, O' `- ### Doing the work ###
0 ^0 Q# B+ c6 { Z& \& a - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
% W0 R( A4 S! {1 y/ S/ e: V9 p; | - the perquisites right, just open your server.ini file, and add this section at
# X* U# N' u( h - the end:
; k3 ]/ Y/ u" m7 y - ---cut here---3 K" A% h- H, q$ T4 h
- [DBEXPRESS]# u, n% `8 p7 J2 ^5 S' T z
- sqldir=mysql_sql
4 R9 ^! X: v0 A4 ~6 E4 w - Drivername=mysql4 X8 p# b* A! [) E) t# G
- Database=Your_Database_Name_Here& V( Q3 P, V" M9 Y9 @6 S4 _
- Hostname=The_PC_the_MySQL-Server_is_on# w# U' Q9 D2 t" p" u+ D& X
- User_name=User_name_on_the_MySQL-Server4 g9 g& u; d& B2 J6 C5 d6 x
- Password=Password_to_go_with_above_user_name [2 a1 f* A) T7 Q, ~
- GetDriverFunc=getSQLDriverMYSQL: y- C) |& X* S1 J1 c
- VendorLib=path_pointing_at_your_mysql_vendor_lib
% z5 ^/ Z6 s6 ~; b# L) m$ Z/ ~2 U - LibraryName=path_to_libsqlmy_libary$ I" A0 F1 W1 v. @5 i- u9 e
- Active=1
- [/ R- @5 v" }; v - ---cut here---
. [( X8 Q3 m4 B6 {8 l: G - In my environment (a linux box with a MySQL server running locally) I have:
# d" ~7 Z7 |6 n7 E) U. c2 ?* S - ---example--- b# \- l0 {2 r
- [DBEXPRESS]
6 A1 k! p: @7 x1 \8 M - sqldir=mysql_sql
# o3 b( p; k: i u! ]" l - Drivername=mysql
+ E/ _1 Q0 S% ^- P- b; W! W - Database=test
) ?: ?6 @& w9 ` - Hostname=localhost0 B$ f' H9 D9 }; ^! g3 D
- User_name=testuser& r5 X% M7 ^4 L" G8 t( H' }& @
- Password=my_password9 f6 f. h i5 q8 ?
- GetDriverFunc=getSQLDriverMYSQL
9 \* j# A$ Q& n6 R8 y( R - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0; p+ W3 G# o' U3 ^+ F5 w5 j: S& g+ Z5 R
- LibraryName=./libsqlmy.so
: w8 d7 m0 R0 I - Active=1
9 t' [. q) {1 p" K+ M - ---example---& }+ H4 e$ @9 c3 Z% Q0 j
- " x) P! r: P9 R7 _0 F- r% X
- On a windows box, also running the MySQL server locally, it would be:
" _; p6 e* r' y - ---example---
# O# m+ `; S. i- [' _/ y" D$ z - [DBEXPRESS]' i) P' \. _$ K" f7 Z# }5 t: ]
- sqldir=mysql_sql
6 G2 ?. z w! G$ c - Drivername=mysql0 z# Q" I' P+ f: K# l9 l
- Database=test
2 M7 H5 O1 h' o5 @# J b0 y/ D - Hostname=127.0.0.1, A: P+ [1 u* W$ s9 v9 b, E# c
- User_name=testuser @* S) k1 r& P" s
- Password=my_password
! t# O' g- A! b, O- j - GetDriverFunc=getSQLDriverMYSQL& c; H' \6 @! S0 B& R
- VendorLib=libmysql.dll
7 _8 n7 g0 |0 O4 L - LibraryName=dbexpmysql.dll9 o2 M/ ^# K( [4 Q4 g5 A9 V- G
- Active=1* \4 u, v8 y H+ C& l' J6 ?9 z
- ---example----# ?( f3 O, A: q5 A( W8 i3 G
- - written 02.03.04 by pwk.linuxfan
9 n/ ]" p; a% u" Z
" _, {" _* U2 j! {5 }( W$ Y2 c; i; @
复制代码 |
|