1
Defkon
Change mysql server IP
  • 2005/2/11 5:28

  • Defkon

  • Just popping in

  • Posts: 16

  • Since: 2005/1/5 2


I've searched around the forums and really haven't found an answer to this question, probably because I shouldn't be doing it like this. When I installed xoops, I used the ip I was given from the DHCP server to let XOOPS connect to MySQL (because localhost didn't work). My IP has since changed. I know, I know. Stupid right? Well how can I change the pointer ip to mysql? And since localhost didn't work and the IP did, why is that? Any ideas on how to get localhost working for mysql?

-Def

2
m0nty
Re: Change mysql server IP
  • 2005/2/11 6:01

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


1st of all are we talking about MySQL being on your home pc or network or on a hosted server?

you need to set privileges and give the user permission for each host (localhost) or (%) for anyhost (it's unwise to use % tho.. you could also use your actual computer name on the network or if you have it instralled on your home pc..

otherwise you need to find the MySQL servers url which it usually gives when accessing via phpmyadmin..

a domain name will work ie. mysql.domain.com if it's on aa hosted server..

3
trumpetboy82
Re: Change mysql server IP

If MySQL is located on the same computer as Xoops, you could try 127.0.0.1

4
Defkon
Re: Change mysql server IP
  • 2005/2/11 19:35

  • Defkon

  • Just popping in

  • Posts: 16

  • Since: 2005/1/5 2


Okay I'll try that; but where can I change it without reinstalling?

5
DonXoop
Re: Change mysql server IP

/mainfile.php

Make a backup copy of it. Edit all the primary details in that file. You'll be needing it again. I know the next question....

6
Defkon
Re: Change mysql server IP
  • 2005/2/12 0:17

  • Defkon

  • Just popping in

  • Posts: 16

  • Since: 2005/1/5 2


how to externally update it so it uses the new mainfile.php? :) Because I can't get to anywhere still.. so I assume the database needs to be updated :) And since I can't get to admin.php... I went into it like "no, I got it now" ..except, I don't.

-Def

7
Defkon
Re: Change mysql server IP
  • 2005/2/12 0:22

  • Defkon

  • Just popping in

  • Posts: 16

  • Since: 2005/1/5 2


Ahhh! Nope, that wasn't the question. The question is; since now XOOPS points to 127.0.0.1 it's unreachable via internet.. It just says 'connecting to 127.0.0.1'.. so.. wtf is that? :)

8
jdseymour
Re: Change mysql server IP

Firstly, is MySQL server on your local computer?

Secondly can you ping localhost or 127.0.0.1? they both mean the same thing.

Are you running any software firewall that may disable loopback addresses?

9
DonXoop
Re: Change mysql server IP

Back to the basics. In mainfile.php are you talking about the line:

define('XOOPS_URL', 'xxxxx');

or

define('XOOPS_DB_HOST', 'xxxx');

If the MySQL server is on the same box as the web server then:

define('XOOPS_DB_HOST', 'localhost');

or a dumb Windose box can be:

define('XOOPS_DB_HOST', '127.0.0.1');

localhost/127.0.0.1 is the same thing.
The other line define('XOOPS_URL', 'xxxxx'); will contain the IP or hostname that other computers (browsers) need to use to get to the webserver server.

Login

Who's Online

135 user(s) are online (85 user(s) are browsing Support Forums)


Members: 0


Guests: 135


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits