|
麻烦翻译一下,下面这段文章:xhan
0 c6 J% g0 h7 b- s& Q7 W& J4 E, [7 Z9 ?3 X! ]" m
- 6 d6 \/ W) y7 S! N( h5 t/ O
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
+ b6 |8 a! l5 z6 i - ; `8 D4 Z! Q: N
- ### What we need ###
# |. a7 M, h' B/ [5 ` - Naturally, we will need a MySQL server to store the data for us, this document
4 j8 n- I& W# H ^+ \* z" L n - will not explain how this can be done - there are documents out there for the % Q2 e; @7 |# x, g; K( z
- interested. The requirements include a (empty) database for TeamSpeak to use' L: Q# M: d7 G0 I
- and a user account (username + password) that has the permissions to do stuff
* T- u( h, X8 O8 }4 Z - with the database. Additionally, you will need a vendor library installed on the
: k9 h/ M/ n, e - local machine, this came with my MySQL install.
7 W& B [8 @; q {* K+ U3 c. U - These instructions will not tell you how you might transfer your data from the
8 {( V0 c4 T% } `/ r7 s t8 N. n - SQLite database to the MySQL database, we start with a clean and empty MySQL
% I U5 n' U" A5 Q z - database.
8 R% u8 k7 U: d& H% x+ Z - Some users have reported ways to import a SQLite database into MySQL, but at
; |6 o: f8 L1 L9 D - the time of writing, there are still too many issues - check the current status; @# T9 k, ^( U" T3 B& T$ [% {- |7 f9 ^# `* ?
- in the TeamSpeak forums if you are interested.
! y) d' ]( w7 v# r# X( H9 O* r( C - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
. i5 ~' R B$ k' ~- A7 Y; X - Borland was used. This driver can only interface with the client library that , N& f* H# ?. Y+ @* _0 W
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this# [! m- q. Y* H* E( k& ?
- client library - basically all you have to do is to use a 3.x client library as
* _' i' \% P$ w9 ~ - "VendorLib" and a 4.x database to connect to. P9 Y& o f5 v; @# z) e
- If you need more info about dbExpress, you can contact Borland.
. Z4 H% @( B# M5 X/ B/ u2 `
3 E% C# Y2 ]. W0 e- ### Doing the work ###
! @/ Z2 I9 \2 l$ W8 Y - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all* M5 m/ K! ]3 x& s7 E l8 }# c1 K
- the perquisites right, just open your server.ini file, and add this section at. W+ O3 d, W T0 n0 [/ z T( j
- the end:
" V( ~. z% E8 Y$ s! X - ---cut here---
( W6 j; P1 L) t - [DBEXPRESS]% Y6 n a/ b2 a
- sqldir=mysql_sql' B+ a3 Z# u( i& t
- Drivername=mysql; i2 ]/ K, V2 `" x
- Database=Your_Database_Name_Here& B' H+ V5 ~+ j, m D
- Hostname=The_PC_the_MySQL-Server_is_on
) d8 F# t; k* j7 N - User_name=User_name_on_the_MySQL-Server
' P- t& C/ g8 {- Y - Password=Password_to_go_with_above_user_name
; C. \1 t1 v9 a - GetDriverFunc=getSQLDriverMYSQL+ z: Z+ {/ f# v6 u3 U( ~4 F) I
- VendorLib=path_pointing_at_your_mysql_vendor_lib
) |( C# f4 L( e. f - LibraryName=path_to_libsqlmy_libary$ \/ v ~& t0 {9 e( I+ O2 ]
- Active=1. j7 k0 H5 _, ^
- ---cut here--- d4 q3 X) E4 d! V6 m9 s% K
- In my environment (a linux box with a MySQL server running locally) I have:
+ F3 Q+ f" R5 L& a - ---example---
; M/ Y! U% `/ M; g% y1 q- r( V" E0 d - [DBEXPRESS]; @! W; t4 }1 h4 ]' l. G3 c
- sqldir=mysql_sql
8 o' w) l/ A# s8 R) l5 f# i - Drivername=mysql
, W6 z0 D6 f5 P- f7 K - Database=test
, Q' N4 I- m8 v - Hostname=localhost
2 ]" X1 N* _- _, M! Z% Z - User_name=testuser0 A D0 O5 V7 B# e
- Password=my_password0 }' v. o- h6 p& I, Z F" L
- GetDriverFunc=getSQLDriverMYSQL
+ ]" W. E" r% O& | - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0. N( U& e- W! [( t1 Y2 A( {
- LibraryName=./libsqlmy.so/ g; `( R6 {$ i8 M
- Active=1; M0 I3 o" S" |( t6 J
- ---example---
: n6 y$ N# T; N+ I2 @' U
: x3 z4 \6 l9 H& m) A- On a windows box, also running the MySQL server locally, it would be:
( A# t' w$ |: j" n% ~! c - ---example---* J& w! n4 M/ d( n6 n1 d
- [DBEXPRESS]" x3 Q9 x x K7 T* G, i6 t
- sqldir=mysql_sql! P; P6 f+ |* C8 g" X" F, {+ l1 m
- Drivername=mysql
+ Q/ v, C7 S% f# }# \ - Database=test
/ ~8 v5 \9 l2 m+ [: b8 H8 g" g1 Z - Hostname=127.0.0.1, ~ \. i# k& }" R6 M) b
- User_name=testuser
6 }4 G/ A S4 h+ m) ] - Password=my_password# w- w2 C3 e2 O) l% D8 w' Y- J- s
- GetDriverFunc=getSQLDriverMYSQL# W4 {" @8 S6 N5 t) W9 w% I, b$ S8 y
- VendorLib=libmysql.dll
) I; |' O9 c, m+ \- n1 a {+ h - LibraryName=dbexpmysql.dll# ]0 b* Y/ S% `$ I A& M
- Active=12 c! ^6 d L4 l; o8 n: i! O7 L
- ---example----
: O! p$ l: n2 F1 i2 J: | - - written 02.03.04 by pwk.linuxfan
7 U$ R- x2 L, z7 {' O' ]; P" d
' [" P) T! `- t0 Y
复制代码 |
|