|
|
麻烦翻译一下,下面这段文章:xhan 4 \1 ? f8 y6 J) Y ^
, B: W5 b7 E+ ^4 c- , h* h6 k2 J8 y0 m- E
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######4 Q+ [# Q6 `4 D$ a' F
- : r! a6 m4 i) c3 |% c. F
- ### What we need ###
# C3 y* B6 p* I5 s5 W* f; W - Naturally, we will need a MySQL server to store the data for us, this document
' O( ?1 w* ?9 N3 J2 Y9 ] - will not explain how this can be done - there are documents out there for the 9 q6 n$ P& B0 @7 ?; l! p$ S/ g
- interested. The requirements include a (empty) database for TeamSpeak to use
1 J$ d- j$ t3 ` - and a user account (username + password) that has the permissions to do stuff
- h; P( Z! I: {$ ^; g( a! B( ? - with the database. Additionally, you will need a vendor library installed on the* _' N3 o' H9 `; h8 H' |
- local machine, this came with my MySQL install.5 K' s! T' I. I; I/ `1 K4 ^
- These instructions will not tell you how you might transfer your data from the
# u# R7 c: M6 t) c# l6 n - SQLite database to the MySQL database, we start with a clean and empty MySQL
, f' f4 O- v+ |( Z4 t) e: u( u# X F - database.- f( D6 p- c* ?5 d# u' i; v
- Some users have reported ways to import a SQLite database into MySQL, but at
9 v; P6 A$ Z. V9 N - the time of writing, there are still too many issues - check the current status
' G* R Y& E' W - in the TeamSpeak forums if you are interested.
% V( S2 A& D9 {" G% K, v - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
% h' s8 i6 q6 o# j! @ - Borland was used. This driver can only interface with the client library that
! T3 y8 Q& R- J - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
$ R: S5 H8 d, ^) x6 a1 q - client library - basically all you have to do is to use a 3.x client library as % R& S/ P$ T% N0 H; O, G
- "VendorLib" and a 4.x database to connect to.
* C0 K2 _5 g$ ~. P- ?5 T0 I: `# e - If you need more info about dbExpress, you can contact Borland.
! k. ^) b' @, b3 L8 ]+ X" C - ) K$ u Q# H# [! f6 q
- ### Doing the work ###' ~# o3 w" E7 j, y0 _; N
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all, R1 F5 I! ]- i; ]8 M" n
- the perquisites right, just open your server.ini file, and add this section at5 [! x+ g5 _3 [2 R' k
- the end:6 ?" R: C! D2 ]0 p/ E
- ---cut here---
+ i2 C! v3 r1 n% w- @/ D' ` - [DBEXPRESS]0 T/ H. ?: a3 H! d; \7 O8 z9 I
- sqldir=mysql_sql8 f Z. u; P/ |7 j
- Drivername=mysql. c7 K" A; t+ H0 K
- Database=Your_Database_Name_Here5 O7 Y$ g5 R: Y9 F
- Hostname=The_PC_the_MySQL-Server_is_on
" o @1 b9 p, J7 E - User_name=User_name_on_the_MySQL-Server
' g' X9 n5 {$ e5 z' U - Password=Password_to_go_with_above_user_name
6 |% A! o' M! P3 W9 ? - GetDriverFunc=getSQLDriverMYSQL8 h& L9 x0 }$ S
- VendorLib=path_pointing_at_your_mysql_vendor_lib
' v6 T, d0 V0 ]# c! `' y }3 t* ^ - LibraryName=path_to_libsqlmy_libary
G' ?& h: F5 p! C$ A - Active=1
' z% A, t9 f2 w: A4 h, {8 K - ---cut here---& Q, V- R; w. ?+ R4 M( G
- In my environment (a linux box with a MySQL server running locally) I have:
8 c1 [6 _$ {2 ?; T) o - ---example---
& c7 r+ Z/ {- r X& f: w5 }. y/ f - [DBEXPRESS]+ z. v- [# D/ t! U3 z
- sqldir=mysql_sql
, C' ]* }( Y& L7 v8 L3 P3 m - Drivername=mysql# [$ p$ m% f) e# h
- Database=test0 u: Q$ g: K/ [3 E! O) w
- Hostname=localhost
/ E& L, R5 g5 l6 Z( o - User_name=testuser
( U+ S, J% u9 F! ^ - Password=my_password
# Z; R% Q( D. Z - GetDriverFunc=getSQLDriverMYSQL
7 l# B9 x; {3 H0 b: k1 Q - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
' X9 O, Z2 {" V - LibraryName=./libsqlmy.so9 T* y: b. c. F
- Active=1
: m* M4 Q x( ?) m+ U" F - ---example---
5 K) X! @) g) T) ^+ A
% W5 j j2 M C! I0 x' B* j- On a windows box, also running the MySQL server locally, it would be:
8 ]( t* g- w; ]* U - ---example---) h: u0 E _( D0 W
- [DBEXPRESS]4 ^+ O& v M7 r% o- A
- sqldir=mysql_sql
! u% A7 L! }) m t - Drivername=mysql
* M. h4 a+ U6 l - Database=test' q" N: E$ ^6 m, S8 y( F
- Hostname=127.0.0.1$ h- S4 s( j" B3 f: f* P
- User_name=testuser
! C& M2 s- r" _0 w$ o - Password=my_password# I( U" a' S- R% h
- GetDriverFunc=getSQLDriverMYSQL4 T( r4 C) F" Q1 Q! N2 B/ g
- VendorLib=libmysql.dll
& R( t% G5 n- F s - LibraryName=dbexpmysql.dll
5 N3 @0 q: m$ ~- T3 X - Active=1$ [* x7 _; d% Z6 e+ ]4 ~
- ---example----
0 }0 f- ^1 {; w7 P; e8 q - - written 02.03.04 by pwk.linuxfan1 R5 l# G5 A( N, F5 f
- ; ?3 m/ e( Q3 |4 k6 I
复制代码 |
|