|
|
麻烦翻译一下,下面这段文章:xhan 4 D( y/ A9 h k: _# ]% J
2 d' |5 a4 W8 ]8 ?# [( L5 u$ z. \( n-
- N( G* H6 z* r' ~- n8 g- ~ - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######/ w7 D7 C% B# J8 {! h. E
- # Q) r4 n4 k8 l& Y- [
- ### What we need ###% V" G+ B# s" X, B" Z7 Y, D' k
- Naturally, we will need a MySQL server to store the data for us, this document
) f+ O0 F, g" R9 `8 u, j9 D - will not explain how this can be done - there are documents out there for the
; K- F# {% O( D9 Q& \) j2 B$ g - interested. The requirements include a (empty) database for TeamSpeak to use( Y; ]- C7 T( @5 S- Z+ b. y0 _4 D, S
- and a user account (username + password) that has the permissions to do stuff
+ ~1 A' I6 q% W+ I. q8 D" Q - with the database. Additionally, you will need a vendor library installed on the; O3 v& _$ f! [$ t) X
- local machine, this came with my MySQL install./ h- c; t b- O5 \/ r
- These instructions will not tell you how you might transfer your data from the* s4 q/ F& c+ G9 g+ ?, Z
- SQLite database to the MySQL database, we start with a clean and empty MySQL
7 n, k" R- `1 L" g4 L6 A; k$ F - database." }1 G, p# U6 b
- Some users have reported ways to import a SQLite database into MySQL, but at
) ~, @7 g) l+ d4 t3 c4 R, U - the time of writing, there are still too many issues - check the current status
9 Z0 j( _( m& r# P \& @) k2 n - in the TeamSpeak forums if you are interested.: e5 P( G, L3 Y; t5 Q( l# v
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from. R8 ^. Q2 N: C. d( y7 D
- Borland was used. This driver can only interface with the client library that
! G. k; q. d* i& h, } - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this; C; n8 w8 ]8 U, z+ t u# f* m1 w$ e
- client library - basically all you have to do is to use a 3.x client library as ' \ X8 w, X. x% D
- "VendorLib" and a 4.x database to connect to.: P& E9 h6 {7 [- Y1 B" F
- If you need more info about dbExpress, you can contact Borland.: t. A9 ?: c% T2 G8 `/ U3 W0 M
- . R+ ~2 w& t7 f1 `9 T
- ### Doing the work ###
# | @3 |' ^! @( g - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all0 h* o6 `4 O4 g/ c% L( [
- the perquisites right, just open your server.ini file, and add this section at
4 v# U. X$ m3 C - the end:
8 B9 Z9 w8 b: ]7 {* S& ]6 U - ---cut here---3 Q7 D5 u* J5 J( b* w* ^- C e3 B
- [DBEXPRESS]
4 I. i! }% O- E' e; a - sqldir=mysql_sql
2 A1 {! z' T: ^ - Drivername=mysql) P$ p+ o8 i/ f
- Database=Your_Database_Name_Here) A) H" t9 B) ^& m# n
- Hostname=The_PC_the_MySQL-Server_is_on
; _5 c& y' d# q: Q/ A# g( k/ l# }# R - User_name=User_name_on_the_MySQL-Server ?4 D2 n) {% ]# Q- q- S- o7 r
- Password=Password_to_go_with_above_user_name: D+ g4 Q$ d% e2 `! k
- GetDriverFunc=getSQLDriverMYSQL
( q2 C* @1 p( K# s k6 L - VendorLib=path_pointing_at_your_mysql_vendor_lib
1 X* P; t; g8 P& b" W5 } - LibraryName=path_to_libsqlmy_libary
% m8 J: A9 | q3 Q - Active=1
$ a9 a a7 S2 d - ---cut here---: P/ a$ R2 ~, j& U5 _7 z
- In my environment (a linux box with a MySQL server running locally) I have:
9 D% ~9 d5 e9 b - ---example---
) m2 i7 n. j5 k$ k- t - [DBEXPRESS]( k# t0 _* V) ]* q
- sqldir=mysql_sql/ o- B; X$ \% f9 N! N0 ?
- Drivername=mysql
$ D! F- b u* ~ ` - Database=test
8 c) r) G- o, ]$ }- G - Hostname=localhost
$ n! w5 `3 Y- J7 |% a! B6 y - User_name=testuser7 a6 w7 @! o, R& \
- Password=my_password
0 ~/ S D2 }. J5 {- V! O* k - GetDriverFunc=getSQLDriverMYSQL
/ e. ^7 J* R& M/ K - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0$ T5 g! @8 ]$ I5 ]
- LibraryName=./libsqlmy.so( c7 A( b5 ^0 a" h
- Active=1
( {' y9 F, }0 k5 F. E$ R$ C" a - ---example---
- h% O2 z0 r7 I2 r0 a+ G( S0 @ - * }* S8 l" u5 i! T" ^' G; n& j: P
- On a windows box, also running the MySQL server locally, it would be:' v9 p! P+ r8 M4 d4 F$ j
- ---example---
9 s& c6 b" R- {; @/ ]; z - [DBEXPRESS]" Z# v0 I/ \ k# z$ P
- sqldir=mysql_sql1 A5 V& Z u6 }& _
- Drivername=mysql
" Z/ e0 ^' c) S8 v* H& l - Database=test
& E5 O, }+ }+ L: k - Hostname=127.0.0.1/ p. ^ s& L1 K- K) j; R( F
- User_name=testuser, ?+ ~( }4 W& m6 P
- Password=my_password8 u7 r0 ^6 s* \, x; }. K; b; ?) r$ q
- GetDriverFunc=getSQLDriverMYSQL
8 n" k# I* G9 P! D - VendorLib=libmysql.dll) l0 A) R" F! ^1 E% N8 H/ d
- LibraryName=dbexpmysql.dll
4 c9 g5 p* y; q, [# i7 A! A- Y - Active=1. y+ n& c% f# V/ i
- ---example----
9 e6 ~% m5 y+ w4 F* v, r, k. b - - written 02.03.04 by pwk.linuxfan& j' D" J6 r% u% D" D3 a, u
, ^$ O9 |; d+ R/ D. t4 [. m
复制代码 |
|