|
|
麻烦翻译一下,下面这段文章:xhan # C6 c6 U( J Y
4 y9 J2 U+ V1 |+ Q) i) c
-
" [- D5 }# K, V6 G, C. f - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######, N0 j6 {/ Q) `; x
- ( I% _* N$ [! j$ U" N T
- ### What we need ###/ V* |! ~( A+ L; n7 i4 ~+ P
- Naturally, we will need a MySQL server to store the data for us, this document $ P+ A/ V1 \/ z% B/ r2 M& D
- will not explain how this can be done - there are documents out there for the
6 K2 P1 l. X) n0 s2 g- q7 `2 T - interested. The requirements include a (empty) database for TeamSpeak to use
- Q; y4 A/ F# M0 R, E/ T - and a user account (username + password) that has the permissions to do stuff+ J9 c+ P2 S1 g# u
- with the database. Additionally, you will need a vendor library installed on the
/ \: w% h8 z' H" H3 I - local machine, this came with my MySQL install.
* Q& b+ F% C0 ?. Q" L" ^$ A% t - These instructions will not tell you how you might transfer your data from the9 N5 j3 D! J5 O( k
- SQLite database to the MySQL database, we start with a clean and empty MySQL+ L0 p& w% a% t0 d3 @- T. L; e
- database.3 ]0 O z* M+ |8 B" ]
- Some users have reported ways to import a SQLite database into MySQL, but at
# A4 y1 b. G2 p# ^5 Y! u - the time of writing, there are still too many issues - check the current status
1 r8 E+ A+ ~5 s1 u+ s - in the TeamSpeak forums if you are interested.
" g' H7 |5 h' s) N3 V - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from& Q" s# e! ~8 y1 s- Z& `- [/ t
- Borland was used. This driver can only interface with the client library that 9 A# f3 Y( F3 B' W: L" y
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this2 e7 b; f5 l7 E& N' {& r6 q: ^- ]
- client library - basically all you have to do is to use a 3.x client library as % p' f) F6 P& `( m- E! ]
- "VendorLib" and a 4.x database to connect to.0 \: Q1 `. n9 j$ L/ O
- If you need more info about dbExpress, you can contact Borland.) I; T# |; P" g2 f* l
7 I9 U6 i4 K: N2 u- ### Doing the work ###
' v2 R8 B: ~; D! J3 o" e - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
; A+ E2 }3 e( w4 d ]& x7 ` - the perquisites right, just open your server.ini file, and add this section at N! h5 d7 [( J* Q+ p$ Q( }
- the end:
. O) f$ K; H9 o, e - ---cut here---0 P# K# [% o- N4 J6 \
- [DBEXPRESS]1 ~. x$ \, c+ R2 F; l8 O
- sqldir=mysql_sql
/ Y' X/ L* J& i" Z4 A! l n - Drivername=mysql
/ s4 G7 n( L+ [4 Z/ d( V R3 q - Database=Your_Database_Name_Here3 a% x: I# Q$ B5 v' S
- Hostname=The_PC_the_MySQL-Server_is_on9 M& K+ k) R9 Q; l3 S
- User_name=User_name_on_the_MySQL-Server% ~1 ~5 N* W8 J. B
- Password=Password_to_go_with_above_user_name% w# V' a7 C! Q2 D0 `, K
- GetDriverFunc=getSQLDriverMYSQL
( @- p$ C% I' ^" k. q - VendorLib=path_pointing_at_your_mysql_vendor_lib
: i2 M3 j0 `2 L! y" T" [7 ~ - LibraryName=path_to_libsqlmy_libary
/ B& }0 x& n6 G - Active=1
. j0 l8 O6 W: l- \ - ---cut here---
. n) r( Y/ E) J/ g - In my environment (a linux box with a MySQL server running locally) I have:
6 A7 q" s0 {) N' z - ---example---
1 {# ?! L7 N! |5 G! } - [DBEXPRESS]2 X. k% d/ W! ^1 x" e
- sqldir=mysql_sql) D M& ^4 A( E* ?2 J- l: b
- Drivername=mysql
1 l3 C' F9 h. G7 k2 ]+ Y - Database=test
3 i" m" L, ~+ g5 c - Hostname=localhost. x( I2 x2 R0 s" K% }6 q5 x
- User_name=testuser
: ?6 H! O( | n- W+ m; B - Password=my_password
; }9 l8 B3 g) F1 h; ~. w - GetDriverFunc=getSQLDriverMYSQL
. O2 a5 z) _/ A9 j - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
7 \% s* J/ Z9 p - LibraryName=./libsqlmy.so O6 m1 h6 ~4 t! L3 ~2 r* s7 w- @
- Active=1- `! W2 R( e! \- H& X
- ---example---
' ]. \6 [& X( U! q) E; ]
5 o+ u! v- I' ^9 L( Q- On a windows box, also running the MySQL server locally, it would be:( a8 f& a! C, f/ Q/ u! R! N
- ---example---
; m7 n9 Q5 ]. i7 a - [DBEXPRESS]
4 |9 ?& t n* q* {( Y' h3 l9 { - sqldir=mysql_sql
. M1 [9 o% N, U, s6 o0 F& T- ^ - Drivername=mysql
9 s4 D8 F: S6 q" ^; _1 Y6 [# J5 ?7 V0 h4 B - Database=test
; J+ W4 w* Q' A9 r8 q) h% | - Hostname=127.0.0.1* J2 V; \0 U+ w; F- z$ z0 o
- User_name=testuser
5 ?, Q2 s; N: C% ? - Password=my_password$ A0 K7 z: g# W
- GetDriverFunc=getSQLDriverMYSQL
( @# k4 {& _2 c1 } - VendorLib=libmysql.dll
1 V' A# F( [9 P1 e' T) S) t - LibraryName=dbexpmysql.dll
4 t" L# @, q A& R, z - Active=1! s( [ h5 ?% R$ A+ `8 k% h3 \
- ---example----
; m( V2 X$ g( L, \( g. o - - written 02.03.04 by pwk.linuxfan! y/ Y" o+ U$ ]0 i# ^! p
- " e( s, w3 D& P% Y) G, T0 V
复制代码 |
|