|
|
麻烦翻译一下,下面这段文章:xhan
1 R: e9 I" j/ `0 _" m1 n
) h3 e7 t5 H! Q2 |-
3 c& J% v# H+ c( K - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######) H4 t. E, y! V( h: ~
- , `* |! C b6 {# r9 [. K( S' W
- ### What we need ###; J/ I$ ]7 n8 ?% o9 x6 x T" ]
- Naturally, we will need a MySQL server to store the data for us, this document
5 w6 W9 E- m Y - will not explain how this can be done - there are documents out there for the 8 L0 D+ `$ t7 u. S E1 g8 @2 D* Y z$ Z
- interested. The requirements include a (empty) database for TeamSpeak to use
, ?" v; f; R: \5 n5 V! u - and a user account (username + password) that has the permissions to do stuff
3 U# F) [9 y- O z/ v/ f - with the database. Additionally, you will need a vendor library installed on the
. @9 q3 T: K' ]; I0 q - local machine, this came with my MySQL install.
, r: v. n- w$ X+ a W5 v - These instructions will not tell you how you might transfer your data from the
% y6 O/ S4 |; }9 V' K# w A - SQLite database to the MySQL database, we start with a clean and empty MySQL
* w0 H6 @& |/ r- B- V - database.
2 j. C! c, u$ ^5 {) E) q5 ] - Some users have reported ways to import a SQLite database into MySQL, but at* Q7 S) k9 O& z: | S# U9 v
- the time of writing, there are still too many issues - check the current status
7 R: I$ ^$ i9 P, ]5 z - in the TeamSpeak forums if you are interested.
7 i( `' G( ]9 B2 S8 p - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from: S& q1 C* L& t
- Borland was used. This driver can only interface with the client library that
* c3 g$ R8 A H m) ~2 v - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this) A# {8 n1 ~! R+ t2 D- H, I
- client library - basically all you have to do is to use a 3.x client library as
0 J* I/ x1 @+ L) ]8 W s - "VendorLib" and a 4.x database to connect to.+ s$ e7 h: f, k5 r1 [' V2 Z$ W
- If you need more info about dbExpress, you can contact Borland.
3 K/ t |; r8 \) k1 g
: g& e, q' ], }. E- ### Doing the work ###
( K# k% U. }( X* b) D9 m1 F( C - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all# c9 o8 w+ G7 _& F3 p: k
- the perquisites right, just open your server.ini file, and add this section at3 s( J, g% a) Q/ X. u& {3 r
- the end:' r% h$ f# V) r' j' O F
- ---cut here---
+ i! P4 `5 b3 u5 g" h5 _ - [DBEXPRESS], D$ j4 S6 e% h4 o# D
- sqldir=mysql_sql
( q8 m. B7 F# ~0 ^4 s2 q - Drivername=mysql
8 x E* F8 p2 E( ` - Database=Your_Database_Name_Here$ j8 \" }0 C3 Y( `, K, e* [
- Hostname=The_PC_the_MySQL-Server_is_on
: x/ l9 k' k* A/ W - User_name=User_name_on_the_MySQL-Server
7 M! h- {4 D7 }; d! r' _ Y - Password=Password_to_go_with_above_user_name6 g2 @) i5 H+ R! T* s/ \2 h) a
- GetDriverFunc=getSQLDriverMYSQL. E' a0 f* Y: i4 E
- VendorLib=path_pointing_at_your_mysql_vendor_lib0 G7 R% k0 \! t, ~: q z$ ~( a9 O+ h
- LibraryName=path_to_libsqlmy_libary
9 U# o* Q- @, B9 N; D. k2 d( E - Active=14 B+ I6 y- j+ l8 X+ ~) j
- ---cut here---+ T+ k% ]# E0 W! b6 C: [
- In my environment (a linux box with a MySQL server running locally) I have:
6 y) u# I* p8 A+ c! X( R - ---example---7 D! ?5 m4 |: a% ~) y2 A% s
- [DBEXPRESS]: I- o4 v$ A( g3 g
- sqldir=mysql_sql$ n% P Y, D, C2 W
- Drivername=mysql# d6 b& u V7 f8 W$ a9 O
- Database=test
$ P" ~# f, ^( Y2 ]$ G- w* E - Hostname=localhost2 A% j* j* @# @" v% c
- User_name=testuser
1 b+ e8 Y% ^& }; \# [) I- W3 T4 P" q0 | - Password=my_password
% ~1 ]& p6 _8 t/ f) V - GetDriverFunc=getSQLDriverMYSQL" B1 I! [1 ^0 q
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
7 l, M* t6 A7 g3 M v/ S2 m4 C - LibraryName=./libsqlmy.so
- u* z; t% c7 Z- e - Active=1
* c' [, R" H5 g# ` - ---example---7 o/ j3 N. A- l
9 {1 d7 F+ q" @: f$ D2 f& U- On a windows box, also running the MySQL server locally, it would be:; h3 w$ ^) d; b
- ---example---/ q1 n# _! ]; K1 N% f7 E
- [DBEXPRESS]
4 `4 d! W; w9 h3 I8 w; {9 | - sqldir=mysql_sql
: I R. F* M1 `! q - Drivername=mysql3 m: Y$ C& Z. U, h
- Database=test. G" x- G1 r8 r- Z
- Hostname=127.0.0.12 n5 {( O! c3 L4 g$ H @5 @
- User_name=testuser$ Z: j" b3 o1 y: N
- Password=my_password0 O, S X% m4 `# u0 K; v- `
- GetDriverFunc=getSQLDriverMYSQL$ U ~+ f5 n3 W" W( B4 x' Q
- VendorLib=libmysql.dll: Z* ]. ]( I- M5 i
- LibraryName=dbexpmysql.dll* d7 v4 W( y5 }9 ~5 p' _- T
- Active=17 z% \% |1 W. ?3 s) R" a( o
- ---example----' S; ?* `, f% b% Y; h
- - written 02.03.04 by pwk.linuxfan
% q5 N% b- i5 w$ n9 L% i; _- f% z
$ N: g8 y) i5 k3 y9 r
复制代码 |
|