Mysql wont let my router connect
When I set up my router to route packets to the address of the MySql server and then run the mysql -h dbhost -u dbuname -p dbname < nuke.sql command I get the following error. What am I doing wrong? I have tried to add users and addresses to the data bases with no results.
#HY000Host '192.168.1.1' is not allowed to connect to this MySQL server |
Are you sure that you have correct permisions?
|
Yes, I set up the files with 644 and the directories with 755.
|
Quote:
mysql> use mysql; mysql> grant <permissions> on <database>.<tables> to <username>@<hostname> identified by '<password>'; A example would look like: mysql> grant all privileges on *.* to me@192.168.1.1 identified by 'mypassword'; That would grant all privileges on all databases to the user 'me' from the host 192.168.1.1 |
I did that and gave root all permissions; however, I don't think that the router really runs aunder any user name. It just routes the traffic I think I may try to just go to the box and do it locally. I really didn't want to go in the attic but maybe that would be best.
|
Quote:
|
OK I went up into the attic and logged onto my machine as root. I ran the mysql command referenced at the begininning of this post and I got. Cannot connect user ROOT with password NO. That isn't the password I gave, it isn't the password, and I don't know what the hell it's talking about.
|
Quote:
mysql -u <username> -p <database> -p<password> -h <hostname> Notice the -p for password has no space. And is there a reason you have to do this remotely? Can't you pull the file down locally to insert the nuke.sql file? |
I don't even know, I have no f**king clue what I am doing. I just know that until I started trying to host a dynamic web page, I was unfamiliar with how to get admitted to the violent ward at the state hospital. I want to run phpnuke, until I get sql set up I can't. When I try to do it remotely I have to have root access, which is difficult, and it has to go through the router. That takes me back to the original problem. I can't do it remotely because I can't make my router and my box play nice together. It did not ask me for a password it is my understanding that it obtains that password, username, and hostname from the config.php file. So do I have to do it locally? I also don't know what you mean "insert" the nuke.sql file. I think that file automatically sets up all the datbases and permissions.
|
I think your making this more complicated than this really is.
Is the machine you want to install phpnuke on have internet access? If so, wget or download the phpnuke files to this machine and install it locally. What type of router is this anyways? I still don't understand why your trying to install phpnuke from your router.. |
Two reasons, number one because my machine is in the attic in a pile of insulation, and number two because it asks for a hostname. To give it a hostname that will actually be used when for the site I am building there has to be a way to send the requests to the box, ie a router. I can't just put "localhost" in ther and expect it to work when I put it on the web and it isn't "localhost" anymore. Anyway I have put the files on the machine I need to get mysql to make the databases and set the permissions that need to be there for php to work. In order to do that without extensive knowledge of database construction I need to get the file nuke.php to run. I can't make it run I just get a f**king text display of the contents of the file. When I try to do a web install where you run nukesql.php it just locks my browser. This part right here is where I have been stopped, and I can't go any further. http://phpnuke.org/modules.php?name=...-creation.html
|
Quote:
|
I did forward the packets to the private address from my linksys wrt54g router. The packets make it there and everything works as far as telnet, ftp, web access, etc. Here is the problem. I MUST set up the data bases in sql for this to work. Part of that process is to set the hostname and user names in the config.php account. Once this is done and the Nuke.php script is run that is the way things are set up. So, if I put "localhost" in there and run the script it will work until people try to access it through the web, then it isn't localhost anymore. Therefore I have to put my actual host name in the file. Now, when the Nuke.php script runs it reads the config.php script and says "Oh, ok I have to go to this host" and the router routes those packets to my machine. This is where things get messed up. I can't make the nuke.php file run either locally or on the network. I get a variety of errors which I have already posted but I have to wonder what is really going on.
|
Quote:
Internet -> HTTP Request -> Server -> Config.php for Nuke -> Connects locally to MySQL to process the request -> returns output or whatever to person requesting web page. All of my php applications that use a config use localhost for the MySQL connection. Just be sure to forward HTTP and any other requests this server is listening on thru your router.. simple as that. Unless your actually serving apache and php on your router (which i highly doubt) with the mysql database on a remote server, you would use localhost, the config.php doesn't connect remotely if it's on the same machine. |
Tried that, didn't work it just says that there is an sql problem now. I get the php nuke error page that I have been getting since I put all of this on my box. I have done a port scan and the sql server is up. I ran the nuke.sql script and it apparently set up the databases. They aren't too specific as to exactly what "installing" php means, I have a hunch it means more than just dumping the files in you www directory, but that's about all they say other than make your databases. If you want to see the page it's at renalwranglers.gotdns.com
|
All times are GMT -5. The time now is 02:06 PM. |