|
|
麻烦翻译一下,下面这段文章:xhan - z. |) H# `* J
1 l* ~# \8 N O-
4 D* K4 m; F0 D - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######% w/ }$ I% f5 k/ S0 s6 K4 u H' P
3 v2 \8 l) b, {" u8 v- ### What we need ###8 c, A+ x. g4 ]# F2 \6 S2 y8 p9 d
- Naturally, we will need a MySQL server to store the data for us, this document ( g7 b1 Z, i5 C
- will not explain how this can be done - there are documents out there for the ( S- l* b7 J# K( P1 W' y
- interested. The requirements include a (empty) database for TeamSpeak to use y+ q# C- T8 {
- and a user account (username + password) that has the permissions to do stuff
& o; d+ H4 N, g - with the database. Additionally, you will need a vendor library installed on the
" D- h" }) i s2 y! W, B - local machine, this came with my MySQL install.
- V/ q2 c% }) `) m4 x - These instructions will not tell you how you might transfer your data from the+ |1 h* d0 @ z# n1 |
- SQLite database to the MySQL database, we start with a clean and empty MySQL
$ K3 O' }- {+ d7 x* S - database.! [7 Y; ^' e; e7 x' }3 S0 j
- Some users have reported ways to import a SQLite database into MySQL, but at( A# }) D! U2 y9 U7 r; X% t7 h
- the time of writing, there are still too many issues - check the current status/ H# v9 F+ \$ h2 @7 S1 T
- in the TeamSpeak forums if you are interested.! c( G, V3 T2 t1 ~8 R. j( q
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from) i3 U7 R3 P0 P9 z7 T. _( k6 ]
- Borland was used. This driver can only interface with the client library that 4 B& U# U( M7 n
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
+ {0 ]2 H' _& X% D - client library - basically all you have to do is to use a 3.x client library as 3 R7 \( z1 ^1 [4 F* T1 M
- "VendorLib" and a 4.x database to connect to.
& q: l h& W) B% }6 b9 a7 o - If you need more info about dbExpress, you can contact Borland.; e8 W, n ]6 n1 A, |
- ' B- `- s: s2 G/ P9 p8 d
- ### Doing the work ###7 t3 ?( ?; C9 s- _5 |/ ]6 A
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
5 v( j; @; r6 H3 \4 E, H - the perquisites right, just open your server.ini file, and add this section at1 Z8 ^" I1 X% U9 S0 _$ w8 Y8 P
- the end: [/ a# E) C! y E6 M) d
- ---cut here---, ]+ k2 b3 O4 u; i% ~, r
- [DBEXPRESS]
0 u$ r& P, } q% ^" Q# p - sqldir=mysql_sql
0 U0 I- z( o% l6 \. m: Q$ C - Drivername=mysql; P# @2 @8 ~7 T& p) \
- Database=Your_Database_Name_Here. ^, k2 E$ r4 q! R3 ^' L+ P
- Hostname=The_PC_the_MySQL-Server_is_on) v0 {7 R7 W3 h, ^& `
- User_name=User_name_on_the_MySQL-Server
8 ~. r$ a9 z$ y& r" y- ~ - Password=Password_to_go_with_above_user_name
( B5 u3 o* T6 j - GetDriverFunc=getSQLDriverMYSQL! J" t# `3 N; l; u2 z
- VendorLib=path_pointing_at_your_mysql_vendor_lib
5 K' ~# g, R( V' J3 G& A - LibraryName=path_to_libsqlmy_libary
% ~: C. m: k, J2 S) X! x* p - Active=13 L9 B+ y: b9 I, `
- ---cut here---6 ~1 x) ]5 [$ d. r2 p# y
- In my environment (a linux box with a MySQL server running locally) I have:/ [; F& G; {, h$ J$ ?7 f
- ---example---' c& v8 F8 D! S7 \
- [DBEXPRESS]1 L' |4 P- ^# a' L
- sqldir=mysql_sql
! V4 p+ Y2 B) n - Drivername=mysql
9 Z5 N% h3 q5 c6 ?6 \' E - Database=test
$ q4 j# f3 i4 P1 w7 ^+ n* h) l" y - Hostname=localhost
7 \6 b$ A) V, [1 f$ d0 f, K, d - User_name=testuser
$ j2 m$ F, m" x9 G - Password=my_password
! W5 [; k9 x [9 q& ^- c - GetDriverFunc=getSQLDriverMYSQL
( g S, J+ I; m4 ~1 z9 } - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
. i( |7 E K* ^7 L9 E X. p, e3 A- o2 t - LibraryName=./libsqlmy.so2 i: D1 N) H( o. s9 t* A7 A. Z
- Active=17 U, _: Z% i' |: Z* i. g- B; o
- ---example---, r- O S* h9 E$ d0 o+ _* i$ U
% w, H8 r$ c- s0 V Q7 b- On a windows box, also running the MySQL server locally, it would be:. J# n: H) |9 H$ Y+ Y9 a) |
- ---example---
* p7 R5 s6 A! I. o/ `1 L" a$ a - [DBEXPRESS]
* s# s4 I/ W9 n' W9 e$ t! R$ O - sqldir=mysql_sql+ O. y- H- m/ Z) t: W4 F
- Drivername=mysql
3 _/ s1 X7 c7 A* j @ - Database=test
; e' X# L. [% {1 i _& W; W; p7 j - Hostname=127.0.0.1 |8 ?3 x" I0 |4 h, \8 C1 v4 w0 b3 ]
- User_name=testuser
- D2 v, u: W" i! `8 g& l - Password=my_password; a a: f* X. X3 w) W
- GetDriverFunc=getSQLDriverMYSQL
e# M. b! @" c0 f. ?4 v) |$ [ - VendorLib=libmysql.dll( r- }% K9 R! m& O& `5 o
- LibraryName=dbexpmysql.dll
$ F }& ]5 ?+ D7 _) H" E - Active=1
# w, _3 r7 `3 x - ---example----8 {* O# M* V$ x4 L" x# V0 u; M/ o
- - written 02.03.04 by pwk.linuxfan: x o/ O# g" N) f
2 r0 X* ^, h& z, O$ o4 o8 H- ?
复制代码 |
|