Sequel Pro is a fast, easy-to-use Mac database management application for working. You direct access to your MySQL Databases on local and remote servers. SQL stands for Structured Query Language and is the mechanism by which client applications are able to communicate requests to a server that manages the data for the client. Custom SQL Code Snippets Rather than limiting you to snippets we think you'll find useful, we're allowing you to create your own snippets. For example, do you find yourself running a specific query early and often? Turn it into a snippet instead pf copying instead of copying and pasting from an external file. Snippets are templates that you can use to help you build longer queries. Because TeamSQL knows which database you're working in, you'll get the right snippet at the right time(if you work in multiple types of databases, you'll know how easy it is to get similar-but-different syntaxes mixed up). Now, you're less likely to run a query that works for MySQL against Oracle, Microsoft SQL Server, Amazon Redshift, PostgreSQL or Redis. ![]() I recently had to set up a MS SQL database on my Mac for a client project, if you ever have to do this here is a mini tutorial. In this post I am using VMWare Fusion for virtualisation, but you could use something else and the instructions should be mostly portable. Get a Windows VM Go to and download a VM (Virtual Machine) for your Mac. I will be using Windows 7 (the version of IE doesn't matter). Install the virtual machine and log in. ![]() Get MS SQL Express with tools As you download the Windows VM you can also download the free version or MS SQL. At the time of writing the tiny_tds gem - the gem needed to access MS SQL - only supports MS SQL up to version 2012. So version 2014 won't work. Go to and download MS SQL Express 2012, make sure to get the version with tools (named something like ENU x86 SQLEXPRWT x86ENU.exe). Install MS SQL Express If you downloaded MS SQL Express on your Mac, you will need to make it accessible to your Windows VM. If you are using Fusion you can simply drag and drop the installer to Windows. Run the installer and just install the default components. Accept the defaults in all other screens. Create a DB for testing In Windows, open SQL Server Management Studio. Connect using the provided defaults, then: • Right click on Databases • Click on New Database • Add a name e.g. Test • Click OK Enable SQL Authentication Still in SQL Server Management Studio: • Right click on the root of the tree e.g. IE11WIN7 SQEXPRESS • Select Properties • Select Security • Enable SQL Server and Windows Authentication mode • Click OK Create a database user In Management Studio: • Click on Security on the tree • Right click on Logins • Select New Login • Add a use e.g. Dbuser • Select SQL Server authentication • Add a password Set user mappings In the same screen: • Click on User Mapping • Check the previously created DB e.g. Test • Click the. Button on the right • In the pop up window, select Browse • Check dbo and OK • Select OK again • Select db_owner on the bottom • Finally click OK You can then close Management Studio. Enable TCP in Express In Windows, open SQL Server Configuration Manager. Then: • Click on SQL Server Network Configuration • Click on Protocols for SQLEXPRESS • Double click on TCP/IP on the right. • Change Enabled to Yes • Click on IP Addresses • Scroll down all the way to IPAll • Set the TCP Port e.g. 1433 • Click OK Restart SQL (in the same window): • Click on SQL Server Services • Right click on SQL Server on the right and select Restart We can now close SQL Server Configuration Manager. Disable the Windows Firewall In Windows: • Go to the Control Panel • Search for firewall and open the Windows Firewall settings • Click on Turn Windows Firewall on or off on the left • On the Home network settings, click on Turn off Windows Firewall • Click OK and close the control panel Find the IP address for the VM In Windows: • Click on the network icon on the bottom bar • Click on Open Network and Sharing Center • Click on the link on Connections e.g. Local Area Connection • Click on Details • Take note of the IPv4 Address e.g.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2019
Categories |