I don't know of the default server name. Can you please help me because I need to work on our project to connect vb.net with wamp server, and for that to happen, I must know the server name that I will put on the codes. Please, thanks in advance.
The WAMP server doesn't maintain a name. You connect to it via an IP address... do you not know the IP of the machine it's installed on?
If it's on your own computer, you can connect to the Sql server from code by connecting to 127.0.0.1:3306 (default port).
If it's not on your machine, find the ip address of the machine it's running on by going to the command prompt and typing 'ipconfig'.
Then use that IP address and port 3306 (or whatever port you defined, 3306 is just default)
Default access will be via localhost or 127.0.0.1. Might not work (rarely) if it was modified before.
The following should work provided (provided mySQL port is default at 3306) :
Dim connectionString As String = "Driver={MySQL};SERVER=localhost;DATABASE=student;
For more variations, check this out.
Just check connectionstrings.com, one of the best resources out there.
Related
I am running into an issue where I need to provide FQDN anytime I am entering server names in and it really is bothersome. When I log into SSMS using just the host name, I get a "network-related or instance-specific error". However, when I use the FQDN, it works. What do I need to do to be able to just use hostnames on my machine?
I also work on Power BI reports which points to servers that are not FQDN. So when i make edits and publish, it crashes the gateway due to server name inconsistencies.
Please let me know any quick troubleshooting tips or if you need additional information, i'd be more than happy to provide.
It seems that hostname of your server cannot be resolved. In this case, you can create hostname mapping for your SQL server (which will only work when you are connecting to your SQL server from your computer)
Open %WINDIR%\Windows\System32\drivers\etc\hosts file with notepad
at the end of file add your hostname and ip address with the below format
save and close. Now you are able to connect with the given hostname
example
192.168.1.250 sqlserver.local
i have an application that needs database(sql server 2008 r2) through public ip, so that the user can use his application anywhere.
i configured the router for port forwading,
i add the port and sql-browser in the firewall.
and when i try datasource = [publicIp]\SQLEXPRESS,1433 i can only access the server when im in the network..
but cannot access the server when im not in the network..and also cant ping the public ip..
i opened port 1433 already.
what seems to be the problem?
Port 1433 isn't enough. When you're running a different than default instance, it will run on a different port. Usually, SQL browser service would help you find it, but you have to forward all the relevant ports as well, which is quite unwieldy. Instead, try setting the correct port manually in SQL server configuration, and connect with the explicit port.
In my java program, I connect to a mysql database on my server, but I have to go into my cpanel and add my ip address to be able to remotely access it.
Is there a way to allow all connections or add a mac address instead?
Thanks to Rugal, I got it to work.
I used %.%.%.% as the access host to allow any connections and it worked.
I have a Sql Server instance installed on my Azure Virtual Machine. I've changed the port for Sql Server to...let's say 4849. I opened this port in Windows Firewall and established the endpoint for both TCP and UDP. I check to see if the port is open via http://www.yougetsignal.com/tools/open-ports/ and it's still closed. What am I missing here?
I'm utilizing SQL Server 2012 SP1 on Windows Server 2012.
Thanks in advance!
Not sure how this service checks for opened ports, but if it doing so by sending "ping" command then it may not work. You would need to do additional stuff for that to work. Please check this blog post for more details: http://blogs.biztalk360.com/windows-azure-virtual-machines-virtual-network-may-not-ping-automatically/.
Does this need to be accessible to the outside world? If so, you will need to open it on your firewall and have the firewall forward traffic on that port to your VM.
Also, you might need to check the config of your VM network adapter, if it's using NAT to share the hosts IP address, you might encounter problems, depending on what host you're using, I find that bridged mode works best so that the VM can use it's own IP address on the network.
I think you can also try this one to enable PING command for Azure virtual machine: http://blogs.biztalk360.com/windows-azure-virtual-machines-virtual-network-may-not-ping-automatically/
Hi all I installed SQL Server and from the localhost it works in my project however when I tried to access database from another computer It gives 0x80131904 exception. I couldn't find the reason what might be the solution?
Have you tried connecting by specifying the port number as well? Something like,
YourServerName,1433
YourServerName\YourInstanceName,1433
I have assumed it is on the default port. If not change 1433 with appropriate port number and try it.
Make sure your server is enabled for tcp/ip connections and that your computer does not block the SQL server port. Also make sure that you enable the proper authentication methods, ie SQL server auth, integrated, etc.