|
|
麻烦翻译一下,下面这段文章:xhan 7 H; J$ N! r+ j. }( E
5 @. n3 x) e P
- 5 z) S0 _8 s& X/ y+ Q
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
" T& _$ r2 H) ^2 o0 ?0 k - 6 z2 n' O9 Z) w
- ### What we need ###
. @& }& y; M( ~3 x! Z' n - Naturally, we will need a MySQL server to store the data for us, this document 1 U+ y; ~( l& e/ G7 U3 {; U
- will not explain how this can be done - there are documents out there for the : g# Q2 v! V/ ~* \8 a0 [3 g0 u
- interested. The requirements include a (empty) database for TeamSpeak to use. V+ n) D1 Z; v/ G/ g
- and a user account (username + password) that has the permissions to do stuff& L/ ^- T! Y9 p7 T" i! {; |/ c
- with the database. Additionally, you will need a vendor library installed on the7 `/ Q! [4 y( s6 ~
- local machine, this came with my MySQL install.4 M, v. n, ~, g! D, u1 r M0 K; l
- These instructions will not tell you how you might transfer your data from the
, E( {3 z; f! V5 Z! p z. `2 I - SQLite database to the MySQL database, we start with a clean and empty MySQL
y" z: C0 o N' f+ T2 J1 Y - database./ q3 W. s/ T% ` m0 i% a5 |
- Some users have reported ways to import a SQLite database into MySQL, but at
6 t0 f% j; _; M - the time of writing, there are still too many issues - check the current status
: o: y' T1 u/ K: `: E# F - in the TeamSpeak forums if you are interested.
( m4 x$ x$ @5 p* v4 X8 F( ]5 D - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
$ Y: {- q2 N0 ]6 p' M2 u - Borland was used. This driver can only interface with the client library that 3 i. {( ]; X, f' v5 E% w o
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
; O7 r3 n" O( s7 I+ @7 w& _ - client library - basically all you have to do is to use a 3.x client library as 9 r7 a( e% H1 `# B2 h2 M% o$ s
- "VendorLib" and a 4.x database to connect to.# M9 U, S2 k& c8 n) l7 R
- If you need more info about dbExpress, you can contact Borland., X) m9 [0 z( {
- ! K" H! T: a7 a3 ]
- ### Doing the work ###
2 M: Z8 s9 y3 i% T* R: S - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all& F2 P" H j$ p [. Z
- the perquisites right, just open your server.ini file, and add this section at/ [% X/ s. l6 a4 J
- the end:7 R& j8 s6 a) |. m# ]( S
- ---cut here---- x O( d2 o! \( H9 l& q
- [DBEXPRESS]" i, ~' s& Y6 s, a' h: B1 n# z
- sqldir=mysql_sql
& Q8 t( ?$ j& u' Y - Drivername=mysql
0 b. a& j" H& g - Database=Your_Database_Name_Here
1 v, s& W% y+ j. C0 i# o: ]! _ - Hostname=The_PC_the_MySQL-Server_is_on
7 O: W! e" ^3 I/ N6 s4 E; y - User_name=User_name_on_the_MySQL-Server
* \ h4 A* I7 _ - Password=Password_to_go_with_above_user_name
' R5 O& ?( c1 P+ b# d - GetDriverFunc=getSQLDriverMYSQL
+ d1 s9 U4 r' K% p - VendorLib=path_pointing_at_your_mysql_vendor_lib
# ]5 T% H! P3 i, Q( G( X - LibraryName=path_to_libsqlmy_libary
9 [. Q5 Z F' X( L - Active=1
- Q& h* y% V! _1 g - ---cut here---
: Q7 T l9 U+ T2 O0 y - In my environment (a linux box with a MySQL server running locally) I have:
5 L: J9 Z+ a( Q( t. W- X [ - ---example---' {* L9 } f4 e
- [DBEXPRESS]
: \: [! J( h0 f' S% q6 t; Q - sqldir=mysql_sql7 b9 d( K/ Y6 s( p7 U0 k3 b# ]
- Drivername=mysql4 A, q+ U, o9 x* j! i9 T
- Database=test* X& U( j# I$ e `1 k# z; ~! Q
- Hostname=localhost6 W4 d- z1 d1 W% ?
- User_name=testuser! c! ~0 w6 W6 p' z% G* j5 q
- Password=my_password
7 f8 l- w3 [6 W8 L - GetDriverFunc=getSQLDriverMYSQL
. L% Z4 I% m X5 t! K; g - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0- ?5 K5 N0 H) T$ a! a
- LibraryName=./libsqlmy.so
4 m+ f9 z% d' @7 u - Active=1+ c8 Q$ G1 x. p p+ R
- ---example---
( D' j/ f* R4 p" V$ k - ) l# A: J; [0 X
- On a windows box, also running the MySQL server locally, it would be:# {0 d7 T. a$ C( K
- ---example---
C5 H5 F4 |% N6 ~+ Y9 U; M - [DBEXPRESS]9 A B- B% y9 W4 k+ u3 W- B
- sqldir=mysql_sql
1 o9 h& N! t( }5 V$ G - Drivername=mysql
; r0 Q# o3 k C) n5 @ - Database=test
- g* X# ?( ~! G7 X" g. t0 e: K - Hostname=127.0.0.1$ n: U% w" n( B& ?
- User_name=testuser& F0 W8 }. @5 d w' X
- Password=my_password1 V8 s8 w0 A L6 F" R* H+ {
- GetDriverFunc=getSQLDriverMYSQL C6 B0 q) S7 G: r
- VendorLib=libmysql.dll
: I) x' C- ~1 l. L# e - LibraryName=dbexpmysql.dll
* P0 m z# V9 w, ?$ k) S" A6 N% E - Active=1
o- ?( P% C: M8 R- }- ~8 c - ---example----
* Y* l# p- G5 F' N) e+ k+ Q0 W; h - - written 02.03.04 by pwk.linuxfan3 ~8 }) O8 n, V; q
- * T6 l) `6 ~1 B! q* |
复制代码 |
|