Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Rahul P
Thanks. I just stopped mysql and when I try to start it again it throws
another set of errors:

chown: changing ownership of `/home-public/mysql6': Operation not permitted

So I guess something is messed up completely. I wish I installed it better.
Now the installing is messed up I guess with all sorts of bad files. I will
try Google now...

Thanks for the help... :)

On Sun, May 11, 2008 at 12:17 AM, Nathan Nobbe <[EMAIL PROTECTED]>
wrote:

> On Sun, May 11, 2008 at 1:05 AM, Rahul <[EMAIL PROTECTED]> wrote:
>
>> I have recorded both the errors by changing the variable:
>>
>> $host = "mycomputer.webaddress.com"
>>
>> PHP Warning:  mysql_connect(): Lost connection to MySQL server during
>> query in /export/home/rpo219/may/conf_global.php on line 18
>> Lost connection to MySQL server during query
>
>
> i have seen this before, but i cant recall, specifically what the problem
> could be.  i recommend google ;)
>
>
>> $host = "localhost"
>>
>> PHP Warning:  mysql_connect(): Can't connect to local MySQL server through
>> socket '/var/lib/mysql/mysql.sock' (111) in
>> /export/home/rpo219/may/conf_global.php on line 18
>> Can't connect to local MySQL server through socket
>> '/var/lib/mysql/mysql.sock'
>>
>
> i believe this is because the user root, does not have permission to
> connect to the datbase from host 'localhost', especially since you said this
> didnt work from the command line either.  you will have to add a grant
> clause to allow the root user to connect from the localhost.
>
> I found something weird for the first time:
>>
>> I tried looking at the mysql6 data directory and it says the following:
>>
>> total 28
>> drwxr-xr-x   3 nfsnobody nfsnobody 4096 May 10 23:57 .
>> drwxrwxrwx  21 root  root  4096 May  7 14:35 ..
>> -rw-rw   1 nfsnobody nfsnobody 1009 May 10 23:57
>> mycomputer.webaddress.com.err
>> drwxr-xr-x   2 nfsnobody nfsnobody 4096 Jan 24 20:07 mysql
>>
>
> that is likely the way your distribution has designed the permission scheme
> for the mysql server.
>
> And when I try to change the ownership of the directory to mysql by
>>
>> [EMAIL PROTECTED] chown mysql ./mysql6
>> chown: changing ownership of `./mysql6': Operation not permitted
>>
>
> this is probly because you dont have permission to make the change...  you
> could do it via sudo, but i wouldnt recommend it.  your distro has set it up
> this way on purpose.
>
>
>> Just thought it might be related to the problem
>
>
> have you created any databases after installing mysql?  you should create
> at least one, like test db or something, and its good practice to create a
> specific user to access the database through as well.  instead of having php
> connect as root.  thats like a hackers dream right there.
>
> -nathan
>
>


-- 
Rahul
Computer Engineering and Systems Division.
Department of Electrical Engineering and Computer Science
Robert R. McCormick School of Engineering
Northwestern University
2145 Sheridan Road, Evanston,IL60208.

Administrator: The En?gma Project
Website: http://www.enigmaportal.com


Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Rahul P
Oh... This is the fourth time I'm doing that except that this time yum
installed mysql6 instead of older versions... I don't see any way out other
than reinstalling the OS itself... There are so many dependency failures
I'm spending more time troubleshooting than actually coding something :)

On Sun, May 11, 2008 at 12:27 AM, Nathan Nobbe <[EMAIL PROTECTED]>
wrote:

> On Sun, May 11, 2008 at 1:22 AM, Rahul P <[EMAIL PROTECTED]> wrote:
>
>> Thanks. I just stopped mysql and when I try to start it again it throws
>> another set of errors:
>>
>> chown: changing ownership of `/home-public/mysql6': Operation not
>> permitted
>>
>> So I guess something is messed up completely. I wish I installed it
>> better. Now the installing is messed up I guess with all sorts of bad files.
>> I will try Google now...
>>
>> Thanks for the help... :)
>>
>
> one benefit of package managers is that they let you uninstall and
> reinstall easily.  are you using yum or apt-get ?  in your first post you
> included both the commands..  anyway, id just uninstall and reinstall it;
> should take 10 minutes or so.
>
> -nathan
>
>


-- 
Rahul
Computer Engineering and Systems Division.
Department of Electrical Engineering and Computer Science
Robert R. McCormick School of Engineering
Northwestern University
2145 Sheridan Road, Evanston,IL60208.

Administrator: The En?gma Project
Website: http://www.enigmaportal.com


Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Rahul P
On Sun, May 11, 2008 at 12:42 AM, Nathan Nobbe <[EMAIL PROTECTED]>
wrote:

> On Sun, May 11, 2008 at 1:29 AM, Rahul P <[EMAIL PROTECTED]> wrote:
>
>> Oh... This is the fourth time I'm doing that except that this time yum
>> installed mysql6 instead of older versions... I don't see any way out other
>> than reinstalling the OS itself... There are so many dependency failures
>> I'm spending more time troubleshooting than actually coding something :)
>
>
> i dont even think mysql6 is any where near ready for real usage (tho could
> be wrong).  can you see if you could put 5 or 5.1 on there instead?  os
> reinstall sounds painful =/
>
> -nathan
>
>


-- 
Rahul
Computer Engineering and Systems Division.
Department of Electrical Engineering and Computer Science
Robert R. McCormick School of Engineering
Northwestern University
2145 Sheridan Road, Evanston,IL60208.

Administrator: The En?gma Project
Website: http://www.enigmaportal.com


Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Rahul P
Ok I removed mysql using yum remove mysql. But is there a special way to
tell yum to install that version of mysql?

On Sun, May 11, 2008 at 12:44 AM, Rahul P <[EMAIL PROTECTED]> wrote:

>
>
> On Sun, May 11, 2008 at 12:42 AM, Nathan Nobbe <[EMAIL PROTECTED]>
> wrote:
>
>> On Sun, May 11, 2008 at 1:29 AM, Rahul P <[EMAIL PROTECTED]> wrote:
>>
>>> Oh... This is the fourth time I'm doing that except that this time yum
>>> installed mysql6 instead of older versions... I don't see any way out other
>>> than reinstalling the OS itself... There are so many dependency failures
>>> I'm spending more time troubleshooting than actually coding something :)
>>
>>
>> i dont even think mysql6 is any where near ready for real usage (tho could
>> be wrong).  can you see if you could put 5 or 5.1 on there instead?  os
>> reinstall sounds painful =/
>>
>> -nathan
>>
>>
>
>
>  --
> Rahul
> Computer Engineering and Systems Division.
> Department of Electrical Engineering and Computer Science
> Robert R. McCormick School of Engineering
> Northwestern University
> 2145 Sheridan Road, Evanston,IL60208.
>
> Administrator: The En?gma Project
> Website: http://www.enigmaportal.com
>



-- 
Rahul
Computer Engineering and Systems Division.
Department of Electrical Engineering and Computer Science
Robert R. McCormick School of Engineering
Northwestern University
2145 Sheridan Road, Evanston,IL60208.

Administrator: The En?gma Project
Website: http://www.enigmaportal.com


Re: [PHP] Can I make EasyPHP on Windows allow remote connections?

2008-05-10 Thread Rahul P
Well I thought it has something to do with EasyPHP because I'm able to use
Remote Desktop Connection of Windows. Actually I've been using EasyPHP
through RDC but I thought I could use it directly...

On Sun, May 11, 2008 at 12:44 AM, Nathan Nobbe <[EMAIL PROTECTED]>
wrote:

> On Sun, May 11, 2008 at 1:25 AM, Rahul <[EMAIL PROTECTED]> wrote:
>
>> I have EasyPHP installed on my Windows system and can connect to the
>> php+mysql using localhost in the browser but I was wondering if I can
>> connect to this computer (which is at my office) from my home. I have a web
>> address alloted to my computer at office.
>
>
> this is primarily dependent upon firewall restrictions and subnet
> configurations at your office.  most places ive worked at have their
> internal networks pretty well isolated from the internet, and for good
> reason.  probly this question is better for the LAN admin at ur office ;)
>
> -nathan
>



-- 
Rahul
Computer Engineering and Systems Division.
Department of Electrical Engineering and Computer Science
Robert R. McCormick School of Engineering
Northwestern University
2145 Sheridan Road, Evanston,IL60208.

Administrator: The En?gma Project
Website: http://www.enigmaportal.com


Re: [PHP] PHP-MYSQL Error: Can't connect to MySQL socket. Can someonehelp me out please?

2008-05-10 Thread Rahul P
Ok. I apologize for the mix. When I'm mailing someone, I simply don't get
Google into mind. :)

Thanks,
Rahul

On Sun, May 11, 2008 at 12:53 AM, Nathan Nobbe <[EMAIL PROTECTED]>
wrote:

> On Sun, May 11, 2008 at 1:46 AM, Rahul P <[EMAIL PROTECTED]> wrote:
>
>> Ok I removed mysql using yum remove mysql. But is there a special way to
>> tell yum to install that version of mysql?
>
>
> ahh, this is where google comes in for sure.  it looks like you could
> download an older rpm, like from mysql and use 'yum localinstall' or there
> is a way to search for older versions that are still in the yum repos.
> heres a quick link i found
>
> http://www.fedoraforum.org/forum/showthread.php?t=96684
>
> -nathan
>
>


-- 
Rahul
Computer Engineering and Systems Division.
Department of Electrical Engineering and Computer Science
Robert R. McCormick School of Engineering
Northwestern University
2145 Sheridan Road, Evanston,IL60208.

Administrator: The En?gma Project
Website: http://www.enigmaportal.com


Re: [PHP] Can I make EasyPHP on Windows allow remote connections?

2008-05-10 Thread Rahul P
Looks like it is closed... Thanks. I will pay a visit to the Root... You've
been of great help...

Thanks
Rahul

On Sun, May 11, 2008 at 1:00 AM, Nathan Nobbe <[EMAIL PROTECTED]>
wrote:

> On Sun, May 11, 2008 at 1:48 AM, Rahul P <[EMAIL PROTECTED]> wrote:
>
>> Well I thought it has something to do with EasyPHP because I'm able to use
>> Remote Desktop Connection of Windows. Actually I've been using EasyPHP
>> through RDC but I thought I could use it directly...
>
>
> rdp has a special port that it runs over.  mysql runs over 3306.  just
> because they have the rdp port open doesnt mean they have the mysql one
> open.  but again, good question for the lan admin.  i doubt it has anything
> to do w/ easyPHP.  when you say you have a 'web address' for your computer
> at work, does that mean you can connect to websites hosted on your computer
> from the internet (like from home for example [not using rdp])?  if thats
> the case then your company also has port 80 open to your system as well,
> which still doesnt mean that 3306 is open.  if you want, you can find out
> real quick yourself, by using nmap.  just use the hostname for your box at
> work and nmap it.  say for example your box has the name
> mybox.myoffice.com, then you do
>
> nmap mybox.myoffice.com
>
> if you dont see port 3306 in the list, likely you wont have direct access.
> but if you do have access over port 80 (web) you can install mysqlAdmin and
> get to it that way.
>
> -nathan
>



-- 
Rahul
Computer Engineering and Systems Division.
Department of Electrical Engineering and Computer Science
Robert R. McCormick School of Engineering
Northwestern University
2145 Sheridan Road, Evanston,IL60208.

Administrator: The En?gma Project
Website: http://www.enigmaportal.com