Replacing old ip address in ubuntu server database with new ip address - mysql

I want to update my old IP address from MySQL with my new IP address. How can I do this?
Since the IP address on the server is renewed, I want to recognize a new IP address to the database.
Ubuntu-16
Nginx

Related

Is there a way to "mask" an smtp server?

I am using a service for smtp relay and they give me a smtp server url (mail.theirdomain).. I wanted to ask if there is any way of "masking" this for example with some dns records to make the mail.theirdomain, mail.mydomain?
Sure, you can do a DNS lookup of mail.theirdomain.com and see what IP address this hostname points to (e.g. x.x.x.x). Then, you can create a hostname mail.mydomain.com, and point this hostname to the same IP address (x.x.x.x).
But, if you do a reverse DNS lookup (i.e. PTR lookup) of x.x.x.x, it will likely point to mail.theirdomain.com (not mail.mydomain.com), and you can't change this, because you do not have control of x.x.x.x.
Also, if you open an SMTP connection to mail.mydomain.com, it will likely show mail.theirdomain.com in the SMTP banner that the server responds with after a client connects - and this is not something that you can change either.

How to create a user that isn't bound my ip address in mysql?

Currently I am creating a user for mysql (on ec2) like this:
grant all privileges on .... to ...#1.2.3.4 ..
The problem is, when my ec2 instance is stopped and restarted, it has a new ip address and I have to delete and create the user again.
Is there a way to not have to bind it to an ip address? This user will be used on my web server to connect to another my database server.
THe wildcard for domain is to 'user'#"%"
If you want to avoid getting a new ip on every reboot, why not just get an elastic ip that won't change?
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html

MySQL database hostname

I have created a MySQL database and a table via cPanel on a web server of mine. My question is this: How can I access this Database and Table from a Visual Basic.net application?
What do I use as the host address? The http address to the web server is http://www.canninginc.co.nz
If you are trying to connect to MySQL from a remote location (for example from your computer), please use these instructions:
Use the IP address of your hosting account as your MySQL hostname.
Your IP address can by found on the left hand column when you login
to cPanel.
Please add your computer IP address to the cPanel -> Remote MySQL section. You can check the computer IP address at http://www.tracemyip.org/
Use either the MYSQL username / password that was created in cPanel -> MYSQL section, or your cPanel login details to connect to the database

Not able to connect SQL Server 2008 Remotely

I have setup SQL Server 2008 Developer Edition. It automatically contains my system name which is sipl006 as Servername. My system IP is 172.27.28.44. My issue is it is not connecting remotely with IP address because my database is also accessed by different domain and I need IP address to authenticate the application with my database. I have googled about this but no helps.
servername : sipl006
Authentication : Sql server authentication
username : sa
password : blablabla
I have already checked the below details
1. SIPL006 >> properties >> connection >> Allowed Remote connections.
2. Sql server configuration Manager >> enable named pipes, TCP/IP, via etc.
3. Confirm default port 1433.
4. Firewall is already off.
I have only MSSQLServer instance not SQLExpress.
I have observe the in View connection properties that instance name field is blank.
so I need to access the database with IP not system name because different domain not recognize system name. It only recognize only IP address.
I need the below details for connectivity.
servername : 172.27.28.44 or 172.27.28.44\SQLEXPRESS
username : sa
password : blablabla
Please resolve my issue.
Thanks in advance.
Make sure the client connecting to your database server has 1433 outbound from their location. Also like MicSim says, see if you can connect from a client that you know has 1433 outbound open.
Also if you are trying \SQLEXPRESS you may want to verify UDP 1434 and SQL Browser service and/or verify that \SQLEXPRESS is not using a port other than 1433.

sqldeveloper and cpanel

i can't access my website mysql db from sqldeveloper.
in cpanel there is an option (Remote Database Access Hosts) which allows one to add IP addresses that can access the db. I have entered my ip address and i have used the % wildcard.
so for instance if my ip address was 12.34.56.78, i have entered my ip address as:
1 - 12.34.56.78
2 - 12.34.56.%
3 - 12.%.%.%
in sqldeveloper i have downloaded and added the mysql third party jdbc driver .jar file (mysql-connector-java-5.1.13-bin.jar).
i have the right user name, password, hostname and port.
so, if my website domain was called www.mysite.com and my username was user, the username i would use in sqldeveloper would be mysite_user.
and the hostname would be www.mysite.com.
the port i am told via cpanel is 3307.
i bow to any superior knowledge if my assumptions are incorrect.
any help would be appreciated
-- edit --
oh yeah, the error message I get (pretty important!) in sqldeveloper is
Status : Failure - Test failed: Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
-- end edit --
I do the same via cPanel but after i connect to my host via SqlYog community edition...
Uniqe differce is the port, i use the standard 3306 port instead a custom port.
Try if it connect: http://code.google.com/p/sqlyog/
It turns out that i did need to use port 3306 but more importantly, my web host needed to make a change on their firewall.
i managed to connect using mysite.com, username, password and port 3306.
thanks #Achilleterzo for your help in the meantime