Sql-server – My php site cannot connect to SQL Database – SqlExpress2012

sql serversql-server-2008sql-server-2008-r2

Im quite new to SQL Express 2012, but have just installed it on my server 2008 r2.
Im trying to install a CMS called joomla, which I' ve done many times before both on SQL community server and hosted solutions.

I can connect to sql server management studio, using windows authetication and SQL authentication with created users. BUT during Joomla installation it cannot connect to my database using the user I created?

My sqlexpress service is running, and I've restarted the service and computer….

What I've tried:
disabling windows 2008 r2 firewall
opening port 1433
enabeling all named pipes,shared memory and tcp/ip in configuration manager

Best Answer

Make sure SQL Server Express is configured to accept remote connections, and verify the port number in use. See: http://blogs.msdn.com/b/sqlexpress/archive/2005/05/05/415084.aspx

Also, make sure SQL Express is configured to allow SQL Server authentication (not just Windows authentication), and that the SQL Server account you're logging in with owns or has the necessary access to the database you're connecting to.

I got my site to connect to SQL Server, but I had to specify "localhost" as the host, despite the fact that I'm using a non-standard port # for SQL Server. When I included the port number as "localhost:####" it refused to connect, but when I removed it, it connected. So I have no idea how it was able to connect without the port number, because I double checked my port numbers in SQL Server Configuration under TCP/IP settings, and every single connection was using the non-standard port (even restarted the service to be sure).