|
|
麻烦翻译一下,下面这段文章:xhan ' e, a! K% p- q. x0 d4 P
2 E- n) Z9 W V2 `- N0 G+ x H- 1 Z3 K+ i% k9 M; ~& }
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######5 Y, Q/ B. \( L3 e# d4 e6 ~" L; {
- . S' T' b7 Y* j, n( e
- ### What we need ###
Q* J" Q- J: y# D1 s5 G9 l - Naturally, we will need a MySQL server to store the data for us, this document Z7 v' X% c" ~' }
- will not explain how this can be done - there are documents out there for the
2 i$ f# Z" [* z) z# d - interested. The requirements include a (empty) database for TeamSpeak to use: Z7 T6 B6 M! H T
- and a user account (username + password) that has the permissions to do stuff
# E4 F0 D0 [$ U' Q: Y - with the database. Additionally, you will need a vendor library installed on the/ d$ A" h8 Q1 V9 B. _; @
- local machine, this came with my MySQL install.
6 z6 O$ L& Q1 H* o2 O$ O8 m, E2 E% V - These instructions will not tell you how you might transfer your data from the
! y+ P+ w" K; b% M8 B0 V J - SQLite database to the MySQL database, we start with a clean and empty MySQL
4 I+ x# y2 A: D& b - database.) q) A, E, s$ y% x# D$ a" `1 @7 T" `
- Some users have reported ways to import a SQLite database into MySQL, but at
' \ j8 D# N5 j5 S! w4 Y e( h) h - the time of writing, there are still too many issues - check the current status7 K2 P4 |6 C' {0 L! Q) v) z
- in the TeamSpeak forums if you are interested. M8 E8 B( X; A
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
& x) d9 |( k* ]$ Z$ P' n0 f: Y - Borland was used. This driver can only interface with the client library that
% T# }9 ~5 s- i! r - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this- }* [( D* J' m. {/ Q
- client library - basically all you have to do is to use a 3.x client library as . a9 M" o7 L7 w$ R8 b
- "VendorLib" and a 4.x database to connect to.
L$ j- }; i$ w - If you need more info about dbExpress, you can contact Borland.5 {( N) p, @* I7 k3 V* E8 W
- ( M' `" n1 f m8 g! s" x
- ### Doing the work ###
* L* F: r a8 L - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
3 m: \$ ~+ a$ b+ d; A1 [ - the perquisites right, just open your server.ini file, and add this section at
% _( z$ @. e6 t! V B - the end:
+ _, D, T, ?7 [! \5 S - ---cut here---
% [& l$ i9 |+ d - [DBEXPRESS]9 O, z. `) a& m
- sqldir=mysql_sql- b: s I. E' G
- Drivername=mysql0 ?) m( O1 q* d& `+ `+ T! m
- Database=Your_Database_Name_Here
( h, y; R/ u5 Y: `$ T# T - Hostname=The_PC_the_MySQL-Server_is_on0 {) r0 E* {" y. G! N4 A X7 w0 {
- User_name=User_name_on_the_MySQL-Server9 t4 \8 @' E" B: x+ L& u8 ~
- Password=Password_to_go_with_above_user_name# G# j. @8 \9 K b3 _' n: \) g) M
- GetDriverFunc=getSQLDriverMYSQL
4 M4 F S6 h" L4 x C - VendorLib=path_pointing_at_your_mysql_vendor_lib, N$ {$ ]& C" B3 |; C3 U; p
- LibraryName=path_to_libsqlmy_libary
0 z" n: L; z+ R' d0 f" l! s - Active=1 b5 K# L8 g- n! p" B# z# O, s
- ---cut here---8 P% D5 ? t, O: v k0 e
- In my environment (a linux box with a MySQL server running locally) I have:
/ T* W2 k9 e4 f8 r - ---example---
6 \* P8 B3 @0 E+ o - [DBEXPRESS]
8 Q' s' ~' ?2 @9 j3 Y8 a0 m - sqldir=mysql_sql
9 s" c$ S0 G! J _; [# r - Drivername=mysql
; e+ p+ ^6 k6 g3 h) `% i. i+ Y- T - Database=test
% J, F# l; l" \( I8 ^9 l - Hostname=localhost1 R& M& c, I3 @3 I5 n2 Q
- User_name=testuser7 G2 [! `+ L# u% `( z: x* ~. P
- Password=my_password B' c1 {2 w# b% Z& c8 x
- GetDriverFunc=getSQLDriverMYSQL ]1 g- c( r* M& x5 \4 e! C' C
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
1 }7 z6 D4 O" E% l - LibraryName=./libsqlmy.so) o# Y# g, m% \ j' R
- Active=1
+ y6 B" T! Z& }$ U - ---example---
% m6 Q1 t7 Z& n+ U1 |1 ? e6 F
. z, n. R( F9 ^8 f) e( m, f8 _* F- On a windows box, also running the MySQL server locally, it would be:) `/ a! V" m8 c% c0 E
- ---example---
% W ~+ L3 I# n0 u6 S7 u% N/ r- X - [DBEXPRESS]
! S5 H% h6 t5 R9 B: O4 u' v; a - sqldir=mysql_sql9 W( J {3 m5 @# L$ U
- Drivername=mysql
`, y" p) s3 I7 ` - Database=test! f2 o$ ?! o% B; Y. }. `
- Hostname=127.0.0.1
+ _- U# f" R8 R - User_name=testuser
9 V. w+ f ]3 z9 E5 w1 c - Password=my_password/ X1 _/ {) ?( y6 g6 P9 D
- GetDriverFunc=getSQLDriverMYSQL
& o, g7 J, A3 n6 ^ - VendorLib=libmysql.dll' s; T6 P8 ^+ E
- LibraryName=dbexpmysql.dll) T0 O2 C1 J( q8 m
- Active=1) [7 D1 \- C- ~) D5 T* A. o
- ---example----
H3 q7 ]; u/ x* k0 S - - written 02.03.04 by pwk.linuxfan
" B3 @& H# z: B& X4 h/ D% | - , L' B F5 m1 {0 g+ q7 p$ ~$ `
复制代码 |
|