I've been trying to connect to my database with no success. From XAMPP or HeidiSQL I can connect to my database (Oracle MySQL Server 5.5) using IP 127.0.0.1 or just localhost, but I can't figure out how can I connect to this DB from Vagrant. Any suggestions?
So with some help I managed to connect. All I had to do, was to connect to Vagrant IP ending on 1 (my vagrant IP is 172.17.2.3 so I had to connect to 172.17.2.1) and also had to create another DB user without IP restriction.
Related
I've forwarded the ports, which SQL Server is using, from my local machine to the machine where SQL Server is running
netsh interface portproxy add v4tov4 listenaddress=127.0.0.1 listenport=1433 connectaddress=192.168.1.110 connectport=1433
netsh interface portproxy add v4tov4 listenaddress=127.0.0.1 listenport=1434 connectaddress=192.168.1.110 connectport=1434
Then I am using Microsoft SQL Server Management Studio to connect to the Database with the IP Adress 192.168.1.110, which is working fine.
Trying to connect to localhost, or localhost,1433 (mind the comma, instead the colon), does not work.
Use 127.0.0.1 instead of localhost.
I am trying to connect Excel to my companies database but am running into problems because we use an SSH tunnel. The SSH tunnel connects to Nexcess which is where our servers are stored.
Has anyone else encountered this problem?
Any help is appreciated. Thanks!
Use putty, set up your SSH link to the server.
Under auth select 'allow agent forwarding'
In tunnels set source port to 3306 and then put the domain of your mysql server in the destination followed by :3306 (update this port number if your mysql server is on a different port obviously, but keep the local port the same)
Connect
In mysql workbench, add a new connection: localhost, port 3306, user / pass etc
Then from excel, connect away
is there any way to connect to a remote database by using SQLyog? I have the ip address, user name and password of the database. However, I have 'Error 2203 - Can't connect to MySQL server on '[myIpAddress]' (10060)'` whenever I test connection in SQLyog.
It means there is no direct access to database ..
You can check by telnet to port 3306 from destination address.
You can connect to MySQL remotely using SSH, if the remote MySQL connection is not enabled. Please check the following screenshots:
So, I have two PC (PC-A and PC-B) that I've set up with Windows 7 and SQL Server 2012. I setup a port forwarding for PC-A so I can access it remotely.
I can connect to SQL Server on PC-A from PC-B (using SQL Server Management Studio) by entering the PC-A ip address, but unable to connect if I'm using the server name of SQL Server on the PC-A.
Any ideas to make it works?
Try using tcp:[Server Name],1433
1433 is the default port numberused by sql server
Found a workaround to this problem. I install hamachi on both PCs, register them to a same hamachi network. And now I can connect using the server name.
Thanks all for the suggestions.
I restored a MSSQL backup to SQL Server Express in a Windows 7 virtual machine under Virtualbox. I am attempting to connect to this SQL Server instance from the host (Mac OS) using a user inside the imported database that has credentials to connect. The virtual machine is configured to use a Host-Only adapter. SQL Server express is running inside the VM at WIN7VM/SQLEXPRESS, port 1433.
I am able to connect to Apache in the VM on port 8080 from the Mac host without a problem. I can also telnet into the SQL server at port 1433 from the Mac host, using the host-only IP address (192.168.56.101).
What I am unable to do is connect to SQL server from Navicat in MacOS, or remotely using PHP. Here is what I have tried:
Disabled Windows Firewall
Configured SQL server port setting to use 1433
Enabled SQL server authentication
Enabled TCP/IP in SQL Server
Enabled remote connections to SQL server
I am trying to connect with this info:
Host/IP address: 192.168.56.101 OR 192.168.56.101\SQLEXPRESS (have tried both)
Port: 1433
Database: MyDatabase
Authentication type: Basic
Username: username
Password: password
What am I missing here to be able to remotely connect without any issues? Thanks in advance!
I believe you need to use a Bridged Adapter - rather than a Host-Only adapter. A Host-Only adapter does not use the physical NIC - so that is probably the issue here. I have encountered the same issue before.
Using a Bridged Network connection on both the Host and the Guest - will mean that both are on the same network. Assuming the firewall are not blocking port 1433, you should be able to connect without issue.
It turned out to not be a Virtualbox issue, but a SQL Server authentication issue.
The user I was trying to connect with had access to a database, but did not have a corresponding SQL Server Login.
MSDN - Managing Logins, Users, and Schemas How-to Topics