|
|
麻烦翻译一下,下面这段文章:xhan $ y- b# l& f5 F& x$ W" k/ F
- Z+ k1 ^$ D$ n
- 6 y8 s1 Q5 e( V- o2 L: @
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######" @1 J4 g! s, Q+ [% b3 @
- 9 D: D+ {( L% E7 o- n. n
- ### What we need ###7 l' K# |. x1 @7 n2 S. \' _6 E
- Naturally, we will need a MySQL server to store the data for us, this document ( C% `! `: B" |3 D1 l6 t0 }: D/ x
- will not explain how this can be done - there are documents out there for the
0 g" H( ]* S2 L5 U - interested. The requirements include a (empty) database for TeamSpeak to use! k9 s7 {- B0 {
- and a user account (username + password) that has the permissions to do stuff' d- Y4 X7 Q6 T5 H. T: |
- with the database. Additionally, you will need a vendor library installed on the
k' @5 e" s; m* P! d( x( V4 n - local machine, this came with my MySQL install.
' H- X/ r0 P# A9 ~% Y - These instructions will not tell you how you might transfer your data from the
4 G: |1 D* Q7 _" ?+ u: F - SQLite database to the MySQL database, we start with a clean and empty MySQL- j. [& O# i1 B
- database.# i# G# d/ k# v( e( r5 H
- Some users have reported ways to import a SQLite database into MySQL, but at" [+ c8 V0 E" R9 o6 M0 b
- the time of writing, there are still too many issues - check the current status
# H# b; l% x) n2 K' P/ E - in the TeamSpeak forums if you are interested.
% r" s& e3 V( n5 a: `8 S8 O - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
, b: ^9 @8 [0 _, O1 T; t) W - Borland was used. This driver can only interface with the client library that + {4 @8 K& K9 W, ?
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
* x7 }* d7 G! ?7 V0 ^! y/ s - client library - basically all you have to do is to use a 3.x client library as * v7 r+ S: h5 Q# x
- "VendorLib" and a 4.x database to connect to.
5 \- o9 g+ A: M2 \ - If you need more info about dbExpress, you can contact Borland.3 \' D7 @- A- V& C& u5 k9 O; d
- 2 x0 }" J& m! F+ B; j
- ### Doing the work ###3 y# c3 R. A: N! G6 a1 R; [
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
% h; |) v' I1 Y) L8 i8 @2 | - the perquisites right, just open your server.ini file, and add this section at" X/ Q4 s. g2 K2 x. \/ j g2 J
- the end:( _* O8 v/ ?& s
- ---cut here---
- f1 B$ Z1 J X# q6 C+ {6 |4 q - [DBEXPRESS]% ~: E9 G$ l8 Q, s: {6 G0 A) l
- sqldir=mysql_sql8 Z' D' _9 t9 ]2 Z$ w& T
- Drivername=mysql
4 q4 S9 {/ a8 R; T7 i& D - Database=Your_Database_Name_Here
) b' [) U0 I5 @3 F b. t - Hostname=The_PC_the_MySQL-Server_is_on, G5 Q" ~- w3 v, x0 u
- User_name=User_name_on_the_MySQL-Server
6 K& \$ Q# E, J4 t7 B/ ^3 } - Password=Password_to_go_with_above_user_name
5 u/ B9 A6 E+ q5 m" Y. p - GetDriverFunc=getSQLDriverMYSQL+ x c+ x3 r i- u" r- Z$ E- d
- VendorLib=path_pointing_at_your_mysql_vendor_lib
. L* v2 @; u- j0 R% m* t' g" P - LibraryName=path_to_libsqlmy_libary
* a( f# _) d4 _" N3 H( }, r2 c - Active=1
: ?& i. q. ?* p4 x9 Y. a - ---cut here---
. W" f1 U3 X6 S/ T - In my environment (a linux box with a MySQL server running locally) I have:" |4 R. V2 \& r' i
- ---example---
: S& ?. z; \% c! B8 D - [DBEXPRESS]2 A5 f' Z% [' j! t+ E' n
- sqldir=mysql_sql0 J: a4 N( t( _$ ]* z# R
- Drivername=mysql
% h4 v7 {2 `0 O( w8 S* e3 q' Q - Database=test
! I* }" r4 ]& ~$ r' T9 g - Hostname=localhost, L4 x I' x3 u1 x5 |6 g5 n2 v) A
- User_name=testuser
2 g. Z$ ^, H" M" m - Password=my_password# ]4 V; D. A6 w! E* R' w
- GetDriverFunc=getSQLDriverMYSQL" R: N/ ~/ B5 e+ a
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0% z4 |+ G+ t- y3 e! z, ~
- LibraryName=./libsqlmy.so* R3 z" `7 Y/ @# K
- Active=1
2 h& B) T# h9 z0 o - ---example---9 M7 W. W$ F7 y0 z
8 f- v9 \6 y' ~6 ^# J2 c2 B- On a windows box, also running the MySQL server locally, it would be:( X& q* v' }) X/ P
- ---example---8 Y% f! a; R) A2 ]
- [DBEXPRESS]& t( C: s; U5 r; q6 E
- sqldir=mysql_sql9 A9 m/ d0 J1 H, M0 Z* |
- Drivername=mysql
5 F0 A3 U/ I& J+ W( M - Database=test
# Y& l2 c& L! S- l, P' f* S - Hostname=127.0.0.1
6 W4 \% [ U8 t, p7 y8 B0 R0 y - User_name=testuser
: D W N, i, N. j4 Y6 V( F - Password=my_password7 N" {1 h, ~( ], p$ {; n
- GetDriverFunc=getSQLDriverMYSQL
. n4 `# \4 V/ _ - VendorLib=libmysql.dll" |! J' [; i7 s! D$ e2 K% v
- LibraryName=dbexpmysql.dll
3 U8 [8 q8 G, s$ |: |; i& Y/ d - Active=1
! g) o7 v; \6 u- E6 n - ---example----& {7 c( l1 f6 c; {7 }# [- B
- - written 02.03.04 by pwk.linuxfan4 X I6 l @1 N4 A9 [' Z% s
$ o [# ]7 m) n# v# W1 u/ G
复制代码 |
|