|
|
麻烦翻译一下,下面这段文章:xhan # J& w) s- o5 S0 {" k- x' p! f
1 J3 a8 Q/ A- k8 _5 z. P+ J/ D& ^
- ( j" o# \! x9 K( r
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######" `7 K6 ~) E2 t- W" O
- ) I! G2 s, i2 K$ B- n
- ### What we need ###' j0 |/ B5 I% ~8 T/ e: L
- Naturally, we will need a MySQL server to store the data for us, this document ' f" Z4 p- L) [. O
- will not explain how this can be done - there are documents out there for the
: w& B' {: d* u- T - interested. The requirements include a (empty) database for TeamSpeak to use5 @! Q* y; L' G2 N0 R
- and a user account (username + password) that has the permissions to do stuff
: v& f) W4 N; v0 J4 h3 `/ ]3 z - with the database. Additionally, you will need a vendor library installed on the
! E% Y7 N* `+ w6 k4 k - local machine, this came with my MySQL install.* m% K; @2 |: N1 v! q4 f$ C
- These instructions will not tell you how you might transfer your data from the7 ^8 w# | B0 V U( [
- SQLite database to the MySQL database, we start with a clean and empty MySQL% R' B% R7 M6 t1 { k
- database.
$ w2 V; S! M3 ]4 S) V k2 p - Some users have reported ways to import a SQLite database into MySQL, but at. i5 {# L" P6 `* ?
- the time of writing, there are still too many issues - check the current status
" S* u/ J3 E3 l0 Z o' u" V" g - in the TeamSpeak forums if you are interested.% L7 Q0 f6 k. K! \
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from( |# U! ~3 [" v0 q4 G
- Borland was used. This driver can only interface with the client library that
% W0 J1 k% M+ N7 U/ G. R- N - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this; h3 @4 t0 q- }9 J
- client library - basically all you have to do is to use a 3.x client library as ) D! E3 N( Z6 l7 W* F- m G5 {
- "VendorLib" and a 4.x database to connect to.
# h! M& T' n J! e - If you need more info about dbExpress, you can contact Borland.
% \) B0 ^+ F) n' N: z# q; K& ~ - ' M6 k J/ N8 A& x2 Z
- ### Doing the work ###
2 s0 q E- W X - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
( N" g$ w9 U/ }3 y: y - the perquisites right, just open your server.ini file, and add this section at
0 R1 w" M0 s2 D3 v - the end:" z( i' y1 \. O8 x# e6 X0 B
- ---cut here---
0 ~9 h) X3 R5 \$ m# @( @4 c - [DBEXPRESS]
6 L6 }0 L' Q0 l! A/ x- Q - sqldir=mysql_sql7 k# Z% T# |& d5 a
- Drivername=mysql8 l G h( _6 N. W6 Y! \
- Database=Your_Database_Name_Here
) \0 @& ~. ]: f& I2 l - Hostname=The_PC_the_MySQL-Server_is_on, O; I# ~1 |, D5 j- A& i. d
- User_name=User_name_on_the_MySQL-Server" |5 E$ y$ z2 }. c
- Password=Password_to_go_with_above_user_name- t' E4 I/ P& ~2 o( t
- GetDriverFunc=getSQLDriverMYSQL
& Y+ a9 F: r0 f' B6 ] - VendorLib=path_pointing_at_your_mysql_vendor_lib' j, D- c3 v* n7 {# q8 ]
- LibraryName=path_to_libsqlmy_libary
2 s6 b& c1 [6 l, P- Z8 m' P' Y - Active=1
5 k: a I& e9 x+ X - ---cut here---
+ d' d* W C/ P# A' O - In my environment (a linux box with a MySQL server running locally) I have:
H ~" }! d4 j+ S4 e - ---example---
, c) N1 {- g% k2 v+ R1 @% |6 ? { - [DBEXPRESS]. G3 }* i. Y a5 M
- sqldir=mysql_sql" f* D6 h: d9 W! Z
- Drivername=mysql
/ [' y+ K) l9 v - Database=test
( a/ n5 O' C( @( K8 j$ T - Hostname=localhost4 Z: _" ^) J5 `3 F
- User_name=testuser
4 T$ o' [- S/ y! j+ X+ X; M - Password=my_password
& o; N* [- D6 u7 a - GetDriverFunc=getSQLDriverMYSQL
8 u" I0 B9 h6 ]0 O$ @) f) L - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
1 \# l2 ~5 l2 b! v5 O$ x - LibraryName=./libsqlmy.so# z1 g+ X) ?5 X3 {- T- Y# l
- Active=1
- P& D( |) a! e3 o' B5 U0 T - ---example---
. U1 M2 v/ s# D7 z1 Q - ' Z0 Y% b+ m8 B- c
- On a windows box, also running the MySQL server locally, it would be:
@" W7 Z2 L# p1 v4 K4 Z - ---example---2 t: |3 B/ M' o
- [DBEXPRESS]
0 H2 F9 H; q/ D( Y! @$ L - sqldir=mysql_sql! m* c8 I K* H ~
- Drivername=mysql
. I: B& ~: z$ |3 R3 u - Database=test9 ?( S5 a* r4 U; Y4 l' j* E
- Hostname=127.0.0.1
& Q- `' h3 _9 H% u& K8 D" i - User_name=testuser
2 d( g( z1 x# I9 H( Y$ R- a( h B - Password=my_password+ I0 G' o J: r. t' t: F
- GetDriverFunc=getSQLDriverMYSQL
; z, c, V# b+ i7 s - VendorLib=libmysql.dll* p" I9 v: K( H4 K! }! Y( q% J; Y
- LibraryName=dbexpmysql.dll" {1 @- e. L* t7 d ^
- Active=1 P2 M# q. V) P' x$ F0 K8 L
- ---example----' e6 K8 I6 _- E" F
- - written 02.03.04 by pwk.linuxfan
! [/ ]* ?0 i' j* ~3 B. U* ~ - & Y. d, q2 U0 |" e7 ^+ o( L1 L( X
复制代码 |
|