LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-28-2006, 05:48 PM   #1
zenerdiode
LQ Newbie
 
Registered: Dec 2000
Location: Hattiesburg ms
Posts: 26

Rep: Reputation: 15
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
 
Old 09-28-2006, 07:16 PM   #2
Leisy
Member
 
Registered: Sep 2006
Location: Brno, Czech Republic
Distribution: Fedora
Posts: 56

Rep: Reputation: 15
Are you sure that you have correct permisions?
 
Old 09-28-2006, 07:53 PM   #3
zenerdiode
LQ Newbie
 
Registered: Dec 2000
Location: Hattiesburg ms
Posts: 26

Original Poster
Rep: Reputation: 15
Yes, I set up the files with 644 and the directories with 755.
 
Old 09-29-2006, 12:19 AM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by zenerdiode
Yes, I set up the files with 644 and the directories with 755.
I think the previous person meant with MySQL permission I'm sure, not file permissions..

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
 
Old 09-29-2006, 06:19 AM   #5
zenerdiode
LQ Newbie
 
Registered: Dec 2000
Location: Hattiesburg ms
Posts: 26

Original Poster
Rep: Reputation: 15
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.
 
Old 09-29-2006, 03:14 PM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by zenerdiode
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.
Well first of all, I wouldn't recommend logging in as root remotely, that's a security risk. Secondly, if the router doesn't have a username, then create the permissions for that IP without a username.
 
Old 10-01-2006, 08:41 AM   #7
zenerdiode
LQ Newbie
 
Registered: Dec 2000
Location: Hattiesburg ms
Posts: 26

Original Poster
Rep: Reputation: 15
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.
 
Old 10-01-2006, 09:44 AM   #8
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by zenerdiode
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.
Did it even prompt for a password? If not, you can specify it on the command as well.

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?
 
Old 10-01-2006, 12:14 PM   #9
zenerdiode
LQ Newbie
 
Registered: Dec 2000
Location: Hattiesburg ms
Posts: 26

Original Poster
Rep: Reputation: 15
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.
 
Old 10-01-2006, 05:07 PM   #10
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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..
 
Old 10-01-2006, 08:55 PM   #11
zenerdiode
LQ Newbie
 
Registered: Dec 2000
Location: Hattiesburg ms
Posts: 26

Original Poster
Rep: Reputation: 15
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

Last edited by zenerdiode; 10-01-2006 at 09:02 PM.
 
Old 10-02-2006, 06:48 AM   #12
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by zenerdiode
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
No need for swearing.. what type of router is this again? A homemade brew, Linksys, etc? And if your behind a router with a public IP and want to host this on your localhost with a private IP, just port forward whatever requests to the localhost, so yes, you could serve this phpnuke site behind a router/firewall.. but more details on your setup is required if you want any additional help.
 
Old 10-02-2006, 10:12 AM   #13
zenerdiode
LQ Newbie
 
Registered: Dec 2000
Location: Hattiesburg ms
Posts: 26

Original Poster
Rep: Reputation: 15
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.
 
Old 10-02-2006, 10:21 AM   #14
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by zenerdiode
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.
Actually, you want the config to use localhost, that's not an issue at all. The config file will always make the connection locally.

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.

Last edited by trickykid; 10-02-2006 at 10:23 AM.
 
Old 10-02-2006, 11:10 AM   #15
zenerdiode
LQ Newbie
 
Registered: Dec 2000
Location: Hattiesburg ms
Posts: 26

Original Poster
Rep: Reputation: 15
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

Last edited by zenerdiode; 10-02-2006 at 11:26 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 02:13 PM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
PHP 5 wont connect to MySql (fedora spacy2003 Linux - Software 0 02-07-2005 08:31 AM
SuSE wont connect to router nicksmart234 Linux - Networking 5 10-01-2004 06:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration