Use FreeTDS in Linux to access the Microsoft SQL Server database
Download freetds http://www.freetds.org/
With PHP's support for MSSQL:
./Configure -- with-mssql =/usr/local/freetds
If:
Configure: error: Directory/usr/local/freetds is not a
Because the company's environment is under Linux, so want to build on their own machines to imitate Linux environment
Environment for Linux +mssql+php +nginx+freetds
So I thought of Cygwin.
Go to http://www.cygwin.com download setup.exe
Then install,
About the installation deployment of FreeTDS pymssqlFirst, Installation:(freetds-0.91 pymssql 2.0.1)If you want to connect Mysqlsever on a Linux machine1. Need to install FreeTDS./configureMake && make installTestTsql-c viewing the installed
I mainly refer to the official articles Some points to be aware of 1, compile FreeTDS (need to download), please add--prefix= installation directory--with-tdsver=7.1//This must be over 7.0 from official documents
1 OverviewConnecting to MSSQL in Linux is very painful because Microsoft did not provide any interfaces to developers. Fortunately, MSSQL is derived from Sybase, freetds is the underlying driver of the database. It is very convenient to use the
Today a project that needs to connect to SQL Server database, get data, follow the previous practice, install LNMP, load up after installing FreeTDS, and then add the MSSQL module in standalone PHP,./configure make && Make install and then add the
1. Install unixodbc
Use yum for installation:
Linux uses a CD to build a local Yum Server
Http://blog.csdn.net/tianlesoftware/article/details/7302358
[Root @ Rac1 MNT] # Yum install unixodbc
[Root @ Rac1 MNT] # Yum install unixodbc-devel
Run
SQLServerFreeTDS also provides RPM packages. related resources can be found on its official website: www.freetds.org. The installation path can be found through the rpm command. The default location of the configuration file is etcfreetds. conf,
The following error occurs when using tsql to connect to MSSQL.
Tsql-H 192.168.1.100-P 1433-U sa
Password: SA
Locale is "en_US.UTF-8"
Locale charset is "UTF-8"
Using default charset "UTF-8"
Error 20017 (severity 9 ):
Unexpected EOF from the
FreeTDS also provides RPM packages. Related resources can be found on its official website:Find in http://www.freetds.org.The installation path can be found through the rpm command.The default configuration file is/etc/freetds. conf.A detailed
Install freetds in centos6.4 to make php support mssql. 1) open www.freetds.org, go to www.freetds.orgsoftware.html page. download the FreeTDS-stable.tgz.3, because the mssql extension was not compiled before. So next
1. open logging.
FreeTDS also provides RPM packages, and related resources are available on its official website:
Found in the http://www.freetds.org.
The installation path can be detected by the RPM command.
The default location for the configuration file
1. Open the http://www.freetds.org/and go to the http://www.freetds.org/software.html page. Download the freetds-stable.tgz.3. Since the extension of MSSQL has not been compiled in. So the next step is to compile it dynamically. We use phpize here
Linux version: 64-bit CentOS 6.4Nginx Version: nginx1.8.0PHP Version: php5.5.28SQL Server version: 2008FreeTDS version: 0.95For Linux environment Installation nginx+php reference Linux environment Nginx installation and debugging as well as PHP
Linux version: 64-bit CentOS 6.4Nginx Version: nginx1.8.0PHP Version: php5.5.28SQL Server version: 2008FreeTDS version: 0.95For Linux environment Installation nginx+php reference Linux environment Nginx installation and debugging as well as PHP
EN "" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
Brief introduction to the configuration of PHP connection to MSSQLServer in Linux (II. FreeTDS library) _ PHP _ China Network Management Alliance bitsCN.com
After changing my work, I have been busy with the LINUX system architecture, and have gone through the pains of never understanding too much to be familiar with others. In the course of work, Baidu has always been the preferred search engine. But
Preface:After changing my work, I have been busy with the LINUX system architecture, and I have never been too familiar with myself. In the course of work, Baidu has always been the preferred search engine. But later, I had to and eventually used
Install FreeTDS
FreeTDS is the Linux/unix next set of software development kits for implementing Microsoft SQL Server and Sybase's tabular DataStream Protocol protocol. With FreeTDS, you can connect SQL Server and Sybase databases under Linux/unix.
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.