Static IP

Alles, was MariaDB und MySQL betrifft, kann hier besprochen werden.

Static IP

Postby setman » 15. December 2011 03:20

Hi,

Is there a way to setup a Static IP Address in mysql database?
I am trying to connect with our website that we have hosted a Godaddy
setman
 
Posts: 14
Joined: 22. October 2011 18:13
Operating System: Windows Server 2008 R2

Re: Which host setting?

Postby setman » 18. December 2011 03:54

The only other thing would be what I would put in my program at go daddy that will let me connect
This is part of the login other than database and password

## settings for the echelon database
$hostname_wwwvalidate = "myIP:3306"; (Would I just use this?) or (database name @myIP:3306)
Last edited by Sharley on 18. December 2011 05:54, edited 1 time in total.
Reason: I have hidden your IP for your security on an open forum.
setman
 
Posts: 14
Joined: 22. October 2011 18:13
Operating System: Windows Server 2008 R2

Re: Static IP

Postby Sharley » 18. December 2011 05:41

I don't know what this is wwwval***** but if it an actual domain name then you should edit your post and replace it with wwwexample.

I would try databasename@yourIP:3306 but I have not used GoDaddy for databases so I have no way of knowing what the configuration settings are.

If you have something similar to these bellow config settings then see if adding just the yourIP:3306 in the Host bit will do the trick

These are usually all of the requirements needed to connect to a remote database:
Host name = (use the server IP address)
Database name = (remote databasename)
Database username = (remote database username)
Database password = (whatever you picked)
MySQL Connection Port = 3306
TCP or UDP (either is fine if there is a setting for this).
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Static IP

Postby setman » 18. December 2011 15:52

This is the line that you were talking about, these are default
Code: Select all
## settings for the echelon database
$hostname_wwwvalidate = "localhost";
$database_wwwvalidate = "echelon";
$username_wwwvalidate = "echelon";
$password_wwwvalidate = "dbpassword";

When I set it to the right way, as you said, it comes up with this error, the xx's are my ip.

Warning: mysql_pconnect() [function.mysql-pconnect]: Unknown MySQL server host 'b3echelon@xx.xxx.xx.x' (1) in /home/content/85/8586185/html/echelon/Connections/wwwvalidate.php on line 3
Unknown MySQL server host 'b3echelon@xx.xxx.xx.x' (1)

The validate.php file is like this
Code: Select all
1 <?php
2 include_once('inc_config.php');
3 $wwwvalidate = mysql_pconnect($hostname_wwwvalidate, $username_wwwvalidate, $password_wwwvalidate) or die(mysql_error());
4 ?>
setman
 
Posts: 14
Joined: 22. October 2011 18:13
Operating System: Windows Server 2008 R2

Re: Static IP

Postby Sharley » 19. December 2011 00:02

Try:
Code: Select all
$hostname_wwwvalidate = "xxx.xxx.xxx.xxx:3306";
$database_wwwvalidate = "echelon";
$username_wwwvalidate = "echelon";
$password_wwwvalidate = "dbpassword";
as you already have the database name in a separate variable - xxx=your IP.
Do not post passwords in an open forum.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to MariaDB - MySQL

Who is online

Users browsing this forum: No registered users and 6 guests