|
|
麻烦翻译一下,下面这段文章:xhan
; D2 T. v, h- Z/ V- [$ x7 k3 c1 d- A) l) H
-
# U& B8 x: B! E7 [+ q) ^3 w/ r - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######( w+ g8 C. J2 L, R4 q- B
- & M5 B1 u5 X& f" A
- ### What we need ###2 m6 q O8 p0 I9 W# X0 W* s2 `
- Naturally, we will need a MySQL server to store the data for us, this document % c8 @1 F' a& n* H6 |
- will not explain how this can be done - there are documents out there for the
! P2 h- t! @5 s - interested. The requirements include a (empty) database for TeamSpeak to use1 c, \6 P3 b* N6 c! s6 L( b1 A
- and a user account (username + password) that has the permissions to do stuff
- Y) R } ?& Q! k: y - with the database. Additionally, you will need a vendor library installed on the
; k% Q/ {! E6 W- Y2 a - local machine, this came with my MySQL install., T g& W8 m* |" G( K6 y
- These instructions will not tell you how you might transfer your data from the. t: f O+ B- E5 S) \# L$ }) U U
- SQLite database to the MySQL database, we start with a clean and empty MySQL
5 a% h! m! \, h. n, X - database.
% L7 u+ H/ P+ t* ?8 o - Some users have reported ways to import a SQLite database into MySQL, but at* U% p# u- a, D% ?- S4 F
- the time of writing, there are still too many issues - check the current status( O. K: ]) \ V3 l
- in the TeamSpeak forums if you are interested.
8 S) g. L' J" O - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from+ `% E% x) t P/ I; ~% z1 L6 W( G
- Borland was used. This driver can only interface with the client library that
7 Q# ^6 T* i8 Y& c+ Y - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
( k0 w H. S Q0 b; y - client library - basically all you have to do is to use a 3.x client library as
0 O1 w$ R4 W) n) [; Z1 n - "VendorLib" and a 4.x database to connect to.* D8 i& s) Z1 {# W2 Z U
- If you need more info about dbExpress, you can contact Borland.
V6 g& W- b- _6 n - 6 |$ q) ~* u Y/ B" z. O. |
- ### Doing the work ###
# s+ I. f, p- W+ g0 U! P - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all/ U7 [3 G0 j: {4 N6 ~
- the perquisites right, just open your server.ini file, and add this section at. a8 ?0 o2 p# Q4 Y
- the end:
$ x9 [0 q% ^: R, ?) x$ N - ---cut here---6 `' E( U9 ^$ U g+ s2 {
- [DBEXPRESS]
: Y: ~. i6 I& R: ^/ ~8 v/ A - sqldir=mysql_sql# ]& b+ i' g4 Q+ d4 _# N
- Drivername=mysql6 s% x+ I4 h, O& W- [) G
- Database=Your_Database_Name_Here
/ Z: b5 I) V( p# ]( @, S* w - Hostname=The_PC_the_MySQL-Server_is_on
& N/ c1 k$ Q j/ o% l/ ^/ I+ v( ] - User_name=User_name_on_the_MySQL-Server
7 F) I3 S( f* @- C+ f) K - Password=Password_to_go_with_above_user_name( h7 d5 A8 |5 P( U. a# k
- GetDriverFunc=getSQLDriverMYSQL
" e5 @* H, S1 r4 B7 V* S9 q3 L/ ^& d - VendorLib=path_pointing_at_your_mysql_vendor_lib# r! B# L/ }9 G- M
- LibraryName=path_to_libsqlmy_libary9 \/ N% P- p# {) s2 B8 }
- Active=19 `. |9 `# P# m ?6 {9 m
- ---cut here---
4 D1 S- A; ?4 a4 M. ]0 T1 F - In my environment (a linux box with a MySQL server running locally) I have:0 Z; h p) L1 b4 c- c' e% u
- ---example---
4 S9 F/ k' Y2 j/ d" w) p - [DBEXPRESS]+ ~% b# e3 p* `9 ^
- sqldir=mysql_sql2 u/ S! B0 w1 v K. t$ J* \6 t0 x$ b( \
- Drivername=mysql8 V& F5 {( w6 N3 m2 k
- Database=test3 J( h' m5 P1 d' b- _( j
- Hostname=localhost: L# O' j8 o7 ^, ?. i) ^1 x! s
- User_name=testuser
& t, S4 V& X* U - Password=my_password8 A' I: i5 Y# z8 r! ^2 @ c7 ~# s
- GetDriverFunc=getSQLDriverMYSQL3 a4 g' M, q( J! V
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.06 i d# y! H) h! \# |
- LibraryName=./libsqlmy.so" K7 F# j% v, i( d( d4 O# A: w+ Y
- Active=1
! W% h6 \; c/ ]7 f) e - ---example---7 K5 u% ~% D$ C% u4 p
# I8 ~3 G" [: r- On a windows box, also running the MySQL server locally, it would be:( m3 v. L0 Q- Y4 W
- ---example---) g" H( j* u* o1 T1 Q- B( x
- [DBEXPRESS]
. _) M" {& n% h) U, L' Y - sqldir=mysql_sql4 ~7 h: r! y" S3 G$ E0 [
- Drivername=mysql) m$ [: |& z7 w, X' Z
- Database=test
. h* g. g2 F1 ~9 Q - Hostname=127.0.0.1
! q0 n& a# B( W0 m: C - User_name=testuser
. O0 T: l7 |; @- z - Password=my_password% G2 y% {% {/ \4 |
- GetDriverFunc=getSQLDriverMYSQL' k* G' _2 _. `' ~/ m% M) _& R
- VendorLib=libmysql.dll
1 x/ u8 E1 F# p - LibraryName=dbexpmysql.dll
; n* I4 E* L4 Z8 R ? - Active=1, N2 b2 u+ M4 ?+ X9 Z% Z
- ---example----
" [; i0 _5 K# a: f8 f% `# b- A5 c( a - - written 02.03.04 by pwk.linuxfan
' v0 H9 h, o: Q4 M3 v - 0 H# |0 j0 t' M
复制代码 |
|