|
|
麻烦翻译一下,下面这段文章:xhan $ P# d2 | d- H6 ~
4 I8 \' ?) x. j. b+ D! ~
-
" U% R+ A# V6 N. }4 L5 J; p$ h - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######9 ]2 e0 H M9 y2 M0 V4 j: E% q
- $ w4 a" K* f/ Y/ y
- ### What we need ###
# C2 b6 [$ G0 k J$ D - Naturally, we will need a MySQL server to store the data for us, this document
: X3 i9 }) k* r0 I4 [5 S - will not explain how this can be done - there are documents out there for the
, \$ [' S \% i' y+ W- { o Q - interested. The requirements include a (empty) database for TeamSpeak to use2 b9 u% b2 A; Q0 U1 T
- and a user account (username + password) that has the permissions to do stuff
$ M& z! q/ N) A1 `7 z( H( y - with the database. Additionally, you will need a vendor library installed on the
: P- B+ e: L% y' a6 S - local machine, this came with my MySQL install.
$ c5 T5 M- O& {; { - These instructions will not tell you how you might transfer your data from the
$ s$ }# e( ~" U3 N - SQLite database to the MySQL database, we start with a clean and empty MySQL2 U0 q9 G9 k! x9 D5 ^3 P, S
- database.0 p+ C3 C9 o9 c0 F& m, \+ t" o
- Some users have reported ways to import a SQLite database into MySQL, but at7 F8 A9 q# X- ~9 k
- the time of writing, there are still too many issues - check the current status
8 @# \# K+ }) p8 l! Y0 `0 n- ]& B3 k - in the TeamSpeak forums if you are interested.
- R i- o* f2 [5 Y - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from; w; X; j" S4 h1 q$ j
- Borland was used. This driver can only interface with the client library that 8 B! Y0 L ?- i( @5 b" O; y& C
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this- Y" Z; }1 R1 p9 t' A; ~' ^
- client library - basically all you have to do is to use a 3.x client library as
- y& m1 H P" p& e2 s0 N" w - "VendorLib" and a 4.x database to connect to.' _2 r$ J3 ]4 K% M! H: N, ?
- If you need more info about dbExpress, you can contact Borland.
, P; {( B5 o2 B9 R& a0 b5 H2 U - $ X8 ]3 n5 l4 Y# `
- ### Doing the work ###1 z" L9 h! h e4 D1 S6 P- n$ ?/ d- p
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all& y% M+ a5 n( U: l
- the perquisites right, just open your server.ini file, and add this section at7 R2 ^) v) u" q3 O5 _; @8 l. Q
- the end:
; }( v. Y* B7 L7 z - ---cut here---+ Z. P/ j k, P8 e2 |; H1 b5 D
- [DBEXPRESS]
# T1 I5 e$ a2 \ - sqldir=mysql_sql
0 b( z3 V ~1 G" k- E - Drivername=mysql
/ e) Q" }$ S' u" N* a" N4 @- Q - Database=Your_Database_Name_Here3 d" S$ r. j9 F- H5 a. ?6 @3 j
- Hostname=The_PC_the_MySQL-Server_is_on
* [$ P1 j# u# ?% ~! x - User_name=User_name_on_the_MySQL-Server
9 D; c7 S+ l G8 q( d, ?3 q - Password=Password_to_go_with_above_user_name8 O8 y6 L" s1 K1 a' Z. `
- GetDriverFunc=getSQLDriverMYSQL
6 F5 \& z( T+ l/ D - VendorLib=path_pointing_at_your_mysql_vendor_lib ?! Q V9 a; W
- LibraryName=path_to_libsqlmy_libary
8 c3 ]$ P7 U/ [ p+ y$ t( r - Active=1
9 `* n. f" H" L5 a3 P& p - ---cut here---
/ k* b+ e) y, M- \+ b2 \( \3 j - In my environment (a linux box with a MySQL server running locally) I have:
# M) W( G P: K% L& K- _ - ---example---4 [# {& n& R% S( D9 i! V
- [DBEXPRESS]
' O( K/ P, i9 N0 i3 { - sqldir=mysql_sql
1 J, d" n" @ C. \& r8 n - Drivername=mysql
; s7 |, ~8 R/ c; q* \# B - Database=test9 f5 E4 B+ [/ |9 f/ k0 z0 _/ T
- Hostname=localhost; h6 T* Y: Z8 r# [2 i2 w$ P
- User_name=testuser
* H, u4 G p& `4 {. g( Q% _ - Password=my_password8 w* P* Y' ~! s! }$ r @6 s+ n
- GetDriverFunc=getSQLDriverMYSQL2 \9 X. T* \" p# p9 N% J
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
2 C: M5 r9 \) F6 m! }& L - LibraryName=./libsqlmy.so, [6 F: b, K' y3 i& K
- Active=1
: _) s+ a! d7 q0 h/ u! g3 ~) A - ---example---) {- ~$ Z0 k( Q4 T; Z! j6 K
- 7 ?* x" }: B* G) P7 p) L+ _
- On a windows box, also running the MySQL server locally, it would be:6 \+ f; p! z: Y! x7 f
- ---example---
; C" Z; o8 r- [$ y: O% [. ?8 I - [DBEXPRESS]) Z7 r$ u$ b; q% T- Z; ^) t
- sqldir=mysql_sql
- Y. X) L, ?/ E$ T - Drivername=mysql0 q2 ?$ Q, D/ l. e
- Database=test
+ r+ O; Z! r1 e* F - Hostname=127.0.0.1- m- w, c) ?( w2 S
- User_name=testuser# h- p* p% b) A: H& J
- Password=my_password' O6 c3 _7 A2 q! s
- GetDriverFunc=getSQLDriverMYSQL6 K4 I( t" ~2 t1 A6 k
- VendorLib=libmysql.dll6 ]- \5 @+ G3 C2 q" q/ X6 U% y
- LibraryName=dbexpmysql.dll# ]2 A# L% j2 x9 f" z
- Active=1! t0 _* h) ?2 b7 F$ j
- ---example----
# m" t$ X1 a& E7 V% Y+ Y - - written 02.03.04 by pwk.linuxfan/ Y# ]& ]9 S& y7 \% O, o; Z7 _( V
- ) D- h) F2 b6 l9 h9 B7 {
复制代码 |
|