|
|
麻烦翻译一下,下面这段文章:xhan
5 E8 {9 J; j5 d3 z& t/ J( r% a+ u
- S0 J, k2 B: ^1 s- B' @- 7 C( N& J) H' i/ e E( W4 E! d. a
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
8 `/ n( b a" Y9 r& U+ ^1 ?: c
' i/ ^4 P) t n) j* L: ?- ### What we need ###9 B% e; y% u. M% I
- Naturally, we will need a MySQL server to store the data for us, this document
( u M( B; Q1 k5 U3 k9 O- { - will not explain how this can be done - there are documents out there for the 0 @8 N, W0 j: {2 W% y
- interested. The requirements include a (empty) database for TeamSpeak to use
! X; M/ o+ P, Z8 D: J - and a user account (username + password) that has the permissions to do stuff
' D+ O' _7 K5 z - with the database. Additionally, you will need a vendor library installed on the
' O0 \6 \, G( y5 _8 R - local machine, this came with my MySQL install.* _0 \; M H+ W1 X9 N% K: g3 S8 s
- These instructions will not tell you how you might transfer your data from the
& a1 r+ p* u5 x, t, S6 b - SQLite database to the MySQL database, we start with a clean and empty MySQL7 P1 p) ^) o: Z- m( j/ N5 X
- database.5 W9 Q. @6 L' P4 {4 k$ d8 G/ O
- Some users have reported ways to import a SQLite database into MySQL, but at
$ r2 N! L2 X" p0 E' _: h+ |8 ?9 d - the time of writing, there are still too many issues - check the current status9 ]/ q* R1 V- @! N
- in the TeamSpeak forums if you are interested.5 i C& q# X7 L
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
. p1 V) m1 C" t# }5 L - Borland was used. This driver can only interface with the client library that # s% F: u G7 V V u8 {
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this4 N# j% h. S) s6 g
- client library - basically all you have to do is to use a 3.x client library as
5 j5 o$ p' x" S - "VendorLib" and a 4.x database to connect to.
! d5 X! n% w, R - If you need more info about dbExpress, you can contact Borland.+ a7 ?6 y/ r1 \3 E
b8 P2 K4 K& W {- ### Doing the work ###
* c% Y& ] U o- E - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all0 Q: f& E' R$ W, [ `8 A
- the perquisites right, just open your server.ini file, and add this section at4 \ N' d/ e4 L$ P8 T, r
- the end:8 U+ ^1 u, I3 c0 E) o) C: _% J
- ---cut here---" M0 V' D5 c' P. Q
- [DBEXPRESS]
! v- b$ m7 S5 U. K! n# Y# H - sqldir=mysql_sql' X& k! K2 z! y8 o! d7 u
- Drivername=mysql
5 W! A% R! I4 ?+ O1 Z7 V% M - Database=Your_Database_Name_Here. O/ M4 h: Y6 T# j
- Hostname=The_PC_the_MySQL-Server_is_on
G; _2 k( k+ T! Z! h* j a6 ^ - User_name=User_name_on_the_MySQL-Server
4 ~0 ?7 G1 Q" e$ x3 T/ d - Password=Password_to_go_with_above_user_name
( J; z+ Z" Z0 `/ a, J0 k% A - GetDriverFunc=getSQLDriverMYSQL' S2 ^ M! E* o' L# R B, S
- VendorLib=path_pointing_at_your_mysql_vendor_lib
+ Y2 H) Y* |0 f- i7 x% q' N - LibraryName=path_to_libsqlmy_libary- v" S3 H A Y, d P, k t! S
- Active=1
. a: t" L6 j9 h7 v - ---cut here---# h- t4 Y6 o! l9 p% ~. C
- In my environment (a linux box with a MySQL server running locally) I have:
, Z5 @8 }8 M- F8 B& @9 b - ---example---3 m# ~' r% ]7 D* ]. | y8 y! H
- [DBEXPRESS]1 _+ A# {- S" U4 x7 d7 m% K
- sqldir=mysql_sql
# S) ?. r3 b, N - Drivername=mysql, |# P+ _/ u4 q3 B+ `
- Database=test
, e4 {, b# _) \5 v) p' n - Hostname=localhost: r1 ^) E; |+ c
- User_name=testuser
9 T( ~) }& k% ?" n' C - Password=my_password( l* c/ _; u6 x
- GetDriverFunc=getSQLDriverMYSQL0 u# s7 B0 l6 Z' R
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0& F1 S$ w8 F" l( S' Z
- LibraryName=./libsqlmy.so
% ` ~! ~3 A* f5 ^- r$ k - Active=13 c& R$ A9 Z8 j* f) P
- ---example---
4 h0 K& q6 p/ U' q3 M6 c3 ]
* y% [# E L1 ~7 `2 j7 D* H. O- On a windows box, also running the MySQL server locally, it would be:
- X$ A& o& x, W; C1 A - ---example---! ]# C1 _4 o9 G9 Y/ }1 L8 a- Y
- [DBEXPRESS]
( R! r/ I: z+ G+ d. z( o - sqldir=mysql_sql
0 d5 Z. l! y9 R - Drivername=mysql
; I+ J8 O9 p; i8 |' {+ A2 J' f - Database=test6 G) E- ^1 P5 f. |
- Hostname=127.0.0.1
+ @8 \( L' K9 \8 l7 N; l7 @# P2 d - User_name=testuser
3 @, A9 k- u8 h% n - Password=my_password
" R; n0 E5 s1 o* ^. B* s# u - GetDriverFunc=getSQLDriverMYSQL
& L( d$ y0 f5 `. {0 G - VendorLib=libmysql.dll) ]3 Q/ I, ]8 [& Y" b
- LibraryName=dbexpmysql.dll! j' c7 i% [2 K; Z0 C' Y
- Active=1
' ^$ b- f4 @1 m) f+ t - ---example----# T# ?" r, ^4 E% \6 a( g- ` U
- - written 02.03.04 by pwk.linuxfan4 s! j, l+ H: I" |
. j; H; K& J6 K x# z0 u7 O V# I0 b
复制代码 |
|