Centos + php + unixodbc + FreeTDS configuration

Source: Internet
Author: User
Centos + php + unixodbc + FreeTDS configure MSSQL for php on linux and use unixodbc + FreeTDS

Installation steps:

Install unixODBC

Yum install unixODBC
Yum install unixODBC-devel

Install FreeTDS


./Configure -- with-tdsver = 8.0 -- prefix =/usr/local/freetds -- enable-msdblib -- with-gnu-ld -- enable-shared -- enable-static

Make

Make install

Vi/usr/local/freetds/etc/freetds. conf

[PPCSERVER]
Host = 192.168.2.120
Port = 1433
Tds version = 8.0
Client charset = UTF-8

Test connection

/Usr/local/freetds/bin/tsql-s ppcmssql-U 7230-P 7230


Vi/etc/odbcinst. ini

[FREETDS]
Description = ODBC of FreeTDS for ms SQL 2000
Driver =/usr/local/freetds/lib/libtdsodbc. so
Setup =/usr/local/freetds/lib/libtds. so
FileUsage = 1


Vi/etc/odbc. ini

[ODBC Data Sources]
Ppc = ppc SQL server

[PPCMSSQL]
Driver = FREETDS
Description = ppc SQL server
Trace = No
Servername = PPCSERVER
Databases = 7230

Test connection

Isql-v PPCMSSQL 7230 7230

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.