|
|
麻烦翻译一下,下面这段文章:xhan & O" k) O, B7 Z) \) |4 J5 a# d
- y9 X; y Y/ z7 u# M, N: c-
& C1 D5 u4 c2 h& Q& g! ` - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######5 g3 m# V5 O* n N
: O( n% ^3 ?7 h7 D2 |# h- ### What we need ###
: A. z- m% M# J - Naturally, we will need a MySQL server to store the data for us, this document
* A# p3 Q7 C! H0 r0 C4 I$ m8 v - will not explain how this can be done - there are documents out there for the
9 E0 i8 f) q5 s/ d. W - interested. The requirements include a (empty) database for TeamSpeak to use
( B4 X. o3 r! ]" ~ - and a user account (username + password) that has the permissions to do stuff
4 n) _# c1 g, x# A4 Z7 j8 Y8 e - with the database. Additionally, you will need a vendor library installed on the
, R" j# O n0 n - local machine, this came with my MySQL install.
' E- e" t1 s( W% P3 ~ - These instructions will not tell you how you might transfer your data from the
2 }) M4 P5 v7 t) ~3 x7 J; J - SQLite database to the MySQL database, we start with a clean and empty MySQL
+ d4 D5 d! J6 K+ X4 q1 i5 U8 A - database.% z8 v8 }0 k' Z0 L' [
- Some users have reported ways to import a SQLite database into MySQL, but at
/ e8 l% O8 L9 ]0 ^* P! C - the time of writing, there are still too many issues - check the current status5 {) S9 S3 v r h1 F" F- i
- in the TeamSpeak forums if you are interested.
6 g; H, k7 \7 L x- V - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
4 U6 W7 i3 ~. g. q - Borland was used. This driver can only interface with the client library that
9 a8 W; R2 z) O) ~ - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this- N5 q7 g, ~9 Q2 Q2 L
- client library - basically all you have to do is to use a 3.x client library as
/ o1 p& _" `3 D ` - "VendorLib" and a 4.x database to connect to.0 f9 _3 j3 ]; L1 n0 d* Q9 Z
- If you need more info about dbExpress, you can contact Borland." D: I/ l6 C2 S: [5 {; v# I
/ `5 O1 \% z5 H/ q8 T; I: J" i- ### Doing the work ###
8 R0 k+ B+ E9 _ - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all x9 s# F7 R# v9 G j7 c. Z0 z
- the perquisites right, just open your server.ini file, and add this section at
. `' r8 Y( O. N - the end:
- o3 t3 j0 s( \& X' q8 k6 C - ---cut here---
t8 I9 v" o4 N9 b8 P. G - [DBEXPRESS]
, z2 O5 r8 m/ H. u; V; v/ w2 G - sqldir=mysql_sql
& e' w/ ?- [ Z" I3 g, \ - Drivername=mysql
" p/ O0 i O0 a* R) A - Database=Your_Database_Name_Here
5 {4 i& [4 n* }( t m; o: b* C/ S - Hostname=The_PC_the_MySQL-Server_is_on
, ? P5 ^* T2 m- q; ^ - User_name=User_name_on_the_MySQL-Server
8 P1 @# V( ]8 h7 e - Password=Password_to_go_with_above_user_name/ g1 `9 ]4 L& e, S8 \4 V: ?
- GetDriverFunc=getSQLDriverMYSQL
! ]- V' R& ] L2 w - VendorLib=path_pointing_at_your_mysql_vendor_lib7 T; k- c$ I5 ]: [( d& W
- LibraryName=path_to_libsqlmy_libary0 O7 l3 _# s/ K/ }/ T3 X
- Active=1. Y) v1 P% ?5 g, X
- ---cut here---7 c7 `# H" A) s! o4 s, @) M7 Q
- In my environment (a linux box with a MySQL server running locally) I have:8 g) n: n% M. z- j: p5 K% z
- ---example---4 `. G" R4 J" R0 W
- [DBEXPRESS]; R0 C7 Y+ g: f7 L
- sqldir=mysql_sql0 I$ \- ~! H- x& C
- Drivername=mysql6 _( U5 G1 _2 u( {6 F
- Database=test
5 ]8 x- ]0 m2 i9 i, S. D - Hostname=localhost
1 }; G9 }6 b) n/ o4 q# k - User_name=testuser
& @) {8 ^2 L0 o$ h3 } - Password=my_password# T# x) K8 U- W. a/ q7 p" \0 Q% h
- GetDriverFunc=getSQLDriverMYSQL
0 g I# M5 e$ h0 _3 r( J, E - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.08 c/ d: e9 A; Z, {) A* J' R, A! S: I
- LibraryName=./libsqlmy.so
7 H0 O8 x+ @" l- J& e - Active=1
' u$ s! f% W3 ]4 Q# X - ---example---( Q$ i/ _( L2 K, t) q( X* |
- ) N/ f8 l6 F* p! Y0 v
- On a windows box, also running the MySQL server locally, it would be:1 U' \) c& J4 ~ V" W6 f
- ---example---: A, ^5 s" p# K( L. `
- [DBEXPRESS]
; l$ | ~5 c+ M7 `/ J - sqldir=mysql_sql
1 }; s4 S* H' ?- m - Drivername=mysql) h2 b$ x5 u6 Z& @1 F
- Database=test) H' g, F, x# J% D- g/ b
- Hostname=127.0.0.1
* T! f! q% u, \" n' \2 P# @ - User_name=testuser
* n8 ?% ~/ A! o( r7 A- U - Password=my_password
4 q: e) v" S. P7 Q4 X1 h7 X - GetDriverFunc=getSQLDriverMYSQL9 f9 ?1 n0 E) Z1 f& k8 n, [
- VendorLib=libmysql.dll2 N8 c* @0 V5 f0 B
- LibraryName=dbexpmysql.dll. E; n! Y+ E5 x8 I1 E8 i1 M0 h) H7 f+ R
- Active=1; r) K& f- T2 o' a
- ---example----
$ M0 o4 S2 K5 H% i# @6 V - - written 02.03.04 by pwk.linuxfan
0 H- `- j; T$ R - `: [2 v- g3 _" T, G
复制代码 |
|