|
|
麻烦翻译一下,下面这段文章:xhan 5 A: g" E: s8 B/ l# ^9 h
8 s: m1 w1 L& N. z
-
2 y4 p# J3 h8 Q; Q% W! R! O5 K# J - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
) Q$ d5 F) x/ P) b8 L - 9 w7 p6 E" l9 }& W' q! B- R
- ### What we need ###
% T& e- X: P/ h3 E% I( ~' s - Naturally, we will need a MySQL server to store the data for us, this document 8 t( S2 H1 z3 m' C9 f( N
- will not explain how this can be done - there are documents out there for the * d+ [- v, S. @# O* d7 @- h! V( w
- interested. The requirements include a (empty) database for TeamSpeak to use) R$ K4 K7 s( _% Y2 \( K
- and a user account (username + password) that has the permissions to do stuff; E1 X& c; |# a* C0 k
- with the database. Additionally, you will need a vendor library installed on the
6 R9 b# ^% [' o# s, b t5 _ G - local machine, this came with my MySQL install." A8 N0 z' X& I
- These instructions will not tell you how you might transfer your data from the
+ r0 I, S w9 E6 ~3 G* z - SQLite database to the MySQL database, we start with a clean and empty MySQL8 C! Y8 _# }& ?8 D, u
- database.
8 }8 L( s4 E9 {, O2 D1 { - Some users have reported ways to import a SQLite database into MySQL, but at1 J9 `& n$ w; ~6 D
- the time of writing, there are still too many issues - check the current status
, @- I# K8 ?: f - in the TeamSpeak forums if you are interested.
8 N8 D& v( V, w6 o/ {; j - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
0 p: p4 E* r! e O8 ]/ m2 E - Borland was used. This driver can only interface with the client library that
! `, I9 b. Z3 [- s/ B - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
5 ]. Z& [& p7 o L5 ?$ ` - client library - basically all you have to do is to use a 3.x client library as
, D8 e3 V( Q- Z - "VendorLib" and a 4.x database to connect to.3 T- J- P; B# k( u$ H
- If you need more info about dbExpress, you can contact Borland.. D# E, @/ q. j& c1 P( O- S' R7 Q3 O
& n+ C2 d4 j. [, |3 s6 k; [- T- ### Doing the work ###! M3 b! {: {: a+ d B5 s
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
- n2 S" S) E; r, O1 t - the perquisites right, just open your server.ini file, and add this section at
, h- Q# X' V, I+ ?$ B- I4 L$ g, t - the end:/ X$ |7 `. Q$ i3 R; N. o9 \
- ---cut here---
8 R. p2 N7 X) `6 g; Y' y - [DBEXPRESS]2 Y) F- @7 e/ E" h& \! j* @
- sqldir=mysql_sql" J! x$ _7 z- b) t3 L8 Q
- Drivername=mysql' L/ c3 \5 K, A* M
- Database=Your_Database_Name_Here! t* H) t, P# R, l
- Hostname=The_PC_the_MySQL-Server_is_on D. L5 b2 X ?/ m6 W$ ^4 Y
- User_name=User_name_on_the_MySQL-Server
& t% ]/ N$ Y" U! E9 ]) `7 y - Password=Password_to_go_with_above_user_name, [1 n9 K: R% h. I3 t) O% V
- GetDriverFunc=getSQLDriverMYSQL* P. W2 u5 e- I9 U( a
- VendorLib=path_pointing_at_your_mysql_vendor_lib- ^' {7 k" e% [. k
- LibraryName=path_to_libsqlmy_libary4 U5 Y+ E- M7 h9 y! ]; y: S D
- Active=1
* b# v2 S2 C5 {$ L2 C! ]; k - ---cut here---
! i: C0 ]6 p+ e! q! b - In my environment (a linux box with a MySQL server running locally) I have:
! j: d3 R5 S9 W+ f - ---example---5 l3 r5 Q/ Z/ E: J% ]8 y+ \
- [DBEXPRESS]8 w: o7 N9 J+ u$ j
- sqldir=mysql_sql
* b Q3 P3 K6 Z) n3 G9 J! P# R/ } - Drivername=mysql5 k5 M) M' u6 `7 [
- Database=test9 p1 b) x) V8 R v" M5 `# Q$ i
- Hostname=localhost
- U! s) \) u; h4 w* {& } - User_name=testuser. V) j" h2 R: o0 |
- Password=my_password& g' t) l x) x1 a) @4 \9 c
- GetDriverFunc=getSQLDriverMYSQL/ W, J" Z( N: F1 L" ^
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
0 {6 N% V0 J$ X9 W7 G ^ - LibraryName=./libsqlmy.so. G1 A, v0 L3 O/ ^$ i8 Y' x
- Active=1
: b+ w7 L7 r, F# D) o - ---example---
N$ T# I6 y" n# C - & ` d9 {1 m0 E( E. G
- On a windows box, also running the MySQL server locally, it would be:
: O6 v% P J( h( @; f - ---example---) Z: F' H4 m3 d# U% r$ C- l; d
- [DBEXPRESS]
& U1 r' A: M/ G/ l# H) W5 ~/ E - sqldir=mysql_sql; a0 w, k7 |. F; `, @
- Drivername=mysql2 z0 d U i1 N$ F, g2 f
- Database=test
* @3 D0 P# X1 f( ~4 T2 w - Hostname=127.0.0.1
3 o2 _( W6 u' h9 w0 o6 P - User_name=testuser
: o; b! R+ n* E% W - Password=my_password
: Z7 f2 h# v2 Z5 ?. ^ - GetDriverFunc=getSQLDriverMYSQL
2 j0 A8 K5 n: o* [- x; d - VendorLib=libmysql.dll d* S- U: w9 K0 I
- LibraryName=dbexpmysql.dll
" w( A6 Z8 I- }8 t$ s3 B d - Active=1
2 k/ z' A7 d8 G% Q) ]- E. @& l - ---example----$ F }5 j! u- a* [
- - written 02.03.04 by pwk.linuxfan ]9 ]9 V: c, F. W( q
- ) W2 [2 M* e* F$ C; C$ l
复制代码 |
|