|
|
麻烦翻译一下,下面这段文章:xhan ; { A# H6 r' X1 M5 r) f+ t
' e( r* s( b; \3 l
- . v x$ N7 a U6 K+ x: x
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ###### w% z1 Y/ g6 F3 x/ k: F
- % v0 c$ U2 {" w. F' }- m. q( |
- ### What we need ###
: h4 Q6 g- |$ f+ i; |9 a1 Y - Naturally, we will need a MySQL server to store the data for us, this document
9 s( m" K& ]# e5 w- S( b - will not explain how this can be done - there are documents out there for the 6 x7 N7 k7 t$ `; B$ y; w1 N; ?# Z# \
- interested. The requirements include a (empty) database for TeamSpeak to use
+ V$ O% J6 |: U7 ]: m - and a user account (username + password) that has the permissions to do stuff
2 k2 `6 w4 N, ~2 L! _1 n! K5 l/ M - with the database. Additionally, you will need a vendor library installed on the
1 _- r- H/ t7 k6 B% c - local machine, this came with my MySQL install.$ n h# H, r1 }$ k* s8 J, H$ z& p
- These instructions will not tell you how you might transfer your data from the/ J: T8 ^2 p7 }5 @0 M. N* `
- SQLite database to the MySQL database, we start with a clean and empty MySQL
7 `+ S, X; n' d |; z - database.5 J7 r1 j9 I, D4 E3 P
- Some users have reported ways to import a SQLite database into MySQL, but at0 Z$ B9 `0 m' o7 S r" P$ d) b! h
- the time of writing, there are still too many issues - check the current status; P, _* K6 q/ t7 Y) T; L3 p
- in the TeamSpeak forums if you are interested.
/ b' e. k1 y8 O' e. T6 E6 A - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
8 U% F% z5 \5 T S/ m, Q - Borland was used. This driver can only interface with the client library that 6 l* _8 b* }' ]+ u9 P9 S! v4 C
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
! z- ^. ]; Z" b% P- @ - client library - basically all you have to do is to use a 3.x client library as
4 A5 _4 O7 [/ E3 I4 @7 E - "VendorLib" and a 4.x database to connect to.
0 v4 [2 J( \0 r- e% @" a3 ] - If you need more info about dbExpress, you can contact Borland.
6 X# i5 v; A# w. @8 h - % z+ b: R6 `8 s9 r6 v
- ### Doing the work ###1 H$ `: g- a, S; n
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all5 r6 k7 _1 b- c; L8 e6 x
- the perquisites right, just open your server.ini file, and add this section at0 p7 O5 G3 x6 M- k" p
- the end:: y7 w$ C* ^( p8 b& Z) C
- ---cut here---% q! O# [% t! S2 d
- [DBEXPRESS]
7 s) m; M+ m$ O* v - sqldir=mysql_sql. j+ Q) l. }) \8 u5 a$ n |
- Drivername=mysql/ H. y r5 ?9 |+ u j9 n. O
- Database=Your_Database_Name_Here" z& `- b! R! E( O, H }+ d
- Hostname=The_PC_the_MySQL-Server_is_on
4 L, E2 @3 i# F9 g2 i0 o' d* j - User_name=User_name_on_the_MySQL-Server& `- a) I' q* ?: t
- Password=Password_to_go_with_above_user_name
/ l# q; W+ V5 t: M# e3 g - GetDriverFunc=getSQLDriverMYSQL
( H& ?# G+ I. o" N4 R - VendorLib=path_pointing_at_your_mysql_vendor_lib
! f6 ]- r/ D c6 E7 k, j+ d) W - LibraryName=path_to_libsqlmy_libary: h1 v3 b- s$ ]3 j. M% Q
- Active=1
# {% X3 p3 p+ y% u - ---cut here---
2 X% E+ O" {- q2 m& S' E6 i - In my environment (a linux box with a MySQL server running locally) I have:
( w: G3 k$ ^2 |* f# A - ---example---5 ~$ q! j. A: l/ M# u5 p
- [DBEXPRESS]
% p* Y8 R( z0 e1 G2 c5 X& Y - sqldir=mysql_sql
+ x8 ~" D% U0 U9 I - Drivername=mysql/ D u0 _5 H) }
- Database=test
. h4 v( L( v# }3 q - Hostname=localhost. j8 n. U) f6 H- L+ p9 U
- User_name=testuser$ N/ D1 W9 H- X% l
- Password=my_password
! Z- O2 p8 _4 U# E5 G& L" z8 x - GetDriverFunc=getSQLDriverMYSQL
3 P# u+ a$ v" c& b. D* k5 ]- h* g4 o - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
! }% |3 X! ~! E; g' r# ]9 h - LibraryName=./libsqlmy.so, m9 E% N d- I
- Active=14 y" x. ], d5 ?1 G
- ---example---8 `- s: N. e! i! l0 u' F2 ^6 e% c
- ; j/ X# ]1 D$ m! L) x
- On a windows box, also running the MySQL server locally, it would be:9 e |6 |1 O* Z6 o
- ---example---
6 B- i# W/ j' `! E2 V - [DBEXPRESS]( B, m, B) [4 T6 p B4 A
- sqldir=mysql_sql9 M3 O" T# l7 ~/ r: F
- Drivername=mysql
! E' ]# Y$ F& b% ?! L. q - Database=test
0 w, }# O' \9 V: i - Hostname=127.0.0.1
; T4 h; G9 H% \' H4 v - User_name=testuser* P# M- ^. r. N; O% d! K+ `
- Password=my_password
1 b$ k- _( L/ H+ i5 X* O) R - GetDriverFunc=getSQLDriverMYSQL) E3 ?* Q6 f: M) ^8 E0 }$ @
- VendorLib=libmysql.dll
2 I. q; ^, u; d V) w6 }2 C5 Z3 Y2 X - LibraryName=dbexpmysql.dll: y9 d4 y" W1 c4 A, t+ i# Z' i
- Active=1
* f: v; Y+ `- B' K# W3 L - ---example----7 \9 B; z# b1 X& a( }1 U
- - written 02.03.04 by pwk.linuxfan
1 g6 ^: b I: n! |& p) b* p
# d5 F3 |) I2 Y" B
复制代码 |
|