Re: Can't Connect Localhost

2013-09-03 Thread hsv
>>>> 2013/09/02 12:49 +0800, John Smith >>>>
> > I looked in mysql.config.pl and no "localhost" :(
> "mysql.config.pl" from what software damned?
> "mysql.config.pl" does not exist in context of mysql

It exists in the following folder on my Win8 box:

/Program Files (x86)/MySQL/MySQL Server 5.5/bin

Yes, apparently it does exist in context of mysql. At any rate, it didn't work. 
Is there another config file in there? 
<<<<<<<<

That is a Perl script, meant for, under Windows, configuration _reporting_. One 
directory up look for "my.ini". As for its meaning, maybe 
<http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html> helps, 
after
mysqladmin -uroot -p variables > (somepathyoumayuse)
OR
mysql -uroot -p -e"show global variables" > (somepathyoumayuse)
for showing all variables that may be in that file.

For me the commands work also with "-hlocalhost" or "-h127.0.0.1" in the 
command-line, as expected.

In any case, your original error message, although it is a MySQL error, as 
Harald said does not look like something straight from MySQL client 
("mysql.exe"), but something passed through another. What did you enter to get 
it?

Note this quote:
The error (2003) Can't connect to MySQL server on 'server' (10061) indicates 
that the network connection has been refused. You should check that there is a 
MySQL server running, that it has network connections enabled, and that the 
network port you specified is the one configured on the server. 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Can't Connect Localhost

2013-09-03 Thread shawn green

Hello John,

On 9/2/2013 12:49 AM, John Smith wrote:


On Sun, 1/9/13, Reindl Harald  wrote:

  Subject: Re: Can't Connect Localhost
  To: mysql@lists.mysql.com
  Date: Sunday, 1 September, 2013, 2:44 PM


I looked in mysql.config.pl and no "localhost" :(



"mysql.config.pl" from what software damned?
"mysql.config.pl" does not exist in context of mysql


It exists in the following folder on my Win8 box:

/Program Files (x86)/MySQL/MySQL Server 5.5/bin

Yes, apparently it does exist in context of mysql. At any rate, it didn't work. 
Is there another config file in there?


*what client software you are using to connect to a
mysql-server*


I had written a python script. However, even if I try your and the other 
fellow's suggestion and open up a command prompt with admin privileges and type
mysql -u root -h 127.0.0.1 -p

it just opens up a mysql session, and that only if I do it from the folder 
where that script lives since it's not in the path. Otherwise, it complains it 
can't find the script.
TIA,
John




I am also confused by your apparent dependency on this script 
(mysql_config.pl) to create a client connection.  This is not the 
location that stores or processes or influences your startup parameters. 
 Neither can it be used for creating client-server connections.


http://dev.mysql.com/doc/refman/5.6/en/mysql-config.html


The location of your configuration details is a 'my.ini' file or files 
located in one of these locations


http://dev.mysql.com/doc/refman/5.6/en/option-files.html

What happens when you temporarily rename mysql_config.pl to something 
else? What error messages do you get?


Also.  You have established that using the command line client 
(mysql.exe) works just fine for you.  What is the other tool are you 
attempting to use as a MySQL client that has been giving you problems? 
There are at least two connection libraries you can launch from Python 
that allow you to connect to MySQL.  Which one is yours?


Regards,
--
Shawn Green
MySQL Principal Technical Support Engineer
Oracle USA, Inc. - Hardware and Software, Engineered to Work Together.
Office: Blountville, TN

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Can't Connect Localhost

2013-09-01 Thread John Smith

On Sun, 1/9/13, Reindl Harald  wrote:

 Subject: Re: Can't Connect Localhost
 To: mysql@lists.mysql.com
 Date: Sunday, 1 September, 2013, 2:44 PM
 
> > I looked in mysql.config.pl and no "localhost" :(
 
> "mysql.config.pl" from what software damned?
> "mysql.config.pl" does not exist in context of mysql

It exists in the following folder on my Win8 box:

/Program Files (x86)/MySQL/MySQL Server 5.5/bin

Yes, apparently it does exist in context of mysql. At any rate, it didn't work. 
Is there another config file in there?

> *what client software you are using to connect to a
> mysql-server*

I had written a python script. However, even if I try your and the other 
fellow's suggestion and open up a command prompt with admin privileges and type
mysql -u root -h 127.0.0.1 -p

it just opens up a mysql session, and that only if I do it from the folder 
where that script lives since it's not in the path. Otherwise, it complains it 
can't find the script.
TIA,
John 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Can't Connect Localhost

2013-09-01 Thread Howard Hart
Try

mysql -u root -h 127.0.0.1 -p

And if that doesn't work

mysql -u root -h  -p

On Sep 1, 2013, at 4:59 AM, "John Smith"  wrote:

> __mysql_exceptions,OperationalError (2003 "Can't connect to MySQL server on 
> 'localhost' (10061)")
> 
> My question: How do I change from localhost to 124.0.0.1?
> TIA
> John
> 
> 
> On Sun, 1/9/13, Terry J Fundak  wrote:
> 
> Subject: Re: Can't Connect Localhost
> To: mysql@lists.mysql.com
> Cc: "John Smith" 
> Date: Sunday, 1 September, 2013, 3:33 AM
> 
> Hi John,
> 
> Starting over….
> 
> What is the "error message"?
> 
> Terry
> 
> ___
> Terry J Fundak
> Systems Engineer
> Network Design and Security Solutions for SMBs
> Tech Support - Client and Server Systems
> 
> TJSoftworks
> 1834 Chadwick Court
> Santa Rosa, CA 95401
> (707) 849-1000 Cell
> e-Mail: te...@tjsoftworks.com
> 
> 
> 
> 
> 
> On Aug 31, 2013, at 3:26 PM, John Smith 
> wrote:
> 
>> Hi;
>> How do I change my connection from localhost to
> 127.0.0.1 on a Win8 machine?
>> TIA,
>> John
>> 
>> --
>> MySQL General Mailing List
>> For list archives: http://lists.mysql.com/mysql
>> To unsubscribe:http://lists.mysql.com/mysql
> 
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql
> 

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Can't Connect Localhost

2013-09-01 Thread Reindl Harald


Am 01.09.2013 15:37, schrieb John Smith:
> 
> On Sun, 1/9/13, Reindl Harald  wrote:
> 
>  Subject: Re: Can't Connect Localhost
>  To: mysql@lists.mysql.com
>  Date: Sunday, 1 September, 2013, 1:34 PM
>  
>  where you can change this? typically
>  in the config file
>  of teh software without crystal balls we don't know
>  
>  what about tell us what software you are speaking about?
> 
> Well, I'm using MySQL ;) 

"__mysql_exceptions,OperationalError (2003 "Can't connect to MySQL server on 
'localhost' (10061)")"
is surely not the answer of the ordinary mysql-cli-client

why? because it looks like this

mysql -h  -u test -p
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on '' (111)

> In my first post, I stated version 5.5 and on Win8/64

fine that does not answer the question which *client software* you are using

> I looked in mysql.config.pl and no "localhost" :(

"mysql.config.pl" from what software damned?
"mysql.config.pl" does not exist in context of mysql

*what client software you are using to connect to a mysql-server*
*why not read the manual of this software*



signature.asc
Description: OpenPGP digital signature


Re: Can't Connect Localhost

2013-09-01 Thread John Smith

On Sun, 1/9/13, Reindl Harald  wrote:

 Subject: Re: Can't Connect Localhost
 To: mysql@lists.mysql.com
 Date: Sunday, 1 September, 2013, 1:34 PM
 
 where you can change this? typically
 in the config file
 of teh software without crystal balls we don't know
 
 what about tell us what software you are speaking about?

Well, I'm using MySQL ;) In my first post, I stated version 5.5 and on Win8/64. 
I looked in mysql.config.pl and no "localhost" :(
John

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Can't Connect Localhost

2013-09-01 Thread Reindl Harald
where you can change this? typically in the config file
of teh software without crystal balls we don't know

what about tell us what software you are speaking about?

please realize that you have a very bad style of asking questions
http://www.catb.org/esr/faqs/smart-questions.html#before

Am 01.09.2013 13:56, schrieb John Smith:
> __mysql_exceptions,OperationalError (2003 "Can't connect to MySQL server on 
> 'localhost' (10061)")
> 
> My question: How do I change from localhost to 124.0.0.1?
>
>  Hi John,
>  
>  Starting over….
>  
>  What is the "error message"?
>  
>  On Aug 31, 2013, at 3:26 PM, John Smith 
>  wrote:
>  
>  > Hi;
>  > How do I change my connection from localhost to
>  127.0.0.1 on a Win8 machine?





signature.asc
Description: OpenPGP digital signature


Re: Can't Connect Localhost

2013-09-01 Thread John Smith
__mysql_exceptions,OperationalError (2003 "Can't connect to MySQL server on 
'localhost' (10061)")

My question: How do I change from localhost to 124.0.0.1?
TIA
John


On Sun, 1/9/13, Terry J Fundak  wrote:

 Subject: Re: Can't Connect Localhost
 To: mysql@lists.mysql.com
 Cc: "John Smith" 
 Date: Sunday, 1 September, 2013, 3:33 AM
 
 Hi John,
 
 Starting over….
 
 What is the "error message"?
 
 Terry
 
 ___
 Terry J Fundak
 Systems Engineer
 Network Design and Security Solutions for SMBs
 Tech Support - Client and Server Systems
 
 TJSoftworks
 1834 Chadwick Court
 Santa Rosa, CA 95401
 (707) 849-1000 Cell
 e-Mail: te...@tjsoftworks.com
 
 
 
 
 
 On Aug 31, 2013, at 3:26 PM, John Smith 
 wrote:
 
 > Hi;
 > How do I change my connection from localhost to
 127.0.0.1 on a Win8 machine?
 > TIA,
 > John
 > 
 > --
 > MySQL General Mailing List
 > For list archives: http://lists.mysql.com/mysql
 > To unsubscribe:    http://lists.mysql.com/mysql
 > 
 > 
 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Can't Connect Localhost

2013-08-31 Thread Terry J Fundak
Hi John,

Starting over….

What is the "error message"?

Terry

___
Terry J Fundak
Systems Engineer
Network Design and Security Solutions for SMBs
Tech Support - Client and Server Systems

TJSoftworks
1834 Chadwick Court
Santa Rosa, CA 95401
(707) 849-1000 Cell
e-Mail: te...@tjsoftworks.com





On Aug 31, 2013, at 3:26 PM, John Smith  wrote:

> Hi;
> How do I change my connection from localhost to 127.0.0.1 on a Win8 machine?
> TIA,
> John
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql
> 
> 



smime.p7s
Description: S/MIME cryptographic signature


Re: Can't Connect Localhost

2013-08-31 Thread Reindl Harald


Am 01.09.2013 01:02, schrieb Terry J Fundak:
> Also  https://en.wikipedia.org/wiki/Localhost for move reading on the 
> subject
> 
> Sorry if I'm missing your issue

why do you think that i have any issue and why
do you insist to reply offlist?

> On Aug 31, 2013, at 15:41, Reindl Harald wrote:
> 
>>
>>
>> Am 01.09.2013 00:26, schrieb John Smith:
>>> How do I change my connection from localhost to 127.0.0.1 on a Win8 machine?
>>
>> in which context?
>>
>> mysql -h 127.0.0.1..



signature.asc
Description: OpenPGP digital signature


Re: Can't Connect Localhost

2013-08-31 Thread Reindl Harald
first: you not answer off-list on list-repsones

Am 01.09.2013 01:00, schrieb Terry J Fundak:
> So... I guess I need to ask: Do you know that 127.0.0.1/localhost only refers 
> to the machine you are on, right? 

naturally yes

> One cannot, for example, attempt to login to a remote host with that IP 
> address or to go from one host to another, right?  

naturally yes

That address is 100% reserved to go to the local machine ..

yes

> unless one has some tricks going on at the port level so that is is piped to 
> another host.

what do you call tricks here?
forward mysql prt 3306 of whatever host to 127.0.0.1:whatever port?

> Thus the terminal command
> mysql -h 127.0.0.1 is going to open a connect to the mysql instance on the 
> current host of the terminal session.
> 
> Does that help?

you need help, not i

> Now, if what you are trying to do is to open a console session to mysql 
> and the above command doesn't work,

i ask with the error message i get

> first, I think that would be pretty unusual and/or a sysadmin has locked the 
> instance 
> to respond from another host . that would be my guess.

why guess if you get a error message?

surely one can restrict a user to hwatever IP address
as well as localhost and 127.0.0.1 is not the same
localhost is a unix-socket, 127.0.0.1 is TCP

with "skip-name-resolve" they are handeled different

however, as said, you need *at least* to provide error messages
you get since the crystal balls of most people are defect

> te...@tjsoftworks.com
> 
> On Aug 31, 2013, at 15:41, Reindl Harald wrote:
> 
>>
>>
>> Am 01.09.2013 00:26, schrieb John Smith:
>>> How do I change my connection from localhost to 127.0.0.1 on a Win8 machine?
>>
>> in which context?
>>
>> mysql -h 127.0.0.1..



signature.asc
Description: OpenPGP digital signature


Re: Can't Connect Localhost

2013-08-31 Thread Reindl Harald


Am 01.09.2013 00:26, schrieb John Smith:
> How do I change my connection from localhost to 127.0.0.1 on a Win8 machine?

in which context?

mysql -h 127.0.0.1..





signature.asc
Description: OpenPGP digital signature


Can't Connect Localhost

2013-08-31 Thread John Smith
Hi;
How do I change my connection from localhost to 127.0.0.1 on a Win8 machine?
TIA,
John

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Why "ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.27.72' (111)"?

2013-06-13 Thread Johan De Meersman
Assuming Linux, check where it's listening using "netstat -lptn".

lx  wrote:
>hi all:
>I'm a new one. I have a mysql server in 192.168.27.72 , and a mysql
>client in 192.168.23.73.
>I use this way:
> mysql -h 192.168.27.72 -u root -p
>
>the ERROR message is:
>ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.27.72'
>(111)
>
>#
>mysql> select host, user, password from user;
>+-+--+---+
>| host| user | password
> |
>+-+--+---+
>| localhost   | root | 023c30696e164488
> |
>| vps192168027072 | root |
>  |
>| 127.0.0.1   | root |
>  |
>| localhost   |  |
>  |
>| vps192168027072 |  |
>  |
>| localhost   | monty| 0fc756bc026507b2
> |
>| %   | monty| 0fc756bc026507b2
> |
>| localhost   | gdnscenter   | 184a22a73852ad5b
> |
>| %   | gdns_replication | 2dbc2f8719c4ffcd
> |
>| %   | root | 023c30696e164488
> |
>| 192.168.23.73   | root |
>*EAB821151A3DE1A8FA76CD28D8F3BBD2389751F6 |
>| 0.0.0.0 | root |
>*EAB821151A3DE1A8FA76CD28D8F3BBD2389751F6 |
>+-+--+---+
>12 rows in set (0.00 sec)
>#
>
>And in 192.168.27.72
>#
>service iptables status
>Firewall is stopped.
>#
>
>and there are not "bind-address " and "skip_networking" in my.cnf 。
>
>
>I have installed the mysql in this way:
>#
>yum -y install mysql-server
>
>#vim /etc/my.cnf
>[mysqld]
>datadir=/var/lib/mysql
>socket=/var/lib/mysql/mysql.sock
># Default to using old password format for compatibility with mysql 3.x
># clients (those using the mysqlclient10 compatibility package).
>old_passwords=1
>default-character-set = utf8
>
>
>[mysql]
>default-character-set = utf8
>
>
>[root@sample ~]# chkconfig mysqld on
>[root@sample ~]# chkconfig --list mysqld
>mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
>
>
>chattr -i /etc/group
>chattr -i /etc/passwd
>chattr -i /etc/shadow
>chattr -i /etc/gshadow
>useradd mysql
>chattr +i /etc/group
>chattr +i /etc/passwd
>chattr +i /etc/shadow
>chattr +i /etc/gshadow
>
>
>chown mysql /var/run/mysqld/
>
>cd /var/lib/mysql
>chown mysql -R *
>cd –
>
>
>mysql_install_db --user=mysql --ldata=/var/lib/mysql
>
>
>[root@sample ~]# /etc/rc.d/init.d/mysqld start
>
>#
>
>
>Thank you

-- 
Sent from Kaiten Mail. Please excuse my brevity.

Why "ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.27.72' (111)"?

2013-06-13 Thread lx
hi all:
  I'm a new one. I have a mysql server in 192.168.27.72 , and a mysql
client in 192.168.23.73.
I use this way:
 mysql -h 192.168.27.72 -u root -p

the ERROR message is:
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.27.72' (111)

#
mysql> select host, user, password from user;
+-+--+---+
| host| user | password
 |
+-+--+---+
| localhost   | root | 023c30696e164488
 |
| vps192168027072 | root |
  |
| 127.0.0.1   | root |
  |
| localhost   |  |
  |
| vps192168027072 |  |
  |
| localhost   | monty| 0fc756bc026507b2
 |
| %   | monty| 0fc756bc026507b2
 |
| localhost   | gdnscenter   | 184a22a73852ad5b
 |
| %   | gdns_replication | 2dbc2f8719c4ffcd
 |
| %   | root | 023c30696e164488
 |
| 192.168.23.73   | root |
*EAB821151A3DE1A8FA76CD28D8F3BBD2389751F6 |
| 0.0.0.0 | root |
*EAB821151A3DE1A8FA76CD28D8F3BBD2389751F6 |
+-+--+---+
12 rows in set (0.00 sec)
#

And in 192.168.27.72
#
service iptables status
Firewall is stopped.
#

and there are not "bind-address " and "skip_networking" in my.cnf 。


I have installed the mysql in this way:
#
yum -y install mysql-server

#vim /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
default-character-set = utf8


[mysql]
default-character-set = utf8


[root@sample ~]# chkconfig mysqld on
[root@sample ~]# chkconfig --list mysqld
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off


chattr -i /etc/group
chattr -i /etc/passwd
chattr -i /etc/shadow
chattr -i /etc/gshadow
useradd mysql
chattr +i /etc/group
chattr +i /etc/passwd
chattr +i /etc/shadow
chattr +i /etc/gshadow


chown mysql /var/run/mysqld/

cd /var/lib/mysql
chown mysql -R *
cd �C


mysql_install_db --user=mysql --ldata=/var/lib/mysql


[root@sample ~]# /etc/rc.d/init.d/mysqld start

#


Thank you


Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

2012-04-13 Thread Claudio Nanni
Hi
you have to see the reason in the mysql log file,
that is a file either in the datadir with .err extension or in the /var/log
directory.
tail the last 30 lines you will see the reason why it failed to start.

Claudio


2012/4/11 Prabhat Kumar 

> did you check permission of file /var/run/mysqld/mysqld.sock
>
> On Wed, Apr 11, 2012 at 9:48 AM, Larry Martell  >wrote:
>
> > On Wed, Apr 11, 2012 at 2:51 AM, Ganesh Kumar 
> wrote:
> > > Hi Guys,
> > >
> > > I am using debian squeeze it's working good, I am trying to install
> > > mysql-server. mysql-server installation successfully but didn't start
> > > service
> > > root@devel:/var/run# more /etc/mysql/my.cnf |grep socket
> > > # Remember to edit /etc/mysql/debian.cnf when changing the socket
> > location.
> > > socket  = /var/run/mysqld/mysqld.sock
> > > socket  = /var/run/mysqld/mysqld.sock
> > > socket  = /var/run/mysqld/mysqld.sock
> > >
> > > root@devel:~# /etc/init.d/mysql restart
> > > Stopping MySQL database server: mysqld.
> > > Starting MySQL database server: mysqld . . . . . . . . . . . . . .
> > failed!
> > > root@devel:~# mysql -u root -p
> > > Enter password:
> > > ERROR 2002 (HY000): Can't connect to local MySQL server through socket
> > > '/var/run/mysqld/mysqld.sock' (2)
> > > root@devel:~# cd /var/run/mysqld/
> > > root@devel:/var/run/mysqld# ls
> > > root@devel:/var/run/mysqld#
> >
> > Is selinux enabled? If so, check the logs for that.
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:http://lists.mysql.com/mysql
> >
> >
>
>
> --
> Best Regards,
>
> Prabhat Kumar
> MySQL DBA
>
> My Blog: http://adminlinux.blogspot.com
> My LinkedIn: http://www.linkedin.com/in/profileprabhat
>



-- 
Claudio


Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

2012-04-11 Thread Prabhat Kumar
did you check permission of file /var/run/mysqld/mysqld.sock

On Wed, Apr 11, 2012 at 9:48 AM, Larry Martell wrote:

> On Wed, Apr 11, 2012 at 2:51 AM, Ganesh Kumar  wrote:
> > Hi Guys,
> >
> > I am using debian squeeze it's working good, I am trying to install
> > mysql-server. mysql-server installation successfully but didn't start
> > service
> > root@devel:/var/run# more /etc/mysql/my.cnf |grep socket
> > # Remember to edit /etc/mysql/debian.cnf when changing the socket
> location.
> > socket  = /var/run/mysqld/mysqld.sock
> > socket  = /var/run/mysqld/mysqld.sock
> > socket  = /var/run/mysqld/mysqld.sock
> >
> > root@devel:~# /etc/init.d/mysql restart
> > Stopping MySQL database server: mysqld.
> > Starting MySQL database server: mysqld . . . . . . . . . . . . . .
> failed!
> > root@devel:~# mysql -u root -p
> > Enter password:
> > ERROR 2002 (HY000): Can't connect to local MySQL server through socket
> > '/var/run/mysqld/mysqld.sock' (2)
> > root@devel:~# cd /var/run/mysqld/
> > root@devel:/var/run/mysqld# ls
> > root@devel:/var/run/mysqld#
>
> Is selinux enabled? If so, check the logs for that.
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql
>
>


-- 
Best Regards,

Prabhat Kumar
MySQL DBA

My Blog: http://adminlinux.blogspot.com
My LinkedIn: http://www.linkedin.com/in/profileprabhat


Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

2012-04-11 Thread Larry Martell
On Wed, Apr 11, 2012 at 2:51 AM, Ganesh Kumar  wrote:
> Hi Guys,
>
> I am using debian squeeze it's working good, I am trying to install
> mysql-server. mysql-server installation successfully but didn't start
> service
> root@devel:/var/run# more /etc/mysql/my.cnf |grep socket
> # Remember to edit /etc/mysql/debian.cnf when changing the socket location.
> socket          = /var/run/mysqld/mysqld.sock
> socket          = /var/run/mysqld/mysqld.sock
> socket          = /var/run/mysqld/mysqld.sock
>
> root@devel:~# /etc/init.d/mysql restart
> Stopping MySQL database server: mysqld.
> Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
> root@devel:~# mysql -u root -p
> Enter password:
> ERROR 2002 (HY000): Can't connect to local MySQL server through socket
> '/var/run/mysqld/mysqld.sock' (2)
> root@devel:~# cd /var/run/mysqld/
> root@devel:/var/run/mysqld# ls
> root@devel:/var/run/mysqld#

Is selinux enabled? If so, check the logs for that.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

2012-04-11 Thread mail...@securitylabs.it

Il 11/04/2012 10:51, Ganesh Kumar ha scritto:

Hi Guys,

I am using debian squeeze it's working good, I am trying to install
mysql-server. mysql-server installation successfully but didn't start


root@devel:~# /etc/init.d/mysql restart
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!

Hi, look at /var/log/daemon.log, here you will find the reason.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Can't connect as non-root user to database

2012-03-16 Thread shawn green

On 3/16/2012 2:41 PM, Clemens Eisserer wrote:

Hi Shawn,

I understand the logic behind seperating local and remote users,
postgresql does the same thing in its pg_hba.conf file.
However, what I don't understand is the way this turned out to be such
a huge problem (for me), as it worked already with MySQL-5.1 a few
years ago. I've worked with other DBMs a bit as well, so I am not an
absolute noob.

To be honest I am a bit troubled with your explanation. If the % does
not include "localhost", why is it now possible to me to login as
"someone"@"%" after I have deleted that anonymous user claudio
mentioned (thanks again!).
Furthermore, why does mysql print "access denied for
someone@localhost" even when I specify -h127.0.0.1?

Thanks a lot for your response, Clemens



Because there is also an entry in your hosts file that equates the 
address 127.0.0.1 to the alias 'localhost'. The MySQL permissions checks 
looks for the the most specific match, first. Host matches are more 
specific than user matches as demonstrated in the examples here:

http://dev.mysql.com/doc/refman/5.5/en/connection-access.html

Once you eliminated the anonymous @localhost user, the system was able 
to check other possible matches, in order of specificity, to see if your 
login attempt qualified for access.


Because the socket-based direct match of someone@localhost failed, the 
system progressed to the network-based match of someone@% where the 
alias was able to resolve your address back from 127.0.0.1 into 
'localhost' which matched your pattern and granted you access.


Any previous improper behavior in older versions was most likely 
corrected when we fixed several bugs related to the IPv6 loopback 
address. Details are covered in the changelog to version 5.5.3 and the 
specific bug reports linked from within it.

http://dev.mysql.com/doc/refman/5.5/en/news-5-5-3.html

--
Shawn Green
MySQL Principal Technical Support Engineer
Oracle USA, Inc. - Hardware and Software, Engineered to Work Together.
Office: Blountville, TN

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Can't connect as non-root user to database

2012-03-16 Thread Claudio Nanni
Hi Clemens,

my pleasure!

I forgot, you had to use also -P3306, so using both -h and -P which deny
the lookup for users at localhost,
forcing TCP-IP. and so IPs.

this is also good when the socket file is not in the standard location, you
will have the same problem logging in locally,
using -h and -P forces TCP-IP

Cheers!

Claudio



2012/3/16 Clemens Eisserer 

> Hi Claudio,
>
> > you probably have the anonymous user account taking over:
> ''@'localhost'
> > login as root and:
> > mysql> drop user ''@'localhost';
> Thanks a lot, that solved the problem (and saved my day :) !).
>
>
> > when you specify the host with -h you are actually forcing MySQL to use
> > TCP/IP so it will authenticate you using your ip address (127.0.0.1)
> Actually even with -h127.0.0.1 specified, I got "access denied for
> ...@localhost".
>
> Thanks again, Clemens
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql
>
>


-- 
Claudio


Re: Can't connect as non-root user to database

2012-03-16 Thread Clemens Eisserer
Hi Shawn,

I understand the logic behind seperating local and remote users,
postgresql does the same thing in its pg_hba.conf file.
However, what I don't understand is the way this turned out to be such
a huge problem (for me), as it worked already with MySQL-5.1 a few
years ago. I've worked with other DBMs a bit as well, so I am not an
absolute noob.

To be honest I am a bit troubled with your explanation. If the % does
not include "localhost", why is it now possible to me to login as
"someone"@"%" after I have deleted that anonymous user claudio
mentioned (thanks again!).
Furthermore, why does mysql print "access denied for
someone@localhost" even when I specify -h127.0.0.1?

Thanks a lot for your response, Clemens

> On Unix-based systems the alias 'localhost' implies the local Unix socket,
> not a networking port. The important part to notice is that you created a
> user from "@%" but the error message said "@localhost". As that is a local
> socket, the pattern matching algorithm applied to the % to compare the
> incoming address (the source of the networked connection) to the account
> fails. Therefore it does not match to @localhost as the network was not
> involved.
>
> There is a logic behind this method of operation. Users with physical access
> to the machine (or remote access through tunneling protocols like ssh) are
> local to the files and processes themselves. The security exposure for this
> type of user means that this is most likely a very privileged person and
> they probably need to be allowed privileges for full administrative actions.
> Therefore a local MySQL user (coming in through the local Unix socket) may
> be assigned very different permissions than a user who happens to know the
> administrative account's password but is only allowed to login remotely (via
> the network). By keeping @localhost separate from @,
> we allow you (the DBA) to deny privileged access to any other user that
> cannot login directly from the host machine.
>
> Hopefully, this clarifies why your localhost account was unable to login.
>
> Additional reading:
> http://dev.mysql.com/doc/refman/5.5/en/connection-access.html
>
> --
> Shawn Green
> MySQL Principal Technical Support Engineer
> Oracle USA, Inc. - Hardware and Software, Engineered to Work Together.
> Office: Blountville, TN
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql
>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Can't connect as non-root user to database

2012-03-16 Thread Clemens Eisserer
Hi Claudio,

> you probably have the anonymous user account taking over:   ''@'localhost'
> login as root and:
> mysql> drop user ''@'localhost';
Thanks a lot, that solved the problem (and saved my day :) !).


> when you specify the host with -h you are actually forcing MySQL to use
> TCP/IP so it will authenticate you using your ip address (127.0.0.1)
Actually even with -h127.0.0.1 specified, I got "access denied for
...@localhost".

Thanks again, Clemens

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Can't connect as non-root user to database

2012-03-16 Thread shawn green

On 3/16/2012 7:00 AM, Clemens Eisserer wrote:

Hi Rik,


Hm, is the mysql-client library the same as the mysql-server?

Yes.


And does mysql --host=127.0.0.1 --user=someone -p somedb work (or it's actual
IP-address, forcing the TCP/IP connect instead of possible sockets) ?


This is really strange - with -h127.0.0.1 I get the same error:
ERROR 1045 (28000): Access denied for user 'someone'@'localhost'
(using password: YES)

However with -h192.168.1.102 everything works as expected, although I
used 'someone'@'%' everywhere.
Does '%' not include local connections / unix domain sockets?

Thanks, Clemens



On Unix-based systems the alias 'localhost' implies the local Unix 
socket, not a networking port. The important part to notice is that you 
created a user from "@%" but the error message said "@localhost". As 
that is a local socket, the pattern matching algorithm applied to the % 
to compare the incoming address (the source of the networked connection) 
to the account fails. Therefore it does not match to @localhost as the 
network was not involved.


There is a logic behind this method of operation. Users with physical 
access to the machine (or remote access through tunneling protocols like 
ssh) are local to the files and processes themselves. The security 
exposure for this type of user means that this is most likely a very 
privileged person and they probably need to be allowed privileges for 
full administrative actions. Therefore a local MySQL user (coming in 
through the local Unix socket) may be assigned very different 
permissions than a user who happens to know the administrative account's 
password but is only allowed to login remotely (via the network). By 
keeping @localhost separate from @, we allow you 
(the DBA) to deny privileged access to any other user that cannot login 
directly from the host machine.


Hopefully, this clarifies why your localhost account was unable to login.

Additional reading:
http://dev.mysql.com/doc/refman/5.5/en/connection-access.html

--
Shawn Green
MySQL Principal Technical Support Engineer
Oracle USA, Inc. - Hardware and Software, Engineered to Work Together.
Office: Blountville, TN

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Can't connect as non-root user to database

2012-03-16 Thread Rik Wasmus
> > Hm, is the mysql-client library the same as the mysql-server?
> 
> Yes.

Aight...

> > And does mysql --host=127.0.0.1 --user=someone -p somedb work (or it's
> > actual IP-address, forcing the TCP/IP connect instead of possible
> > sockets) ?
> 
> This is really strange - with -h127.0.0.1 I get the same error:
> ERROR 1045 (28000): Access denied for user 'someone'@'localhost'
> (using password: YES)
> 
> However with -h192.168.1.102 everything works as expected, although I
> used 'someone'@'%' everywhere.
> Does '%' not include local connections / unix domain sockets?

Hm, is a configuration file loaded? A ~/.my.cnf or something? And is there 
a 
socket defined there?

See also http://dev.mysql.com/doc/refman/5.1/en/option-files.html, and check 
any of the mentioned files for 'socket' definitions:

File Name   Purpose
/etc/my.cnf Global options
/etc/mysql/my.cnf   Global options (as of MySQL 5.1.15)
SYSCONFDIR/my.cnf   Global options
$MYSQL_HOME/my.cnf   Server-specific options
defaults-extra-file The file specified with --defaults-extra-file=path, 
if 
any
~/.my.cnf   User-specific options
-- 
Rik Wasmus

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Can't connect as non-root user to database

2012-03-16 Thread Claudio Nanni
If you want to verify it is very easy:

$ mysql --user=someone somedb  (without -p)

mysql> select user(); select current_user();

cheers

Claudio



2012/3/16 Claudio Nanni 

> you probably have the anonymous user account taking over:   ''@'localhost'
>
> when you specify the host with -h you are actually forcing MySQL to use
> TCP/IP so it will authenticate you using your ip address (127.0.0.1)
>
> login as root and:
> mysql> drop user ''@'localhost';
>
> and try again
>
> Cheers
>
> Claudio
>
>
> 2012/3/16 Clemens Eisserer 
>
>> Hi Rik,
>>
>> > Hm, is the mysql-client library the same as the mysql-server?
>> Yes.
>>
>> > And does mysql --host=127.0.0.1 --user=someone -p somedb work (or it's
>> actual
>> > IP-address, forcing the TCP/IP connect instead of possible sockets) ?
>>
>> This is really strange - with -h127.0.0.1 I get the same error:
>> ERROR 1045 (28000): Access denied for user 'someone'@'localhost'
>> (using password: YES)
>>
>> However with -h192.168.1.102 everything works as expected, although I
>> used 'someone'@'%' everywhere.
>> Does '%' not include local connections / unix domain sockets?
>>
>> Thanks, Clemens
>>
>> --
>> MySQL General Mailing List
>> For list archives: http://lists.mysql.com/mysql
>> To unsubscribe:http://lists.mysql.com/mysql
>>
>>
>
>
> --
> Claudio
>



-- 
Claudio


Re: Can't connect as non-root user to database

2012-03-16 Thread Claudio Nanni
you probably have the anonymous user account taking over:   ''@'localhost'

when you specify the host with -h you are actually forcing MySQL to use
TCP/IP so it will authenticate you using your ip address (127.0.0.1)

login as root and:
mysql> drop user ''@'localhost';

and try again

Cheers

Claudio


2012/3/16 Clemens Eisserer 

> Hi Rik,
>
> > Hm, is the mysql-client library the same as the mysql-server?
> Yes.
>
> > And does mysql --host=127.0.0.1 --user=someone -p somedb work (or it's
> actual
> > IP-address, forcing the TCP/IP connect instead of possible sockets) ?
>
> This is really strange - with -h127.0.0.1 I get the same error:
> ERROR 1045 (28000): Access denied for user 'someone'@'localhost'
> (using password: YES)
>
> However with -h192.168.1.102 everything works as expected, although I
> used 'someone'@'%' everywhere.
> Does '%' not include local connections / unix domain sockets?
>
> Thanks, Clemens
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql
>
>


-- 
Claudio


Re: Can't connect as non-root user to database

2012-03-16 Thread Clemens Eisserer
Hi Rik,

> Hm, is the mysql-client library the same as the mysql-server?
Yes.

> And does mysql --host=127.0.0.1 --user=someone -p somedb work (or it's actual
> IP-address, forcing the TCP/IP connect instead of possible sockets) ?

This is really strange - with -h127.0.0.1 I get the same error:
ERROR 1045 (28000): Access denied for user 'someone'@'localhost'
(using password: YES)

However with -h192.168.1.102 everything works as expected, although I
used 'someone'@'%' everywhere.
Does '%' not include local connections / unix domain sockets?

Thanks, Clemens

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Can't connect as non-root user to database

2012-03-16 Thread Claudio Nanni
Hi,

1. FLUSH PRIVILEGES is not needed, the SQL commands to manage user and
grants reload automatically the grant tables,
that was used in the very past when people use to tinker directly the grant
tables.

2. you did not specify the @ part of the  'someone' :  GRANT ALL ON
somedb.* TO 'someone'@'.' IDENTIFIED BY 'somepass';

cheers

Claudio
2012/3/16 Clemens Eisserer 

> Hi,
>
> All I would like to do is the create a small database with a non-root
> user which is allowed to access the db, however after hours of trying
> I gave up.
> I am using MySQL-5.5.20 on Fedora16 .
>
> CREATE USER 'someone'@'%' IDENTIFIED BY 'somepass';
> CREATE DATABASE somedb;
> GRANT ALL ON somedb.* TO 'someone' IDENTIFIED BY 'somepass';
> FLUSH PRIVILEGES;
>
> However, when I try to log in to somedb using someone, I always get:
>
> mysql --user=someone -p somedb
> Enter password:
> ERROR 1045 (28000): Access denied for user 'someone'@'localhost'
> (using password: YES)
>
> Any idea whats going wrong here?
> Connecting with mysql-workbench seems to work, although I don't see
> somedb in the list of databases.
>
> Thanks in advance, Clemens
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql
>
>


-- 
Claudio


Re: Can't connect as non-root user to database

2012-03-16 Thread Rik Wasmus
> Hi Rik,
> 
> > Have you tried the _full_ user-identification (which is with host)?
> > 
> > GRANT ALL ON somedb.* TO 'someone'@'%';
> 
> Yes I had (and just tried to verify) but it didn't help.

Oops, didn't use reply-to-list instead of reply-to-author, my apologies...

> Could it be Fedora's mysql packages are special somehow?
> Re-installing mysql after deletig its data-directory didn't help
> unfourtunatly. I also don't use fancy configuration, all I did was to copy
> my-medium.cnf to /etc/my.cnf and enabled innodb.

Hm, is the mysql-client library the same as the mysql-server?
And does mysql --host=127.0.0.1 --user=someone -p somedb work (or it's actual 
IP-address, forcing the TCP/IP connect instead of possible sockets) ?
-- 
Rik Wasmus

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Can't connect as non-root user to database

2012-03-16 Thread Clemens Eisserer
Hi Rik,

> Have you tried the _full_ user-identification (which is with host)?
>
> GRANT ALL ON somedb.* TO 'someone'@'%';

Yes I had (and just tried to verify) but it didn't help.

Could it be Fedora's mysql packages are special somehow?
Re-installing mysql after deletig its data-directory didn't help unfourtunatly.
I also don't use fancy configuration, all I did was to copy
my-medium.cnf to /etc/my.cnf and enabled innodb.

Thanks, Clemens

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Can't connect as non-root user to database

2012-03-16 Thread Clemens Eisserer
Hi,

All I would like to do is the create a small database with a non-root
user which is allowed to access the db, however after hours of trying
I gave up.
I am using MySQL-5.5.20 on Fedora16 .

CREATE USER 'someone'@'%' IDENTIFIED BY 'somepass';
CREATE DATABASE somedb;
GRANT ALL ON somedb.* TO 'someone' IDENTIFIED BY 'somepass';
FLUSH PRIVILEGES;

However, when I try to log in to somedb using someone, I always get:

mysql --user=someone -p somedb
Enter password:
ERROR 1045 (28000): Access denied for user 'someone'@'localhost'
(using password: YES)

Any idea whats going wrong here?
Connecting with mysql-workbench seems to work, although I don't see
somedb in the list of databases.

Thanks in advance, Clemens

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Can't connect to MySQL server on '127.0.0.1' (111)

2011-04-02 Thread xPol
Reindl Harald wrote:

> Please "netstat --numeric-hosts --notrim --programs -u -t -l"
> In my first answer i forgot the -l


i will check according to your suggstions
If i find still in troubles, i will let you know 

thank you 
---p


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Can't connect to MySQL server on '127.0.0.1' (111)

2011-04-02 Thread Reindl Harald
Please "netstat --numeric-hosts --notrim --programs -u -t -l"
In my first answer i forgot the -l

Without we get active connections, but we want the listening
tcp-services where somewhere must by mysqld

the easiest test is however

> [harry@srv-rhsoft:~]$ telnet 127.0.0.1 3306
> Trying 127.0.0.1...
> Connected to 127.0.0.1.
> Escape character is '^]'.
> 5.5.10-log�K]qC7,t'��a4~Agb949^QXmysql_native_password

if there is no connection we should find out why
debug simply the web-app user on a local terminal
to get error messages with more details as "failed"

> [harry@srv-rhsoft:~]$ mysql -h 127.0.0.1 -u myuser -p
> Enter password:
> ERROR 1045 (28000): Access denied for user 'myuser'@'localhost' (using 
> password: NO)

this example says more as "failed" bceause we see that connection
is possible but authentication fails


Am 02.04.2011 18:21, schrieb xPol:
> Reindl Harald wrote:
> 
>> please do not only post outputs, read them and try to understand
>> before press send - "not all processes could be identified, non-owned
>> process info will not be shown, you would have to be root to see it all."
>> in the ouptput says that all afterwards is useless
>>
>> "netstat --numeric-hosts --notrim --programs -u -t -l" as ROOT on the
>> machine where mysql is running! alterante: "telnet 127.0.0.1 3306"
> 
> sorry, i have re-enterd the command as root - here incuded
> 
>>
>> "/mnt/etc/my.cnf" is really your active mysql-config?
>> normally "/etc/my.cnf" is used, even if /etc/ is a own
>> disk/partition you should never mount it as /mnt/etc/
>> and managing with symlinks - mount it directly to /etc
>>
> 
> you're right, /mnt/etc/my.cnf is not my ususm cnf file I hd mounnted that 
> file system to compare with /etc/my.cnf
> They are the same, however. 
> 
> Here included also /etc/mysqlaccess.conf
> 
>> i would assume something like "skip-networking" in your
>> config if connection fails
> 
> it is there, but commented out:
> /etc/my.cnf:#skip-networking
> 
>>
>> anyways this mysql-config ma contain some includes
>> because the line "!include_dir /etc/mysql"
>>
> /
> That dir contains: /etc/mysql/default_plugins.cnf 
> its contents is here included
> 
>  thank you
>  p
> 
> 1- 
> % ° netstat --numeric-hosts --notrim --programs -u -t 
> 
> ~ (18:09-Sat  2) 
> Active Internet connections (w/o servers)
> Proto Recv-Q Send-Q Local Address   Foreign Address State 
>   
> PID/Program name   
> tcp0  0 10.121.243.241:6057774.125.232.149:https
> ESTABLISHED 6252/firefox
> tcp0  0 10.121.243.241:5420774.125.232.114:www-http 
> ESTABLISHED 6252/firefox
> tcp0  0 10.121.243.241:4954585.86.166.196:7168  
> TIME_WAIT   -   
> tcp0  0 10.121.243.241:5317374.125.232.150:https
> TIME_WAIT   -   
> tcp0  0 127.0.0.1:50793 127.0.0.1:48856 
> ESTABLISHED 6752/npviewer.bin   
> tcp0  0 127.0.0.1:57336 127.0.0.1:48856 
> ESTABLISHED 6752/npviewer.bin   
> tcp0  0 10.121.243.241:39556209.85.227.189:https
> ESTABLISHED 6252/firefox
> tcp0  0 10.121.243.241:6057674.125.232.149:https
> ESTABLISHED 6252/firefox
> tcp0  0 10.121.243.241:39551209.85.227.189:https
> TIME_WAIT   -   
> tcp0  0 10.121.243.241:4108983.233.30.55:ipsec-nat-t 
> TIME_WAIT   -   
> tcp0  0 10.121.243.241:39550209.85.227.189:https
> TIME_WAIT   -   
> tcp0  0 10.121.243.241:5275883.51.48.124:44909  
> TIME_WAIT   -   
> tcp0  0 127.0.0.1:52722 127.0.0.1:48856 
> ESTABLISHED 6752/npviewer.bin   
> tcp0  0 127.0.0.1:48856 127.0.0.1:52722 
> ESTABLISHED 6767/GoogleTalkPlug 
> tcp0  0 10.121.243.241:39555209.85.227.189:https
> ESTABLISHED 6252/firefox
> tcp0  0 10.121.243.241:3536582.56.169.37:19907  
> TIME_WAIT   -   
> tcp0  0 10.121.243.241:5728380.91.229.10:nntp   
> ESTABLISHED 12106/knodec10783.s 
> tcp0  0 10.121.243.241:4455274.125.232.150:https
> ESTABLISHED 6252/firefox
> tcp0  0 127.0.0.1:48856 127.0.0.1:50793 
> ESTABLISHED 6767/GoogleTalkPlug 
> tcp0  0 127.0.0.1:48856 127.0.0.1:57336 
> ESTABLISHED 6767/GoogleTalkPlug 
> 
> 2 
> (xpol) %  ° cat /etc/mysqlaccess.conf | grep -v "^#"  
>
> ~ (18:20-Sat  2) 
> 
> 
>   #$Param{'host'} = '';
>   $Param{'user'} = 'nobody';
>   $Param{'db'}   = 'test';
>   $Param{'password'} = 'foobar';
>   $Param{'debug'}= 0;
> 
> if ($CMD) {
>   $Param{'superuser'} = 'root';
>   $Param{'rhost'} = 'localhost';
>   $Param{'spassword'

Re: Can't connect to MySQL server on '127.0.0.1' (111)

2011-04-02 Thread xPol
Reindl Harald wrote:

> please do not only post outputs, read them and try to understand
> before press send - "not all processes could be identified, non-owned
> process info will not be shown, you would have to be root to see it all."
> in the ouptput says that all afterwards is useless
> 
> "netstat --numeric-hosts --notrim --programs -u -t -l" as ROOT on the
> machine where mysql is running! alterante: "telnet 127.0.0.1 3306"

sorry, i have re-enterd the command as root - here incuded

> 
> "/mnt/etc/my.cnf" is really your active mysql-config?
> normally "/etc/my.cnf" is used, even if /etc/ is a own
> disk/partition you should never mount it as /mnt/etc/
> and managing with symlinks - mount it directly to /etc
> 

you're right, /mnt/etc/my.cnf is not my ususm cnf file I hd mounnted that 
file system to compare with /etc/my.cnf
They are the same, however. 

Here included also /etc/mysqlaccess.conf

> i would assume something like "skip-networking" in your
> config if connection fails

it is there, but commented out:
/etc/my.cnf:#skip-networking

> 
> anyways this mysql-config ma contain some includes
> because the line "!include_dir /etc/mysql"
> 
/
That dir contains: /etc/mysql/default_plugins.cnf 
its contents is here included

 thank you
 p

1- 
% ° netstat --numeric-hosts --notrim --programs -u -t   
  
~ (18:09-Sat  2) 
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address   Foreign Address State   
PID/Program name   
tcp0  0 10.121.243.241:6057774.125.232.149:https
ESTABLISHED 6252/firefox
tcp0  0 10.121.243.241:5420774.125.232.114:www-http 
ESTABLISHED 6252/firefox
tcp0  0 10.121.243.241:4954585.86.166.196:7168  
TIME_WAIT   -   
tcp0  0 10.121.243.241:5317374.125.232.150:https
TIME_WAIT   -   
tcp0  0 127.0.0.1:50793 127.0.0.1:48856 
ESTABLISHED 6752/npviewer.bin   
tcp0  0 127.0.0.1:57336 127.0.0.1:48856 
ESTABLISHED 6752/npviewer.bin   
tcp0  0 10.121.243.241:39556209.85.227.189:https
ESTABLISHED 6252/firefox
tcp0  0 10.121.243.241:6057674.125.232.149:https
ESTABLISHED 6252/firefox
tcp0  0 10.121.243.241:39551209.85.227.189:https
TIME_WAIT   -   
tcp0  0 10.121.243.241:4108983.233.30.55:ipsec-nat-t 
TIME_WAIT   -   
tcp0  0 10.121.243.241:39550209.85.227.189:https
TIME_WAIT   -   
tcp0  0 10.121.243.241:5275883.51.48.124:44909  
TIME_WAIT   -   
tcp0  0 127.0.0.1:52722 127.0.0.1:48856 
ESTABLISHED 6752/npviewer.bin   
tcp0  0 127.0.0.1:48856 127.0.0.1:52722 
ESTABLISHED 6767/GoogleTalkPlug 
tcp0  0 10.121.243.241:39555209.85.227.189:https
ESTABLISHED 6252/firefox
tcp0  0 10.121.243.241:3536582.56.169.37:19907  
TIME_WAIT   -   
tcp0  0 10.121.243.241:5728380.91.229.10:nntp   
ESTABLISHED 12106/knodec10783.s 
tcp0  0 10.121.243.241:4455274.125.232.150:https
ESTABLISHED 6252/firefox
tcp0  0 127.0.0.1:48856 127.0.0.1:50793 
ESTABLISHED 6767/GoogleTalkPlug 
tcp0  0 127.0.0.1:48856 127.0.0.1:57336 
ESTABLISHED 6767/GoogleTalkPlug 

2 
(xpol) %  ° cat /etc/mysqlaccess.conf | grep -v "^#"
 
~ (18:20-Sat  2) 


  #$Param{'host'} = '';
  $Param{'user'} = 'nobody';
  $Param{'db'}   = 'test';
  $Param{'password'} = 'foobar';
  $Param{'debug'}= 0;

if ($CMD) {
  $Param{'superuser'} = 'root';
  $Param{'rhost'} = 'localhost';
  $Param{'spassword'} = '';
  $Param{'brief'} = 1;
}

if ($CGI) {
  $Param{'superuser'}  = 'root';
  $Param{'rhost'}  = 'localhost';
  $Param{'spassword'}  = '';
  $Param{'table'}  = 1;
}

1;  #to make require happy

3--
(xpol) % ° cat   /etc/mysql/default_plugins.cnf 
 
~ (18:20-Sat  2) 
[server]
plugin-load=blackhole=ha_blackhole.so
plugin-load=federated=ha_federated.so
plugin-load=archive=ha_archive.so

-


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Can't connect to MySQL server on '127.0.0.1' (111)

2011-04-02 Thread Reindl Harald
please do not only post outputs, read them and try to understand
before press send - "not all processes could be identified, non-owned process
info will not be shown, you would have to be root to see it all." in
the ouptput says that all afterwards is useless

"netstat --numeric-hosts --notrim --programs -u -t -l" as ROOT on the machine
where mysql is running! alterante: "telnet 127.0.0.1 3306"

"/mnt/etc/my.cnf" is really your active mysql-config?
normally "/etc/my.cnf" is used, even if /etc/ is a own
disk/partition you should never mount it as /mnt/etc/
and managing with symlinks - mount it directly to /etc

i would assume something like "skip-networking" in your
config if connection fails

anyways this mysql-config ma contain some includes
because the line "!include_dir /etc/mysql"

Am 02.04.2011 17:36, schrieb xPol:
> Reindl Harald wrote:
> 
>> Did you make any change in the my.cnf?
>> What does "netstat --numeric-hosts --notrim --programs -u -t" say?
>> What is the content of your my.cnf?
>>
> 
> Here incluede
> 
> thank you 
> p
> 
> --
> (xpol) % netstat --numeric-hosts --notrim --programs -u -t
>
> ~ (17:32-Sat  2) 
> (Not all processes could be identified, non-owned process info
>  will not be shown, you would have to be root to see it all.)
> Active Internet connections (w/o servers)
> Proto Recv-Q Send-Q Local Address   Foreign Address State 
>   
> PID/Program name   
> tcp0  0 10.121.243.241:3831574.125.77.109:smtp  
> TIME_WAIT   -   
> tcp0  0 127.0.0.1:50793 127.0.0.1:48856 
> ESTABLISHED 6752/npviewer.bin   
> tcp0  0 127.0.0.1:57336 127.0.0.1:48856 
> ESTABLISHED 6752/npviewer.bin   
> tcp0  0 10.121.243.241:5392474.125.232.152:https
> ESTABLISHED 6252/firefox
> tcp0  0 10.121.243.241:5392574.125.232.152:https
> ESTABLISHED 6252/firefox
> tcp0  0 10.121.243.241:5389474.125.232.152:https
> ESTABLISHED 6252/firefox
> tcp0  0 10.121.243.241:35673209.85.227.189:https
> ESTABLISHED 6252/firefox
> tcp0  0 10.121.243.241:35672209.85.227.189:https
> ESTABLISHED 6252/firefox
> tcp0  0 10.121.243.241:48554209.85.149.105:www-http 
> ESTABLISHED 6252/firefox
> tcp0  0 10.121.243.241:35666209.85.227.189:https
> TIME_WAIT   -   
> tcp0  0 10.121.243.241:35667209.85.227.189:https
> TIME_WAIT   -   
> tcp0  0 10.121.243.241:5392674.125.232.152:https
> ESTABLISHED 6252/firefox
> tcp0  0 127.0.0.1:52722 127.0.0.1:48856 
> ESTABLISHED 6752/npviewer.bin   
> tcp0  0 127.0.0.1:48856 127.0.0.1:52722 
> ESTABLISHED 6767/GoogleTalkPlug 
> tcp0  0 127.0.0.1:48856 127.0.0.1:50793 
> ESTABLISHED 6767/GoogleTalkPlug 
> tcp0  0 127.0.0.1:48856 127.0.0.1:57336 
> ESTABLISHED 6767/GoogleTalkPlug 
> tcp0  0 10.121.243.241:5432480.91.229.10:nntp   
> ESTABLISHED 11402/knodeo10783.s 
> 
> ---
> (xpol) % cat /mnt/etc/my.cnf | grep -v "^#"   
> 
> ~ (17:34-Sat  2) 
> 
> [client]
> port= 3306
> socket  = /var/run/mysql/mysql.sock
> 
> 
> [mysqld]
> port= 3306
> socket  = /var/run/mysql/mysql.sock
> datadir = /var/lib/mysql
> skip-locking
> key_buffer_size = 16M
> max_allowed_packet = 1M
> table_open_cache = 64
> sort_buffer_size = 512K
> net_buffer_length = 8K
> read_buffer_size = 256K
> read_rnd_buffer_size = 512K
> myisam_sort_buffer_size = 8M
> 
> 
> log-bin=mysql-bin
> 
> binlog_format=mixed
> 
> server-id   = 1
> 
> 
> 
> 
> [safe_mysqld]
> log-error   = /var/log/mysql/mysqld.log
> socket  = /var/run/mysql/mysql.sock
> 
> !include_dir /etc/mysql
> 
> [mysqldump]
> socket  = /var/run/mysql/mysql.sock
> quick
> max_allowed_packet = 16M
> 
> [mysql]
> no-auto-rehash
> 
> [myisamchk]
> key_buffer_size = 20M
> sort_buffer_size = 20M
> read_buffer = 2M
> write_buffer = 2M
> 
> [mysqlhotcopy]
> interactive-timeout
> 
> [mysqld_multi]
> mysqld = /usr/bin/mysqld_safe
> mysqladmin = /usr/bin/mysqladmin
> log= /var/log/mysqld_multi.log
> 
> 
> 
> 
> 
> 
> -
> 
> 

-- 

Mit besten Grüßen, Reindl Harald
the lounge interactive design GmbH
A-1060 Vienna, Hofmühlgasse 17
CTO / software-development / cms-solutions
p: +43 (1) 595 3999 33, m: +43 (676) 40 221 40
icq: 154546673, http://www.thelounge.net/



signature.asc
Description: OpenPGP digital signature


Re: Can't connect to MySQL server on '127.0.0.1' (111)

2011-04-02 Thread xPol
Reindl Harald wrote:

> Did you make any change in the my.cnf?
> What does "netstat --numeric-hosts --notrim --programs -u -t" say?
> What is the content of your my.cnf?
> 

Here incluede

thank you 
p

--
(xpol) % netstat --numeric-hosts --notrim --programs -u -t  
 
~ (17:32-Sat  2) 
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address   Foreign Address State   
PID/Program name   
tcp0  0 10.121.243.241:3831574.125.77.109:smtp  
TIME_WAIT   -   
tcp0  0 127.0.0.1:50793 127.0.0.1:48856 
ESTABLISHED 6752/npviewer.bin   
tcp0  0 127.0.0.1:57336 127.0.0.1:48856 
ESTABLISHED 6752/npviewer.bin   
tcp0  0 10.121.243.241:5392474.125.232.152:https
ESTABLISHED 6252/firefox
tcp0  0 10.121.243.241:5392574.125.232.152:https
ESTABLISHED 6252/firefox
tcp0  0 10.121.243.241:5389474.125.232.152:https
ESTABLISHED 6252/firefox
tcp0  0 10.121.243.241:35673209.85.227.189:https
ESTABLISHED 6252/firefox
tcp0  0 10.121.243.241:35672209.85.227.189:https
ESTABLISHED 6252/firefox
tcp0  0 10.121.243.241:48554209.85.149.105:www-http 
ESTABLISHED 6252/firefox
tcp0  0 10.121.243.241:35666209.85.227.189:https
TIME_WAIT   -   
tcp0  0 10.121.243.241:35667209.85.227.189:https
TIME_WAIT   -   
tcp0  0 10.121.243.241:5392674.125.232.152:https
ESTABLISHED 6252/firefox
tcp0  0 127.0.0.1:52722 127.0.0.1:48856 
ESTABLISHED 6752/npviewer.bin   
tcp0  0 127.0.0.1:48856 127.0.0.1:52722 
ESTABLISHED 6767/GoogleTalkPlug 
tcp0  0 127.0.0.1:48856 127.0.0.1:50793 
ESTABLISHED 6767/GoogleTalkPlug 
tcp0  0 127.0.0.1:48856 127.0.0.1:57336 
ESTABLISHED 6767/GoogleTalkPlug 
tcp0  0 10.121.243.241:5432480.91.229.10:nntp   
ESTABLISHED 11402/knodeo10783.s 

---
(xpol) % cat /mnt/etc/my.cnf | grep -v "^#" 
  
~ (17:34-Sat  2) 

[client]
port= 3306
socket  = /var/run/mysql/mysql.sock


[mysqld]
port= 3306
socket  = /var/run/mysql/mysql.sock
datadir = /var/lib/mysql
skip-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M


log-bin=mysql-bin

binlog_format=mixed

server-id   = 1




[safe_mysqld]
log-error   = /var/log/mysql/mysqld.log
socket  = /var/run/mysql/mysql.sock

!include_dir /etc/mysql

[mysqldump]
socket  = /var/run/mysql/mysql.sock
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

[mysqld_multi]
mysqld = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin
log= /var/log/mysqld_multi.log






-


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Can't connect to MySQL server on '127.0.0.1' (111)

2011-04-02 Thread xPol
Andrew Moore wrote:

> I think you'll need to give us a bit more to go on. I presume this is a
> web based app?

yes

> 
> What have you changed? Has the MySQL daemon stopped? What have you
> changed?

from 'ps' i get 
3545  0.0  0.1 194816  3292 ?Sl   13:58   0:08 /usr/sbin/mysqld --
defaults-file=/home/xpol/.local/share/akonadi//mysql.conf --
datadir=/home/xpol/.local/share/akonadi/db_data/ --
socket=/home/xpol/.local/share/akonadi/socket-ambi.site/mysql.socket

So the demon appears to be running
I do not think mysql conf files have been changed by me 


thank you 

--p


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Can't connect to MySQL server on '127.0.0.1' (111)

2011-04-02 Thread Andrew Moore
I think you'll need to give us a bit more to go on. I presume this is a web
based app?

What have you changed? Has the MySQL daemon stopped? What have you changed?


On Sat, Apr 2, 2011 at 4:10 PM, xPol  wrote:

> I have been using my local dictionary for years, accessing from web
> browser,
> pointing to  http://localhost:9000/
>
> Probably my fault, since i have been tinkering a little with my settings.
> As
> i try to connect, i get
>  Can't connect to MySQL server on '127.0.0.1' (111)
>
> Any ideas, what to check?
>
> I am using linux/opensuse 11.4
>
> Thank you
> p
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/mysql?unsub=eroomy...@gmail.com
>
>


Re: Can't connect to MySQL server on '127.0.0.1' (111)

2011-04-02 Thread Reindl Harald
Did you make any change in the my.cnf?
What does "netstat --numeric-hosts --notrim --programs -u -t" say?
What is the content of your my.cnf?

Am 02.04.2011 17:10, schrieb xPol:
> I have been using my local dictionary for years, accessing from web browser, 
> pointing to  http://localhost:9000/
> 
> Probably my fault, since i have been tinkering a little with my settings. As 
> i try to connect, i get 
>   Can't connect to MySQL server on '127.0.0.1' (111)
> 
> Any ideas, what to check?
> 
> I am using linux/opensuse 11.4



signature.asc
Description: OpenPGP digital signature


Can't connect to MySQL server on '127.0.0.1' (111)

2011-04-02 Thread xPol
I have been using my local dictionary for years, accessing from web browser, 
pointing to  http://localhost:9000/

Probably my fault, since i have been tinkering a little with my settings. As 
i try to connect, i get 
  Can't connect to MySQL server on '127.0.0.1' (111)

Any ideas, what to check?

I am using linux/opensuse 11.4

Thank you 
p


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

2009-10-27 Thread F.A.I.Z.A.L
Hi

thanks for your reply.

i found the problem, the problem was due to maintenance activity IT team
rebooted the machine but they didn't start the mysql server after reboot.

i executed mysqld with root credit. i got the below output but still the
cursor not return to prompt

bash-2.03# /usr/local/mysql/libexec/mysqld -u root
091027 15:35:09  InnoDB: Started; log sequence number 0 625687
091027 15:35:10 [Note] /usr/local/mysql/libexec/mysqld: ready for
connections.
Version: '5.0.51-log'  socket: '/tmp/mysql.sock'  port: 3306  Source
distribution

can you verify this. is it correct.

thanks in advance..




Best Regards
Faizal S
GSM : 9840118673
Blog: http://oradbapro.blogspot.com


On Tue, Oct 27, 2009 at 12:03 PM,  wrote:

> The socket hets created when you start the server
> It might be in the mysql home dir, it might be in /var/run.
> See if its declared in my.cnf
>
>
> Sent via BlackBerry from T-Mobile
>


Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

2009-10-26 Thread lists
The socket hets created when you start the server
It might be in the mysql home dir, it might be in /var/run. 
See if its declared in my.cnf


Sent via BlackBerry from T-Mobile

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

2009-10-26 Thread F.A.I.Z.A.L
hi experts

ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2)

iam facing the above error while connecting the mysql database. i am also
checked the mysql.sock socket file is not in /tmp.

could you please help me to fix this problem. what i have to do now..

is there any way to replace the socket file from another mysql server or i
have to reinstall mysql software in this server. if re-installation from the
scratch mean what are the steps i have follow before and after installation
to safeguard the existing databases..

please provide you assistance to fix this issue..

many thanks in advance..


Best Regards
Faizal S
GSM : 9840118673
Blog: http://oradbapro.blogspot.com


Fw: mysqlcheck: Got error 202: Can't connect to local MySQL server through socket '/home/qsys/mysql-5.1.32/temp/mysql.sock'

2009-05-03 Thread michel

Sorry for the bad end of lines in the first message!




I am trying to set up MySQL on a GNU/Linux box with this script:cd 
/home/qsys

gzip -cd /home/qsys/mysql-5.1.32.tar.gz | tar xf -
mv /home/qsys/mysql-5.1.32 /home/qsys/mysql-5.1.32.source
cd /home/qsys/mysql-5.1.32.source
./configure --prefix=/home/qsys/mysql-5.1.32 \
   --with-unix-socket-path=/home/qsys/mysql-5.1.32/tmp/mysql.sock
make
make install
mkdir /home/qsys/mysql-5.1.32/var
/home/qsys/mysql-5.1.32/bin/mysql_upgrade

at this point I get mysqlcheck: Got error 202: Can't connect to local MySQL 
server through socket '/home/qsys/mysql-5.1.32/temp/mysql.sock'


I have tried:

1- adding this to configure --with-mit-threads=no and the parameter is not 
recognized as valid.
2 - 'make clean NATIVE_THREADS=yes' and 'make install clean # 
NATIVE_THREADS=YES' without it working either ... 



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



mysqlcheck: Got error 202: Can't connect to local MySQL server through socket '/home/qsys/mysql-5.1.32/temp/mysql.sock'

2009-05-03 Thread michel
I am trying to set up MySQL on a GNU/Linux box with this script:cd /home/qsys
gzip -cd /home/qsys/mysql-5.1.32.tar.gz | tar xf -
mv /home/qsys/mysql-5.1.32 /home/qsys/mysql-5.1.32.source
cd /home/qsys/mysql-5.1.32.source
./configure --prefix=/home/qsys/mysql-5.1.32 \ 
--with-unix-socket-path=/home/qsys/mysql-5.1.32/tmp/mysql.sock
make
make install
mkdir /home/qsys/mysql-5.1.32/var
/home/qsys/mysql-5.1.32/bin/mysql_upgradeat this point I get mysqlcheck: Got 
error 202: Can't connect to local MySQL server through socket 
'/home/qsys/mysql-5.1.32/temp/mysql.sock'I have tried:1- adding this to 
configure --with-mit-threads=no and the parameter is not recognized as valid.2 
- 'make clean NATIVE_THREADS=yes' and 'make install clean # NATIVE_THREADS=YES' 
withouit it working either ...


Re: Intermittent "Can't connect to MySQL server on '' (4)" (2003)" after 20+ days uptime

2008-08-18 Thread Michael Dykman
Regardless of who has implemented the network and the status of
provided monitoring tools, this has all the look and feel of
intermittent network issues.   I would run an independant network scan
(maybe nmap?) from one of the affected clients to the affected host
and I bet you will find that the same fluctuations occur on other
ports.

On Mon, Aug 18, 2008 at 3:22 PM, Sreekanth CHAVA
<[EMAIL PROTECTED]> wrote:
> HI  Pieter
>
> I  have  a  suggestion.this  might  not be  very helpful
>
> Try  to reconfigure  the connections  between  the  client  and  Mysql
> server  where  the  problem  exists.and  then try  to  notice the
>
> uptime and  logs of the  server.
>
> CHAVA
>
> On Mon, Aug 18, 2008 at 12:00 PM, Pieter de Zwart <
> [EMAIL PROTECTED]> wrote:
>
>> Greetings to all,
>>
>> I am having a weird issue with MySQL that I can't solve.  We are getting
>> intermittent client connection errors code 2003 to the database server for
>> 10mins seemingly at random, and after 20+ days of uptime. Unfortunately, I
>> have not been able to correlate these connection problems with any other
>> queries, jobs, etc, so I was hoping someone here might be able to help me
>> out.
>>
>> The problem is as follows. Seemingly at random, the master suddenly stops
>> accepting connections, and the clients return connection error 2003,
>> indicating the master did not respond in a timely manner. This goes on for
>> about 10 minutes, at which point the master starts accepting connections
>> again, without any human input. This happened at 4am on Sunday morning for
>> example, so it healed itself before I could get myself out of bed and
>> comprehend the situation, let alone connect somewhere and try and fix it.
>> We are seeing this happen about 4 or 5 times a week for the last 2 weeks,
>> and there seems to be no pattern as to the time or date. Sometimes it
>> happens twice in one day, and then disappears for 4 days. There was no
>> spike
>> in activity as far as we can tell, and the CPU and network usage were
>> stable
>> at about 2% and 4% of capacity respectively. Also, we have slow query log
>> turned on and set to 1sec, and there are no queries anywhere near the gaps
>> in connection.
>>
>> We are running MySQL 5.0.44 on a single master on its on hardware, with a
>> replication slave on a different machine. We have a write through memcached
>> setup in front my MySQL, which handles the majority of the requests, so
>> MySQL is seeing about 20 to 30 ops (select, inserts, updates) per second on
>> average. All of this is running on Amazon EC2 instances, and have dedicated
>> boxes (we are running the 64bit Large Instance, which is supposed to be a
>> dedicated virtual box with 2 CPU, 2 cores apiece and 8G of ram, with 1.5/2G
>> free.) We then have two other machines that run the front end web servers
>> running PHP 5.1.6 and load balancers, which connect to the database when
>> the
>> cache doesnt have the required information. I did not post this to the PHP
>> section since it seems like a more general issue with the server as opposed
>> to the clients.
>>
>> After the second time it happened, we switched out our AWS hardware in
>> hopes
>> that it was a hardware fluke, but to no avail. The problem reared its
>> uglyhead 3 days later.  We doubt it is the internal Amazon network since
>> the
>> external monitoring of the box continues to work and spit out information,
>> and no other box is showing similar connection symptoms. Also, all of our
>> boxes are in the same Amazon Zone, which implies that they are in the same
>> colo. This makes me think that a combination of our configuration and
>> queries are causing the trouble.
>>
>> I checked the archives, but it seems that the people who encountered this
>> error saw it during setup/configuration, and not randomly after 30 days of
>> uptime. I doubt anyone has the answer, so I was hoping someone could help
>> me
>> understand the best way to debug this problem in order to find the reason
>> for these random outages.
>>
>> Thanks in advance for any and all help!
>>
>> Pieter de Zwart
>>
>
>
>
> --
> Sreekanth CHAVA
>



-- 
 - michael dykman
 - [EMAIL PROTECTED]

 - All models are wrong. Some models are useful.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Intermittent "Can't connect to MySQL server on '' (4)" (2003)" after 20+ days uptime

2008-08-18 Thread Sreekanth CHAVA
HI  Pieter

I  have  a  suggestion.this  might  not be  very helpful

Try  to reconfigure  the connections  between  the  client  and  Mysql
server  where  the  problem  exists.and  then try  to  notice the

uptime and  logs of the  server.

CHAVA

On Mon, Aug 18, 2008 at 12:00 PM, Pieter de Zwart <
[EMAIL PROTECTED]> wrote:

> Greetings to all,
>
> I am having a weird issue with MySQL that I can't solve.  We are getting
> intermittent client connection errors code 2003 to the database server for
> 10mins seemingly at random, and after 20+ days of uptime. Unfortunately, I
> have not been able to correlate these connection problems with any other
> queries, jobs, etc, so I was hoping someone here might be able to help me
> out.
>
> The problem is as follows. Seemingly at random, the master suddenly stops
> accepting connections, and the clients return connection error 2003,
> indicating the master did not respond in a timely manner. This goes on for
> about 10 minutes, at which point the master starts accepting connections
> again, without any human input. This happened at 4am on Sunday morning for
> example, so it healed itself before I could get myself out of bed and
> comprehend the situation, let alone connect somewhere and try and fix it.
> We are seeing this happen about 4 or 5 times a week for the last 2 weeks,
> and there seems to be no pattern as to the time or date. Sometimes it
> happens twice in one day, and then disappears for 4 days. There was no
> spike
> in activity as far as we can tell, and the CPU and network usage were
> stable
> at about 2% and 4% of capacity respectively. Also, we have slow query log
> turned on and set to 1sec, and there are no queries anywhere near the gaps
> in connection.
>
> We are running MySQL 5.0.44 on a single master on its on hardware, with a
> replication slave on a different machine. We have a write through memcached
> setup in front my MySQL, which handles the majority of the requests, so
> MySQL is seeing about 20 to 30 ops (select, inserts, updates) per second on
> average. All of this is running on Amazon EC2 instances, and have dedicated
> boxes (we are running the 64bit Large Instance, which is supposed to be a
> dedicated virtual box with 2 CPU, 2 cores apiece and 8G of ram, with 1.5/2G
> free.) We then have two other machines that run the front end web servers
> running PHP 5.1.6 and load balancers, which connect to the database when
> the
> cache doesnt have the required information. I did not post this to the PHP
> section since it seems like a more general issue with the server as opposed
> to the clients.
>
> After the second time it happened, we switched out our AWS hardware in
> hopes
> that it was a hardware fluke, but to no avail. The problem reared its
> uglyhead 3 days later.  We doubt it is the internal Amazon network since
> the
> external monitoring of the box continues to work and spit out information,
> and no other box is showing similar connection symptoms. Also, all of our
> boxes are in the same Amazon Zone, which implies that they are in the same
> colo. This makes me think that a combination of our configuration and
> queries are causing the trouble.
>
> I checked the archives, but it seems that the people who encountered this
> error saw it during setup/configuration, and not randomly after 30 days of
> uptime. I doubt anyone has the answer, so I was hoping someone could help
> me
> understand the best way to debug this problem in order to find the reason
> for these random outages.
>
> Thanks in advance for any and all help!
>
> Pieter de Zwart
>



-- 
Sreekanth CHAVA


Intermittent "Can't connect to MySQL server on '' (4)" (2003)" after 20+ days uptime

2008-08-18 Thread Pieter de Zwart
Greetings to all,

I am having a weird issue with MySQL that I can't solve.  We are getting
intermittent client connection errors code 2003 to the database server for
10mins seemingly at random, and after 20+ days of uptime. Unfortunately, I
have not been able to correlate these connection problems with any other
queries, jobs, etc, so I was hoping someone here might be able to help me
out.

The problem is as follows. Seemingly at random, the master suddenly stops
accepting connections, and the clients return connection error 2003,
indicating the master did not respond in a timely manner. This goes on for
about 10 minutes, at which point the master starts accepting connections
again, without any human input. This happened at 4am on Sunday morning for
example, so it healed itself before I could get myself out of bed and
comprehend the situation, let alone connect somewhere and try and fix it.
We are seeing this happen about 4 or 5 times a week for the last 2 weeks,
and there seems to be no pattern as to the time or date. Sometimes it
happens twice in one day, and then disappears for 4 days. There was no spike
in activity as far as we can tell, and the CPU and network usage were stable
at about 2% and 4% of capacity respectively. Also, we have slow query log
turned on and set to 1sec, and there are no queries anywhere near the gaps
in connection.

We are running MySQL 5.0.44 on a single master on its on hardware, with a
replication slave on a different machine. We have a write through memcached
setup in front my MySQL, which handles the majority of the requests, so
MySQL is seeing about 20 to 30 ops (select, inserts, updates) per second on
average. All of this is running on Amazon EC2 instances, and have dedicated
boxes (we are running the 64bit Large Instance, which is supposed to be a
dedicated virtual box with 2 CPU, 2 cores apiece and 8G of ram, with 1.5/2G
free.) We then have two other machines that run the front end web servers
running PHP 5.1.6 and load balancers, which connect to the database when the
cache doesnt have the required information. I did not post this to the PHP
section since it seems like a more general issue with the server as opposed
to the clients.

After the second time it happened, we switched out our AWS hardware in hopes
that it was a hardware fluke, but to no avail. The problem reared its
uglyhead 3 days later.  We doubt it is the internal Amazon network since the
external monitoring of the box continues to work and spit out information,
and no other box is showing similar connection symptoms. Also, all of our
boxes are in the same Amazon Zone, which implies that they are in the same
colo. This makes me think that a combination of our configuration and
queries are causing the trouble.

I checked the archives, but it seems that the people who encountered this
error saw it during setup/configuration, and not randomly after 30 days of
uptime. I doubt anyone has the answer, so I was hoping someone could help me
understand the best way to debug this problem in order to find the reason
for these random outages.

Thanks in advance for any and all help!

Pieter de Zwart


Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)

2008-04-06 Thread Moon's Father
Make sure your mysqld is running

On Fri, Apr 4, 2008 at 3:24 AM, Joerg Bruehe <[EMAIL PROTECTED]> wrote:

> Hi,
>
>
> Vidal Garza wrote:
>
> > [[...]]
> >
> > I have a cuestion, where do you find the system header files error
> > number (61)?
> >
>
> I do that brute-force:
>
>  #! /bin/sh
>  #
>  # FGIN  shell script to use "fgrep" on all "/usr/include/h"
> files
>  #
>  # $1, $2, ...   options and arguments given to "fgrep"
>  #
>  # Simple example:
>  #FGIN seteuid   return the line(s) in system header files where
>  #   'seteuid()' is defined or otherwise mentioned.
>  #
>  # 2004-09-13  Joerg Bruehe  Initial "published" version
>
>  find /usr/include -follow -name '*.h' -print | xargs fgrep -n $*
>
> This should work regardless of nested includes.
>
> It is meant for any system definition, not just for error numbers, that's
> why I do not restrict the list of file names.
>
>
> If you are looking for an error number (as opposed to an identifier), you
> may want to filter the output a bit, depending on your system's conventions
> (example from LinuX):
>
> The line you target for is
>  #define ECONNREFUSED111 /* Connection refused */
> but all you have is the 111 (the number).
>
> 1) "grep -n" in the script makes it write the line number, so you can
> filter for  : # define (tab or blank, any number) E
>  FGIN 111 | grep ':#define[]*E'
> (the square bracket contains a blank and a tab).
> On my system, this brings the output down from 926 lines (the 111 matches
> a postal code in the GPL comment !) to 9 lines.
>
> 2) If you are searching for error numbers, it is highly likely that the
> file name contains "err":
>  FGIN 111 | grep '^[^:]*err'
> (string "err" before the first colon). This returns 11 lines for me.
>
> 3) Combine the two, and it is only one hit (for me):
>  FGIN 111 | grep ':#define[  ]*E' | grep '^[^:]*err'
>
> Try on your system, using 61.
>
>
> HTH,
> Joerg
>
> --
> Joerg Bruehe, Senior Production Engineer
> MySQL AB, www.mysql.com
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
>
>


-- 
I'm a mysql DBA in china.
More about me just visit here:
http://yueliangdao0608.cublog.cn


Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)

2008-04-03 Thread Joerg Bruehe

Hi,


Vidal Garza wrote:

[[...]]

I have a cuestion, where do you find the system header files error 
number (61)?


I do that brute-force:

  #! /bin/sh
  #
  # FGIN  shell script to use "fgrep" on all 
"/usr/include/h" files

  #
  # $1, $2, ...   options and arguments given to "fgrep"
  #
  # Simple example:
  #FGIN seteuid   return the line(s) in system header files where
  #   'seteuid()' is defined or otherwise mentioned.
  #
  # 2004-09-13  Joerg Bruehe  Initial "published" version

  find /usr/include -follow -name '*.h' -print | xargs fgrep -n $*

This should work regardless of nested includes.

It is meant for any system definition, not just for error numbers, 
that's why I do not restrict the list of file names.



If you are looking for an error number (as opposed to an identifier), 
you may want to filter the output a bit, depending on your system's 
conventions (example from LinuX):


The line you target for is
  #define ECONNREFUSED111 /* Connection refused */
but all you have is the 111 (the number).

1) "grep -n" in the script makes it write the line number, so you can 
filter for  : # define (tab or blank, any number) E

  FGIN 111 | grep ':#define[]*E'
(the square bracket contains a blank and a tab).
On my system, this brings the output down from 926 lines (the 111 
matches a postal code in the GPL comment !) to 9 lines.


2) If you are searching for error numbers, it is highly likely that the 
file name contains "err":

  FGIN 111 | grep '^[^:]*err'
(string "err" before the first colon). This returns 11 lines for me.

3) Combine the two, and it is only one hit (for me):
  FGIN 111 | grep ':#define[  ]*E' | grep '^[^:]*err'

Try on your system, using 61.


HTH,
Joerg

--
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)

2008-04-03 Thread Vidal Garza

Krishna Chandra Prajapati escribió:

Just try mysqladmin ping that whether mysql is working or not

Krishna

On Thu, Apr 3, 2008 at 5:45 AM, Vidal Garza <[EMAIL PROTECTED]> wrote:

  

Hi...
I need test mysql connections but i have a problem...

freebsd# uname -a
FreeBSD freebsd.aduanet.net 6.3-RELEASE FreeBSD 6.3-RELEASE #0: Wed Jan 16
04:18:52 UTC 2008 [EMAIL PROTECTED] :/usr/obj/usr/src/sys/GENERIC i386
freebsd# mysql --version
mysql Ver 14.12 Distrib 5.0.51a, for portbld-freebsd6.3 (i386) using 5.2



I read, the connect information, but i dont find the answer...
I change the connection metod script.
I set

#!/bin/sh
...
/usr/local/bin/mysql -h 127.0.0.1 -u root -pmypassword MYDB -e "$query"
...

the -h option but i have a another message error...

...
...
ERRORERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (60)
ERROR 2003 (HY000) 2003 (HY000): Can't connect to MySQL server on 
'127.0.0.1' (60)

ERROR: Can't connect to MySQL server on '127.0.0.1' (60)
2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (60)
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (60)
ERRORERRORERRORERROR 2003 (HY000) 2003 (HY000) 2003 (HY000) 2003 
(HY000): Can't connect to MySQL server on '127.0.0.1' (60)

: Can't connect to MySQL server on '127.0.0.1' (60)
...

There arent message on the systems logs  and mysql logs...

With a shell i test mysql with ping
...
[ Thu Apr  3 11:11:53 CST 2008 ] mysqld is alive
[ Thu Apr  3 11:12:35 CST 2008 ] mysqld is alive
...

I have a cuestion, where do you find the system header files error 
number (61)?




--

Ing. Vidal Garza Tirado
Depto. Sistemas
Aduanet S.A. de C.V.
Tel. (867)711-5850 ext. 4346, Fax (867)711-5855.
Ave. César López de Lara No. 3603 Int. B Col Jardín.
Nuevo Laredo, Tamaulipas, México. 




--
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que está limpio.
For all your IT requirements visit: http://www.aduanet.net


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)

2008-04-03 Thread Joerg Bruehe

Hi Vidal, all !


Vidal Garza wrote:

Hi...
I need test mysql connections but i have a problem...

freebsd# uname -a
FreeBSD freebsd.aduanet.net 6.3-RELEASE FreeBSD 6.3-RELEASE #0: Wed Jan 
16 04:18:52 UTC 2008 [EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]>:/usr/obj/usr/src/sys/GENERIC i386

freebsd# mysql --version
mysql Ver 14.12 Distrib 5.0.51a, for portbld-freebsd6.3 (i386) using 5.2
[[...]]


but it return error on the screen like and this its my PROBLEM! I would 
like that all connections finish ok. The errors not apear on mysql_error 
file.


: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
'/tmp/mysql.sock' (61)

[[...]]


That 61 is not for decorative purposes, it has a significance.

Search your system header files for the error number 61, it should be 
ECONNREFUSED ("Connection refused").


Then, check your FreeBSD documentation for the possible reasons of this 
error number.  This might give you a hint.  On the machine I can access 
(FreeBSD 6.0), "man connect" contains this:


  ERRORS
   The connect() system call fails if:
   [[...]]
   [ECONNREFUSED] The attempt to connect was forcefully rejected.

I did not check other calls whether they might return ECONNREFUSED.

At the moment, I am at a loss what might cause this reply.
Sadly, Stevens ("Advanced Programming in the Unix Environment") does not 
describe it, rather refers to his "Unix Network Programming" (which I do 
not have).

I propose you consult Google or some other search engine.


Your attempt to change the socket owner was bound to fail, IMO, because 
a permission problem would have produced a different error number 
(typically, EACCESS).



HTH,
Jörg

--
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)

2008-04-02 Thread Krishna Chandra Prajapati
Just try mysqladmin ping that whether mysql is working or not

Krishna

On Thu, Apr 3, 2008 at 5:45 AM, Vidal Garza <[EMAIL PROTECTED]> wrote:

> Hi...
> I need test mysql connections but i have a problem...
>
> freebsd# uname -a
> FreeBSD freebsd.aduanet.net 6.3-RELEASE FreeBSD 6.3-RELEASE #0: Wed Jan 16
> 04:18:52 UTC 2008 [EMAIL PROTECTED]  [EMAIL PROTECTED]>:/usr/obj/usr/src/sys/GENERIC i386
> freebsd# mysql --version
> mysql Ver 14.12 Distrib 5.0.51a, for portbld-freebsd6.3 (i386) using 5.2
> freebsd# more /var/db/mysql/my.cnf
> [CLIENT]
> port = 3306
> socket = /tmp/mysql.sock
> [MYSQLD]
> port = 3306
> ndbcluster
> socket = /tmp/mysql.sock
> query_cache_type = 1
> query_cache_size = 26214400
> ndb-connectstring=192.168.6.1
> max_user_connections = 500
> max_connections = 3000
> max_connect_errors = 10
> table_cache = 2048
> thread_cache_size = 500
> # log-bin=/usr/local/etc/mysql/log-binario.txt
> [MYSQL_CLUSTER]
> ndb-connectstring=192.168.6.1
> freebsd#
>
> on the script i have...
>
> cnt=0
> while true; do
> query="insert into Mytable values('99','`date +%d-%H:%M`','$cnt');"
> /usr/local/bin/mysql -u root -ppasswd -e "$query" MYDB >/dev/null
> if [ $cnt -eq 99 ];then
> break
> else
> cnt=`expr $cnt "+" 1`
> fi
> done
>
>
> but it return error on the screen like and this its my PROBLEM! I would
> like that all connections finish ok. The errors not apear on mysql_error
> file.
>
> : Can't connect to local MySQL server through socket '/tmp/mysql.sock'
> (61)
> ERROR 2002 (HY000): Can't connect to local MySQL server through socket
> '/tmp/mysql.sock' (61)
> ERROR 2002 (HY000): Can't connect to local MySQL server through socket
> '/tmp/mysql.sock' (61)
> ERROR 2002 (HY000): Can't connect to local MySQL server through socket
> '/tmp/mysql.sock' (61)
> ERRORERROR 2002 (HY000) 2002 (HY000): Can't connect to local MySQL server
> through socket '/tmp/mysql.sock' (61)
> : Can't connect to local MySQL server through socket '/tmp/mysql.sock'
> (61)
> ERROR 2002 (HY000): Can't connect to local MySQL server through socket
> '/tmp/mysql.sock' (61)
> ERROR 2002 (HY000): Can't connect to local MySQL server through socket
> '/tmp/mysql.sock' (61)
> ERROR 2002 (HY000): Can't connect to local MySQL server through socket
> '/tmp/mysql.sock' (61)
> ERRORERROR 2002 (HY000) 2002 (HY000): Can't connect to local MySQL server
> through socket '/tmp/mysql.sock' (61)
> : Can't connect to local MySQL server through socket '/tmp/mysql.sock'
> (61)
> ERRORERROR 2002 (HY000) 2002 (HY000): Can't connect to local MySQL server
> through socket '/tmp/mysql.sock' (61)
> : Can't connect to local MySQL server through socket '/tmp/mysql.sock'
> (61)
> ERROR 2002 (HY000)ERROR: Can't connect to local MySQL server through
> socket '/tmp/mysql.sock' (61)
>
>
> The file mysql.sock exist...
> freebsd# ll /tmp
> total 10
> drwxrwxrwt 2 root wheel 512 Mar 13 04:00 .ICE-unix
> drwxrwxrwt 2 root wheel 512 Mar 13 04:00 .X11-unix
> drwxrwxrwt 2 root wheel 512 Mar 13 04:00 .XIM-unix
> drwxrwxrwt 2 root wheel 512 Mar 13 04:00 .font-unix
> drwxrwxr-x 2 root operator 512 Mar 10 06:44 .snap
> srwxrwxrwx 1 mysql wheel 0 Apr 2 16:04 mysql.sock
> freebsd#
>
> i change the owner but nothing
> freebsd# ll /tmp/mysql.sock
> srwxrwxrwx 1 mysql mysql 0 Apr 2 16:04 /tmp/mysql.sock
> freebsd#
>
> the Mysql its up
> freebsd# ps awx | grep mysqld
> 25121 p2 S 1:21.87 [mysqld]
> freebsd#
>
> When i connect to mysql it show me error
> ERROR 2002 (HY000): Can't connect to local MySQL server through socket
> '/tmp/mysql.sock' (61)
>
> but i try again and i in
>
>
> mysql> show status like 'Thre%';
> +---+---+
> | Variable_name | Value |
> +---+---+
> | Threads_cached | 94 |
> | Threads_connected | 26 |
> | Threads_created | 120 |
> | Threads_running | 3 |
> +---+---+
> 4 rows in set (0.14 sec)
>
> mysql>
>
> --
> 
> Ing. Vidal Garza Tirado
> Depto. Sistemas
> Aduanet S.A. de C.V.
> Tel. (867)711-5850 ext. 4346, Fax (867)711-5855.
> Ave. César López de Lara No. 3603 Int. B Col Jardín.
> Nuevo Laredo, Tamaulipas, México.
>
>
> --
> Este mensaje ha sido analizado por MailScanner
> en busca de virus y otros contenidos peligrosos,
> y se considera que está limpio.
> For all your IT requirements visit: http://www.aduanet.net
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
>
>


-- 
Krishna Chandra Prajapati
MySQL DBA,

Email-id: [EMAIL PROTECTED]


ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)

2008-04-02 Thread Vidal Garza

Hi...
I need test mysql connections but i have a problem...

freebsd# uname -a
FreeBSD freebsd.aduanet.net 6.3-RELEASE FreeBSD 6.3-RELEASE #0: Wed Jan 
16 04:18:52 UTC 2008 [EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]>:/usr/obj/usr/src/sys/GENERIC i386

freebsd# mysql --version
mysql Ver 14.12 Distrib 5.0.51a, for portbld-freebsd6.3 (i386) using 5.2
freebsd# more /var/db/mysql/my.cnf
[CLIENT]
port = 3306
socket = /tmp/mysql.sock
[MYSQLD]
port = 3306
ndbcluster
socket = /tmp/mysql.sock
query_cache_type = 1
query_cache_size = 26214400
ndb-connectstring=192.168.6.1
max_user_connections = 500
max_connections = 3000
max_connect_errors = 10
table_cache = 2048
thread_cache_size = 500
# log-bin=/usr/local/etc/mysql/log-binario.txt
[MYSQL_CLUSTER]
ndb-connectstring=192.168.6.1
freebsd#

on the script i have...

cnt=0
while true; do
query="insert into Mytable values('99','`date +%d-%H:%M`','$cnt');"
/usr/local/bin/mysql -u root -ppasswd -e "$query" MYDB >/dev/null
if [ $cnt -eq 99 ];then
break
else
cnt=`expr $cnt "+" 1`
fi
done


but it return error on the screen like and this its my PROBLEM! I would 
like that all connections finish ok. The errors not apear on mysql_error 
file.


: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
'/tmp/mysql.sock' (61)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
'/tmp/mysql.sock' (61)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
'/tmp/mysql.sock' (61)
ERRORERROR 2002 (HY000) 2002 (HY000): Can't connect to local MySQL 
server through socket '/tmp/mysql.sock' (61)

: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
'/tmp/mysql.sock' (61)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
'/tmp/mysql.sock' (61)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
'/tmp/mysql.sock' (61)
ERRORERROR 2002 (HY000) 2002 (HY000): Can't connect to local MySQL 
server through socket '/tmp/mysql.sock' (61)

: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)
ERRORERROR 2002 (HY000) 2002 (HY000): Can't connect to local MySQL 
server through socket '/tmp/mysql.sock' (61)

: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)
ERROR 2002 (HY000)ERROR: Can't connect to local MySQL server through 
socket '/tmp/mysql.sock' (61)



The file mysql.sock exist...
freebsd# ll /tmp
total 10
drwxrwxrwt 2 root wheel 512 Mar 13 04:00 .ICE-unix
drwxrwxrwt 2 root wheel 512 Mar 13 04:00 .X11-unix
drwxrwxrwt 2 root wheel 512 Mar 13 04:00 .XIM-unix
drwxrwxrwt 2 root wheel 512 Mar 13 04:00 .font-unix
drwxrwxr-x 2 root operator 512 Mar 10 06:44 .snap
srwxrwxrwx 1 mysql wheel 0 Apr 2 16:04 mysql.sock
freebsd#

i change the owner but nothing
freebsd# ll /tmp/mysql.sock
srwxrwxrwx 1 mysql mysql 0 Apr 2 16:04 /tmp/mysql.sock
freebsd#

the Mysql its up
freebsd# ps awx | grep mysqld
25121 p2 S 1:21.87 [mysqld]
freebsd#

When i connect to mysql it show me error
ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
'/tmp/mysql.sock' (61)


but i try again and i in


mysql> show status like 'Thre%';
+---+---+
| Variable_name | Value |
+---+---+
| Threads_cached | 94 |
| Threads_connected | 26 |
| Threads_created | 120 |
| Threads_running | 3 |
+---+---+
4 rows in set (0.14 sec)

mysql>

--

Ing. Vidal Garza Tirado
Depto. Sistemas
Aduanet S.A. de C.V.
Tel. (867)711-5850 ext. 4346, Fax (867)711-5855.
Ave. César López de Lara No. 3603 Int. B Col Jardín.
Nuevo Laredo, Tamaulipas, México. 




--
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que está limpio.
For all your IT requirements visit: http://www.aduanet.net


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: ERROR 2002 (HY000): Can't connect to local MySQL server

2007-06-20 Thread Michael Cole
Try to look under the directory 

/var/lib/mysql/

You will need to be root or mysql user.

the other option is to use locate and type the file name

locate mysql.sock

If it does not find it try to update the db it uses.

updatedb



On Wednesday 20 June 2007 00:55:15 John Mancuso wrote:
> I would try my best to find a way to login as root or maybe user mysql.

>
>
> John Mancuso
> Linux Administrator/MySQL DBA
> IT Infrastructure
> American Home Mortgage
> w: 631-622-6382
> c: 516-652-2475
>
> -Original Message-
> From: Ahamarshan jn [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 19, 2007 12:48 PM
> To: John Mancuso
> Subject: RE: ERROR 2002 (HY000): Can't connect to local MySQL server
>
>  mysqld_safe
> Starting mysqld daemon with databases from /var/lib/mysql STOPPING
> server from pid file /var/run/mysqld/mysqld.pid
> 070619 17:40:10  mysqld ended
>
> --- John Mancuso <[EMAIL PROTECTED]> wrote:
> Hiya,
>  These are the outputs i get when using mysqld_safe --console as root
> mysqld_safe --console Starting mysqld daemon with databases from
> /var/lib/mysql STOPPING server from pid file /var/run/mysqld/mysqld.pid
> 070619 17:45:48  mysqld ended
>
>
> as user
> [EMAIL PROTECTED] mysql]$ mysqld_safe --console
> Starting mysqld daemon with databases from
> /var/lib/mysql
> /usr/bin/mysqld_safe: line 363:
> /var/log/mysqld/mysqld.log: Permission denied
> rm: cannot remove `:
> Permission denied
> /usr/bin/mysqld_safe: line 371:
> /var/log/mysqld/mysqld.log: Permission denied
> STOPPING server from pid file
> /var/run/mysqld/mysqld.pid
> tee: /var/log/mysqld/mysqld.log: Permission denied
> 070619 17:46:52  mysqld ended
> tee: /var/log/mysqld/mysqld.log: Permission denied
>
> I could not locate the logdirectory, any pointers to
> this please?
> - ash#
>
> > Start mysqld_safe with --console OR
> > --error-log=//errlog.err
> >
> > --console will print your errors to the screen
> >
> > ./mysqld_safe --console
> >
> > John Mancuso
> > Linux Administrator/MySQL DBA
> > IT Infrastructure
> > American Home Mortgage
> > w: 631-622-6382
> > c: 516-652-2475
> >
> > -Original Message-
> > From: Ahamarshan jn [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, June 19, 2007 12:25 PM
> > To: John Mancuso
> > Subject: RE: ERROR 2002 (HY000): Can't connect to
> > local MySQL server
> >
> > Hiya,
> >  I could not find .err file anywhere.
> > and my mysql.sock file is showing 0 bytes in it.
> > - ash#
> >
> > --- John Mancuso <[EMAIL PROTECTED]>
> >
> > wrote:
> > > Have you looked in your mysql error log in your
> >
> > data directory? Check
> >
> > > //.err
> > >
> > > FYI- the locate command needs to be updated. It
> >
> > can show old info if
> >
> > > you don't run updatedb frequently
> > >
> > >
> > > John Mancuso
> > > Linux Administrator/MySQL DBA
> > > IT Infrastructure
> > > American Home Mortgage
> > > w: 631-622-6382
> > > c: 516-652-2475
> > >
> > > -Original Message-
> > > From: Ahamarshan jn [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, June 19, 2007 11:54 AM
> > > To: mysql@lists.mysql.com
> > > Subject: ERROR 2002 (HY000): Can't connect to
> >
> > local MySQL server
> >
> > > Hi,
> > >  I was appending Grant previledges to some
> >
> > databases in mysql; either
> >
> > > i typed something wrong or there is a bug which I
> >
> > am uncertain about,
> >
> > > but what happened was I could not login as su
> >
> > anymore. I then solved
> >
> > > this problem by changing grp (chgrp) permission in
> >
> > /bin/su and it
> >
> > > works fine.
> > >
> > > However I could not connect to mysql again
> > >
> > > When I start mysql I get the following error $
> >
> > mysql ERROR 2002
> >
> > > (HY000):
> > > Can't connect to local MySQL server through socket
> > >
> > > '/var/lib/mysql/mysql.sock'
> > > (111)
> > >
> > > I could not start nor stop any running mysql I
> >
> > tried to reboot my
> >
> > > system hoping that the process will terminate and
> >
> > restart fresh but
> >
> > > during shutdown I see the message that mysql
> >
> > shutdown failed. Upon
> >
> > > booting again I could not 

RE: ERROR 2002 (HY000): Can't connect to local MySQL server

2007-06-19 Thread John Mancuso
I would try my best to find a way to login as root or maybe user mysql. 


John Mancuso
Linux Administrator/MySQL DBA
IT Infrastructure
American Home Mortgage
w: 631-622-6382
c: 516-652-2475

-Original Message-
From: Ahamarshan jn [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 19, 2007 12:48 PM
To: John Mancuso
Subject: RE: ERROR 2002 (HY000): Can't connect to local MySQL server

 mysqld_safe
Starting mysqld daemon with databases from /var/lib/mysql STOPPING
server from pid file /var/run/mysqld/mysqld.pid
070619 17:40:10  mysqld ended

--- John Mancuso <[EMAIL PROTECTED]> wrote:
Hiya,
 These are the outputs i get when using mysqld_safe --console as root
mysqld_safe --console Starting mysqld daemon with databases from
/var/lib/mysql STOPPING server from pid file /var/run/mysqld/mysqld.pid
070619 17:45:48  mysqld ended


as user
[EMAIL PROTECTED] mysql]$ mysqld_safe --console
Starting mysqld daemon with databases from
/var/lib/mysql
/usr/bin/mysqld_safe: line 363:
/var/log/mysqld/mysqld.log: Permission denied
rm: cannot remove `/var/lib/mysql/mysql.sock':
Permission denied
/usr/bin/mysqld_safe: line 371:
/var/log/mysqld/mysqld.log: Permission denied
STOPPING server from pid file
/var/run/mysqld/mysqld.pid
tee: /var/log/mysqld/mysqld.log: Permission denied
070619 17:46:52  mysqld ended
tee: /var/log/mysqld/mysqld.log: Permission denied

I could not locate the logdirectory, any pointers to
this please?
- ash#





> Start mysqld_safe with --console OR
> --error-log=//errlog.err
> 
> --console will print your errors to the screen 
> 
> ./mysqld_safe --console
> 
> John Mancuso
> Linux Administrator/MySQL DBA
> IT Infrastructure
> American Home Mortgage
> w: 631-622-6382
> c: 516-652-2475
> 
> -Original Message-
> From: Ahamarshan jn [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, June 19, 2007 12:25 PM
> To: John Mancuso
> Subject: RE: ERROR 2002 (HY000): Can't connect to
> local MySQL server
> 
> Hiya,
>  I could not find .err file anywhere.
> and my mysql.sock file is showing 0 bytes in it.
> - ash#
> 
> --- John Mancuso <[EMAIL PROTECTED]>
> wrote:
> 
> > Have you looked in your mysql error log in your
> data directory? Check 
> > //.err
> > 
> > FYI- the locate command needs to be updated. It
> can show old info if 
> > you don't run updatedb frequently
> > 
> > 
> > John Mancuso
> > Linux Administrator/MySQL DBA
> > IT Infrastructure
> > American Home Mortgage
> > w: 631-622-6382
> > c: 516-652-2475
> > 
> > -Original Message-
> > From: Ahamarshan jn [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, June 19, 2007 11:54 AM
> > To: mysql@lists.mysql.com
> > Subject: ERROR 2002 (HY000): Can't connect to
> local MySQL server
> > 
> > Hi,
> >  I was appending Grant previledges to some
> databases in mysql; either 
> > i typed something wrong or there is a bug which I
> am uncertain about, 
> > but what happened was I could not login as su
> anymore. I then solved 
> > this problem by changing grp (chgrp) permission in
> /bin/su and it 
> > works fine.
> > 
> > However I could not connect to mysql again
> > 
> > When I start mysql I get the following error $
> mysql ERROR 2002 
> > (HY000):
> > Can't connect to local MySQL server through socket
> 
> > '/var/lib/mysql/mysql.sock'
> > (111)
> > 
> > I could not start nor stop any running mysql I
> tried to reboot my 
> > system hoping that the process will terminate and
> restart fresh but 
> > during shutdown I see the message that mysql
> shutdown failed. Upon 
> > booting again I could not start mysql
> > 
> > Even though it shows the file here
> > [EMAIL PROTECTED] locate mysql.sock
> > /var/lib/mysql/mysql.sock
> > 
> > the cat of my.cnf is
> > 
> > $ cat my.cnf
> > 
> > [mysqld]
> > datadir=/var/lib/mysql
> > socket=/var/lib/mysql/mysql.sock
> > 
> > # Default to using old password format for
> compatibility with old and 
> > # shorter password hash.
> > # Reference:
> >
>
http://dev.mysql.com/doc/mysql/en/Password_hashing.html
> > old_passwords=1
> > 
> > [mysql.server]
> > user=mysql
> > basedir=/var/lib
> > 
> > [mysqld_safe]
> > err-log=/var/log/mysqld/mysqld.log
> > pid-file=/var/run/mysqld/mysqld.pid
> > 
> > Also I tried to kill mysql by using PID ie kill 
> -9 'PID'
> > but each time the PID changes when i do ps
> -ax|grep mysql and it fails
> 
> > to kill mysql.
> > 
> > Can some Mysql messiah help me solve thi

RE: ERROR 2002 (HY000): Can't connect to local MySQL server

2007-06-19 Thread John Mancuso
Start mysqld_safe with --console OR
--error-log=//errlog.err

--console will print your errors to the screen 

./mysqld_safe --console

John Mancuso
Linux Administrator/MySQL DBA
IT Infrastructure
American Home Mortgage
w: 631-622-6382
c: 516-652-2475

-Original Message-
From: Ahamarshan jn [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 19, 2007 12:25 PM
To: John Mancuso
Subject: RE: ERROR 2002 (HY000): Can't connect to local MySQL server

Hiya,
 I could not find .err file anywhere.
and my mysql.sock file is showing 0 bytes in it.
- ash#

--- John Mancuso <[EMAIL PROTECTED]> wrote:

> Have you looked in your mysql error log in your data directory? Check 
> //.err
> 
> FYI- the locate command needs to be updated. It can show old info if 
> you don't run updatedb frequently
> 
> 
> John Mancuso
> Linux Administrator/MySQL DBA
> IT Infrastructure
> American Home Mortgage
> w: 631-622-6382
> c: 516-652-2475
> 
> -Original Message-
> From: Ahamarshan jn [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 19, 2007 11:54 AM
> To: mysql@lists.mysql.com
> Subject: ERROR 2002 (HY000): Can't connect to local MySQL server
> 
> Hi,
>  I was appending Grant previledges to some databases in mysql; either 
> i typed something wrong or there is a bug which I am uncertain about, 
> but what happened was I could not login as su anymore. I then solved 
> this problem by changing grp (chgrp) permission in /bin/su and it 
> works fine.
> 
> However I could not connect to mysql again
> 
> When I start mysql I get the following error $ mysql ERROR 2002 
> (HY000):
> Can't connect to local MySQL server through socket 
> '/var/lib/mysql/mysql.sock'
> (111)
> 
> I could not start nor stop any running mysql I tried to reboot my 
> system hoping that the process will terminate and restart fresh but 
> during shutdown I see the message that mysql shutdown failed. Upon 
> booting again I could not start mysql
> 
> Even though it shows the file here
> [EMAIL PROTECTED] locate mysql.sock
> /var/lib/mysql/mysql.sock
> 
> the cat of my.cnf is
> 
> $ cat my.cnf
> 
> [mysqld]
> datadir=/var/lib/mysql
> socket=/var/lib/mysql/mysql.sock
> 
> # Default to using old password format for compatibility with old and 
> # shorter password hash.
> # Reference:
>
http://dev.mysql.com/doc/mysql/en/Password_hashing.html
> old_passwords=1
> 
> [mysql.server]
> user=mysql
> basedir=/var/lib
> 
> [mysqld_safe]
> err-log=/var/log/mysqld/mysqld.log
> pid-file=/var/run/mysqld/mysqld.pid
> 
> Also I tried to kill mysql by using PID ie kill  -9 'PID'
> but each time the PID changes when i do ps -ax|grep mysql and it fails

> to kill mysql.
> 
> Can some Mysql messiah help me solve this problem.
> 
> Thank you in advance
> - ash#
> PS: I guessed it was quite a common error but when searched through 
> the list it retrived me null post, hence I am posting this.
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql To unsubscribe:
>
http://lists.mysql.com/[EMAIL PROTECTED]
> 
> 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: ERROR 2002 (HY000): Can't connect to local MySQL server

2007-06-19 Thread John Mancuso
Have you looked in your mysql error log in your data directory? Check
//.err

FYI- the locate command needs to be updated. It can show old info if you
don't run updatedb frequently


John Mancuso
Linux Administrator/MySQL DBA
IT Infrastructure
American Home Mortgage
w: 631-622-6382
c: 516-652-2475

-Original Message-
From: Ahamarshan jn [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 19, 2007 11:54 AM
To: mysql@lists.mysql.com
Subject: ERROR 2002 (HY000): Can't connect to local MySQL server

Hi,
 I was appending Grant previledges to some databases in mysql; either i
typed something wrong or there is a bug which I am uncertain about, but
what happened was I could not login as su anymore. I then solved this
problem by changing grp (chgrp) permission in /bin/su and it works fine.

However I could not connect to mysql again  

When I start mysql I get the following error $ mysql ERROR 2002 (HY000):
Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock'
(111)

I could not start nor stop any running mysql I tried to reboot my system
hoping that the process will terminate and restart fresh but during
shutdown I see the message that mysql shutdown failed. Upon booting
again I could not start mysql

Even though it shows the file here
[EMAIL PROTECTED] locate mysql.sock
/var/lib/mysql/mysql.sock

the cat of my.cnf is

$ cat my.cnf

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

# Default to using old password format for compatibility with old and #
shorter password hash.
# Reference:
http://dev.mysql.com/doc/mysql/en/Password_hashing.html
old_passwords=1

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
err-log=/var/log/mysqld/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Also I tried to kill mysql by using PID
ie kill  -9 'PID'
but each time the PID changes when i do ps -ax|grep mysql and it fails
to kill mysql.

Can some Mysql messiah help me solve this problem.

Thank you in advance
- ash#
PS: I guessed it was quite a common error but when searched through the
list it retrived me null post, hence I am posting this. 

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



ERROR 2002 (HY000): Can't connect to local MySQL server

2007-06-19 Thread Ahamarshan jn
Hi,
 I was appending Grant previledges to some databases
in mysql;
either i typed something wrong or there is a bug which
I am uncertain about, but what happened was I could
not login as su anymore. I then solved this problem by
changing grp (chgrp) permission in /bin/su and it
works fine. 
However I could not connect to mysql again  

When I start mysql I get the following error
$ mysql
ERROR 2002 (HY000): Can't connect to local MySQL
server through socket '/var/lib/mysql/mysql.sock'
(111)

I could not start nor stop any running mysql 
I tried to reboot my system hoping that the process
will terminate and restart fresh but during shutdown I
see the message that mysql shutdown failed. Upon
booting again I could not start mysql

Even though it shows the file here
[EMAIL PROTECTED] locate mysql.sock
/var/lib/mysql/mysql.sock

the cat of my.cnf is

$ cat my.cnf

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

# Default to using old password format for
compatibility with old and
# shorter password hash.
# Reference:
http://dev.mysql.com/doc/mysql/en/Password_hashing.html
old_passwords=1

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
err-log=/var/log/mysqld/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Also I tried to kill mysql by using PID
ie kill  -9 'PID'
but each time the PID changes when i do ps -ax|grep
mysql
and it fails to kill mysql.

Can some Mysql messiah help me solve this problem.

Thank you in advance
- ash#
PS: I guessed it was quite a common error but when
searched through the list it retrived me null post,
hence I am posting this. 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: error 99(?) : can't connect to MySQL server

2007-02-06 Thread Fagyal Csongor

Nils Meyer wrote:


Hi Faygal,

Fagyal Csongor wrote:


for (1..5) {
$dbh = DBI->connect($dsn, $user, $password, {'RaiseError' => 1} );
my $sth = $dbh->prepare('SELECT * FROM users');
}

I think you are simply running out of available outgoing ports with 
that. Here is some more insight on that topic:


http://www.mysqlperformanceblog.com/2006/11/12/are-php-persistent-connections-evil/ 



Don't be confused with the PHP mentioned, the first paragraphs apply 
to TCP/IP and mysql as whole.


regards
Nils


Thanks, Nils.

Actually I got to the same conclusion, too... when this error appears, there are something 
like 15000 TCP connections around, mostly in "TIME_WAIT". Too bad these 
connections linger around even after an explicit ->disconnect().

I should be using a persistent connection anyway :)

- Csongor


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: error 99(?) : can't connect to MySQL server

2007-02-06 Thread Nils Meyer

Hi Faygal,

Fagyal Csongor wrote:

for (1..5) {
$dbh = DBI->connect($dsn, $user, $password, {'RaiseError' => 1} );
my $sth = $dbh->prepare('SELECT * FROM users');
}

I think you are simply running out of available outgoing ports with 
that. Here is some more insight on that topic:


http://www.mysqlperformanceblog.com/2006/11/12/are-php-persistent-connections-evil/

Don't be confused with the PHP mentioned, the first paragraphs apply to 
TCP/IP and mysql as whole.


regards
Nils

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



error 99(?) : can't connect to MySQL server

2007-02-06 Thread Fagyal Csongor

Hi,

I have an interesting (a.k.a. frustrating) problem on MySQL 4.1.11.

I try to connect to the database via DBD::mysql. Everything works - except in a 
few cases (once in every 1 occasions, approximately) I get:

DBI connect('database=test:host=192.168.0.200','test',...) failed: Can't 
connect to MySQL server on '192.168.0.200' (99) at con.pl line 14

perror 99 gives me:
OS error code  99:  Cannot assign requested address

This doesn't make sense to me. I wrote a test script that looks like this:


for (1..5) {
$dbh = DBI->connect($dsn, $user, $password, {'RaiseError' => 1} );
my $sth = $dbh->prepare('SELECT * FROM users');
}


Periodically I get the above error.

I have tried to be more nice, after upgrading DBD and DBI, etc.:

for (1..5) {
 $dbh = DBI->connect($dsn, $user, $password, {'RaiseError' => 1} );
 my $sth = $dbh->prepare('SELECT * FROM users');
 $sth = undef;
 $dbh->disconnect;
 $dbh = undef;
}


But the same happens.


Then I straced the program. This is what I got:

restart_syscall(<... resuming interrupted call ...>) = 0
time(NULL)  = 1170758829
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
fcntl64(3, F_SETFL, O_RDONLY)   = 0
fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR)
connect(3, {sa_family=AF_INET, sin_port=htons(3306), 
sin_addr=inet_addr("192.168.0.200")}, 16) = -1 EADDRNOTAVAIL (Cannot assign 
requested address)
shutdown(3, 2 /* send and receive */)   = -1 ENOTCONN (Transport endpoint is 
not connected)
close(3)= 0
write(1, "Doesn\'t work. Reconnecting in 1 "..., 51) = 51
time(NULL)  = 1170758829
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({1, 0}, {1, 0})   = 0
time(NULL)  = 1170758830
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
fcntl64(3, F_SETFL, O_RDONLY)   = 0
fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR)
connect(3, {sa_family=AF_INET, sin_port=htons(3306), 
sin_addr=inet_addr("192.168.0.200")}, 16) = -1 EADDRNOTAVAIL (Cannot assign 
requested address)
shutdown(3, 2 /* send and receive */)   = -1 ENOTCONN (Transport endpoint is 
not connected)



Anybody seen anything like this?


- Fagzal


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: can't connect to server using mysqladmin or mysql

2006-08-01 Thread scott . anderson
I would like to withdraw my earlier bug report with the same subject
line.  I discovered that an erroneous IP address for the server
machine had gotten into /etc/hosts (due to some IP changes in my
organization). Once the DNS error was resolved, I was able to connect
correctly and fix the password problem.

I apologize for the mistake.

>Description:

>How-To-Repeat:

>Fix:


>Submitter-Id:  
>Originator:root
>Organization:
 Wellesley College Computer Science
>MySQL support: none
>Synopsis:  can't connect to server and can't reset root password
>Severity:  critical
>Priority:  high
>Category:  mysql
>Class: sw-bug
>Release:   mysql-5.0.22-standard (MySQL Community Edition - Standard (GPL))
>Server: /usr/bin/mysqladmin  Ver 8.41 Distrib 5.0.22, for pc-linux-gnu on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version  5.0.22-standard
Protocol version10
Connection  Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 56 min 0 sec

Threads: 1  Questions: 876  Slow queries: 0  Opens: 0  Flush tables: 1  Open 
tables: 64  Queries per second avg: 0.261
>C compiler:gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-52)
>C++ compiler:  gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-52)
>Environment:

System: Linux puma.wellesley.edu 2.4.21-47.ELsmp #1 SMP Wed Jul 5 20:38:41 EDT 
2006 i686 i686 i386 GNU/Linux
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man 
--infodir=/usr/share/info --enable-shared --enable-threads=posix 
--disable-checking --with-system-zlib --enable-__cxa_atexit 
--host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-56)
Compilation info: CC='gcc'  CFLAGS='-O2 -g -pipe -march=i386 -mcpu=i686'  
CXX='gcc'  CXXFLAGS='-O2 -g -pipe -march=i386 -mcpu=i686'  LDFLAGS=''  
ASFLAGS=''
LIBC: 
lrwxrwxrwx1 root root   13 Jul 25 18:20 /lib/libc.so.6 -> 
libc-2.3.2.so
-rwxr-xr-x1 root root  1512793 Jun 16 07:32 /lib/libc-2.3.2.so
-rw-r--r--1 root root  2468490 Jun 16 06:50 /usr/lib/libc.a
-rw-r--r--1 root root  204 Jun 16 06:36 /usr/lib/libc.so
Configure command: ./configure '--disable-shared' 
'--with-server-suffix=-standard' '--without-embedded-server' '--with-innodb' 
'--with-archive-storage-engine' '--without-bench' '--with-zlib-dir=bundled' 
'--with-big-tables' '--enable-assembler' '--enable-local-infile' 
'--with-mysqld-user=mysql' '--with-unix-socket-path=/var/lib/mysql/mysql.sock' 
'--with-pic' '--prefix=/' '--with-extra-charsets=complex' '--with-yassl' 
'--exec-prefix=/usr' '--libexecdir=/usr/sbin' '--libdir=/usr/lib' 
'--sysconfdir=/etc' '--datadir=/usr/share' '--localstatedir=/var/lib/mysql' 
'--infodir=/usr/share/info' '--includedir=/usr/include' 
'--mandir=/usr/share/man' '--enable-thread-safe-client' '--with-comment=MySQL 
Community Edition - Standard (GPL)' '--with-readline' 'CC=gcc' 'CFLAGS=-O2 -g 
-pipe -march=i386 -mcpu=i686' 'CXXFLAGS=-O2 -g -pipe -march=i386 -mcpu=i686' 
'CXX=gcc' 'LDFLAGS='


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



can't connect to server using mysqladmin or mysql

2006-08-01 Thread scott . anderson
>Description:

I'm sorry This is long, but it's because I've tried hard to fix this
myself; please bear with me.

Last week, for unknown reason, my root password for MySQL wasn't
working.  I may have changed it without updating the "/root/.my.cnf"
file.  So, I went to the online documentation (which is usually
excellent) and followed the instructions for resetting the password.
I first tried the one with the init-file and that didn't work, so then
I used the one where you skip the grant tables, and that didn't work
either.  I would update the mysql.user table, and I would see the
changed encrypted password, but the new password wouldn't work.

I should probably have stopped there, but seeing that there was a new,
stable version of MySQL (I was running 4.1.9), I decided to upgrade,
figuring that the instructions for setting the password would take
care of the problem.  In any event, I figured that you'd rather fix
the problem in 5.0.22.

So, I downloaded the RPM and installed it.  Here is the transcript:
# rpm -Uvh MySQL-server-standard-5.0.22-0.rhel3.i386.rpm
Preparing...### [100%]
 
Giving mysqld a couple of seconds to exit nicely
   1:MySQL-server-standard  ### [100%]
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h puma.wellesley.edu password 'new-password'
See the manual for more instructions.
 
NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!
 
Please report any problems with the /usr/bin/mysqlbug script!
 
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
/usr/bin/mysqlcheck: unknown option '--check-upgrade'
This script updates all the mysql privilege tables to be usable by
MySQL 4.0 and above.
 
This is needed if you want to use the new GRANT functions,
CREATE AGGREGATE FUNCTION, stored procedures, or
more secure passwords in 4.1
 
Got a failure from command:
cat /usr/share/mysql/mysql_fix_privilege_tables.sql | /usr/bin/mysql 
--no-defaults --force --user=mysql --host=localhost --database=mysql
Please check the above output and try again.
 
Running the script with the --verbose option may give you some information
of what went wrong.
 
If you get an 'Access denied' error, you should run this script again and
give the MySQL root user password as an argument with the --password= option
Starting MySQL.[  OK  ]

#

Following your instructions, I started the server and ran the
password-setting command.  Here's the transcript:

# service mysql start
Starting MySQL [  OK  ]
# mysqladmin -u root password 'blahblah'
mysqladmin: connect to server at 'puma' failed
error: 'Lost connection to MySQL server during query'
# ps -ef | grep mysql
root 12811 1  0 11:11 pts/000:00:00 /bin/sh /usr/bin/mysqld_safe 
--datadir=/var/lib/mysql --pid-file=/var/lib/mysql/puma.wellesley.edu.pid
mysql12832 12811  0 11:11 pts/000:00:00 /usr/sbin/mysqld --basedir=/ 
--datadir=/var/lib/mysql --user=mysql 
--pid-file=/var/lib/mysql/puma.wellesley.edu.pid --skip-locking

So, it looks like the server is running, but for some reason I can't
connect.  I've tried a bunch of other ways (such as starting it with
--skip-grant-tables) but no luck.  I've checked the error log, and
it's quite clean.  For example:

060801 11:39:31  mysqld started
060801 11:39:31  InnoDB: Started; log sequence number 0 81455176
060801 11:39:31 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.0.22-standard'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  
MySQL Community Edition - Standard (GPL)

Interestingly, if I use "nmap", it shows that port 3306 is open, but
if I try to telnet to that port, it never responds.

>How-To-Repeat:

Start mysql server in the usual way, which yields no errors, then try
something as simple as

# mysqladmin -u root ping

This will hang for a very long time (several minutes) and eventually
say:

mysqladmin: connect to server at 'puma' failed
error: 'Lost connection to MySQL server during query'

>Fix:

None that I know of.  This is a real problem for me. 

>Submitter-Id:  
>Originator:root
>Organization:
  Wellesley College Computer Science
>MySQL support: none
>Synopsis:  can't connect to server and can't reset root password
>Severity:  critical
>Priority:  high
>Category:  mysql
>Class: sw-bug
>Release:   mysql-5.0.22-

Can't connect to mysql.sock

2006-07-14 Thread Dave M G

MySQL List,

This is an issue that I am also pursuing on the PHP list, but since it 
involved my MySQL my.cnf file, and also use of MySQL sockets, I'm 
posting here in hopes of finding additional assistance.


To make a long story short, while installing Zend Studio (a PHP IDE), I 
was getting errors when trying to connect to MySQL. I finally resolved 
the problem with Zend, but, in my earlier attempts to find a solution, 
I've munged up my MySQL or PHP settings because I can no longer connect 
to MySQL from PHP.


To resolve this, I tried to retrace my steps and put everything back the 
way it was. I also reinstalled MySQL, PHP, and phpMyAdmin from the 
Ubuntu repositories using apt-get.


Despite these efforts, whatever it is that I've done to mess up my 
system remains in place.


When I start a PHP script that calls upon MySQL, I get the following error:
Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to 
local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in 
/web_sites/web/db_fns.php on line 6.


So far as I can remember, the only places I made edits were in 
/etc/php5/apache2/php.ini, and /etc/mysql/my.cnf.


In /etc/php5/apache2/php.ini, here is what the relevant section looks 
like now:


- - - - - - - - -
; Default port number for mysql_connect().  If unset, mysql_connect() 
will use

; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order).  Win32 will 
only look

; at MYSQL_PORT.
mysql.default_port = 3306

; Default socket name for local MySQL connects.  If empty, uses the built-in
; MySQL defaults.
mysql.default_socket =
- - - - - - - - -

My understanding of the above is that if the socket variable is left 
empty, it should go with the MySQL default. I have tried specifying 
"mysql.default_socket = /var/run/mysqld/mysql.sock" and 
"mysql.default_socket = /tmp/mysql.sock", but that hasn't helped.


As for /etc/mysql/my.cnf, it says:

- - - - - - - - -
[mysqld]
pid-file= /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysql.sock
- - - - - - - - -

I am unsure where to look to diagnose this problem further.

Any advice would be much appreciated.

Thank you.

--
Dave M G

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: all of a sudden can't connect to server..

2006-06-08 Thread Daniel da Veiga

On 6/8/06, Frances <[EMAIL PROTECTED]> wrote:

Daniel da Veiga wrote:
> On 6/8/06, Frances <[EMAIL PROTECTED]> wrote:
>
>> what's event viewer?  (searched google for error 1067, so opened .err
>> file, this is what is says (at the bottom, long file):
>>
>> 060607 22:37:33 [Note] mysqld: Shutdown complete
>>
>> InnoDB: Error: log file .\ib_logfile0 is of different size 0 10485760
>> bytes
>> InnoDB: than specified in the .cnf file 0 5242880 bytes!
>> 060607 22:47:57 [ERROR] Can't init databases
>> 060607 22:47:57 [ERROR] Aborting
>>
>> 060607 22:47:57 [Note] mysqld.exe: Shutdown complete
>>
>> (someone in a MySQL.com forum is also helping me, he suggested changing
>> this var in my.ini innodb_log_file_size to 20M, which I did, tried again
>> to restart, same error..  (maybe need to restart machine?  you know,
>> this is all very weird, I never had MySQL server installed as a service
>> (I think), yet never had to turn it on, never had to do anything or
>> worry about it in any way, db's were always accessible to me with no
>> problems..)
>
>
> First of all, understand how MySQL works, at init, it searches for
> configs in files that can be in numerous location of your disk, mostly
> they're named "my.cnf" or "my.ini", that if your service does not
> point at it using "--defaults-file=" on your "Services" windows
> at MySQL's service properties.
>
> Check if you find this file, it was probably ovewritten after you
> install/uninstall this other app you used, check if it has a
> configuration named "datadir" and see if it points at your "data"
> directory. It seems mysql was unable to locate its main database
> "mysql".
>
> Read the manual, the whole installation part, if you understand HOW
> mysql works you'll be all set. You really need the basis for this to
> work as we can't see or work with your system directly, only give you
> advice.

Daniel, thank you very much for your response..  this is what is says in
manual re .cnf/.ini files:


In MySQL installations prior to version 4.1.5 it was customary to name
the server configuration file 'my.cnf' or 'my.ini' and locate the file
either at 'c:\my.cnf' or 'c:\Windows\my.ini'.
The new MySQL Configuration Wizard places the 'my.ini' file in the
installation directory of the MySQL server. This helps associate
configuration files with particular server instances.


my.ini is there, but there's no .cnf file..  searched my entire C-drive
for a my.cnf file, it doesn't exist...  (so don't understand why error
message mentions .cnf file..)


Ok, so, all you have to do is edit the MySQL service adding
"--defaults-file=" and point it to a valid my.ini file with a
datadir variable set to your "data" directory, and you're set. Mysql
now is lost, it can't figure out WHERE to search for defaults.



error I'm getting is can't find my databases, but my databases are all
there, where they have always been..  ok, where do I go from here


But MySQL don't know where that is. Point it to a valid my.ini and it
will find them.


please...  (would LOVE to know why no warning comes with XAMPP saying it
can damage existing MySQL installation.. I've never had any problems


Because bad written software installers tend to do stuff like this.
I'm impressed that an app is able to simply delete a service that do
not belong to it without even asking. Reminder to never use such
software.


whatsoever w/MySQL installation, now have spent two days dealing with
this.. this really sucks..)   again, thank you for your help..


If you check the MySQL Manual at the Installation chapter, you'll find
all you need to start MySQL right. I REALLY recommend you read it and
post back later. To start, if you install MySQL by hand backin up your
current "data" dir, you'll learn a lot and probably will notice how
simple it was to solve this problem.

--
Daniel da Veiga
Computer Operator - RS - Brazil
-BEGIN GEEK CODE BLOCK-
Version: 3.1
GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
--END GEEK CODE BLOCK--

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: I can't connect to mysql server with PHP

2006-05-24 Thread gerald_clark
战芳 wrote:

>Hi! gerald_clark,
>But when I call mysql_pconnect("localhost:3306","root","root_password"),it 
>return the same error. How can I get the permission to open 
>/var/mysql/lib/mysql.sock?
>  Fang
>
>  
>
what do you get when you do
ls -l /var/mysql/lib/mysql.sock?
Permissions should be srwxrwxrwx

>
>  
>
>>fool.ben wrote:
>>
>>
>>
>>>Hi everybody!
>>>I've install a mysql server on my computer. The operating system is Redhat 
>>>fedora core 4. The version of the mysql server is 4.1.3 Beta. I wanna 
>>>connect to the server using the following statement:
>>>$db_connection=mysql_pconnect("localhost","root","");
>>>The server returned the error 2002:
>>>2002 Can't connect to local MySQL server through socket 
>>>'/var/mysql/lib/mysql.sock(13)' 
>>> 
>>>
>>>  
>>>
>>The user running the php connection does not have permissions to open
>>/var/mysql/lib/mysql.sock.
>>
>>
>>
>>>I was suggested that the server may not running, or the sockect is wrong. 
>>>But when I run the following statement, there was no error occured:
>>>localhost#/usr/local/mysql/bin/mysql -uroot& -S/var/mysql/lib/mysql.sock
>>> 
>>>
>>>  
>>>
>>Here you are root, so you have permissions.
>>
>>
>>
>>>Can anyone help me?
>>> 
>>>
>>>  
>>>
>>Fix your permissions or move your socket to a directory that is world
>>searchable.
>>
>>
>>
>>>Fang
>>> 
>>>
>>>  
>>>
>>-- 
>>MySQL General Mailing List
>>For list archives: http://lists.mysql.com/mysql
>>To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
>>
>>
>
>
>
>
>
>  
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Re: I can't connect to mysql server with PHP

2006-05-23 Thread 战芳

Hi! gerald_clark,
But when I call mysql_pconnect("localhost:3306","root","root_password"),it 
return the same error. How can I get the permission to open 
/var/mysql/lib/mysql.sock?
   Fang



>fool.ben wrote:
>
>>Hi everybody!
>>I've install a mysql server on my computer. The operating system is Redhat 
>>fedora core 4. The version of the mysql server is 4.1.3 Beta. I wanna connect 
>>to the server using the following statement:
>>$db_connection=mysql_pconnect("localhost","root","");
>>The server returned the error 2002:
>>2002 Can't connect to local MySQL server through socket 
>>'/var/mysql/lib/mysql.sock(13)' 
>>  
>>
>The user running the php connection does not have permissions to open
>/var/mysql/lib/mysql.sock.
>
>>I was suggested that the server may not running, or the sockect is wrong. But 
>>when I run the following statement, there was no error occured:
>>localhost#/usr/local/mysql/bin/mysql -uroot& -S/var/mysql/lib/mysql.sock
>>  
>>
>Here you are root, so you have permissions.
>
>>Can anyone help me?
>>  
>>
>Fix your permissions or move your socket to a directory that is world
>searchable.
>
>> 
>> Fang
>>  
>>
>
>
>-- 
>MySQL General Mailing List
>For list archives: http://lists.mysql.com/mysql
>To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: I can't connect to mysql server with PHP

2006-05-22 Thread gerald_clark
fool.ben wrote:

>Hi everybody!
>I've install a mysql server on my computer. The operating system is Redhat 
>fedora core 4. The version of the mysql server is 4.1.3 Beta. I wanna connect 
>to the server using the following statement:
>$db_connection=mysql_pconnect("localhost","root","");
>The server returned the error 2002:
>2002 Can't connect to local MySQL server through socket 
>'/var/mysql/lib/mysql.sock(13)' 
>  
>
The user running the php connection does not have permissions to open
/var/mysql/lib/mysql.sock.

>I was suggested that the server may not running, or the sockect is wrong. But 
>when I run the following statement, there was no error occured:
>localhost#/usr/local/mysql/bin/mysql -uroot& -S/var/mysql/lib/mysql.sock
>  
>
Here you are root, so you have permissions.

>Can anyone help me?
>  
>
Fix your permissions or move your socket to a directory that is world
searchable.

> 
> Fang
>  
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



I can't connect to mysql server with PHP

2006-05-22 Thread fool.ben
Hi everybody!
I've install a mysql server on my computer. The operating system is Redhat 
fedora core 4. The version of the mysql server is 4.1.3 Beta. I wanna connect 
to the server using the following statement:
$db_connection=mysql_pconnect("localhost","root","");
The server returned the error 2002:
2002 Can't connect to local MySQL server through socket 
'/var/mysql/lib/mysql.sock(13)' 
I was suggested that the server may not running, or the sockect is wrong. But 
when I run the following statement, there was no error occured:
localhost#/usr/local/mysql/bin/mysql -uroot& -S/var/mysql/lib/mysql.sock
Can anyone help me?
 
 Fang

Re: error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock'

2006-03-28 Thread mysql
On Tue, 28 Mar 2006, Áquila Chaves wrote:

> To: mysql@lists.mysql.com
> From: Áquila Chaves <[EMAIL PROTECTED]>
> Subject: error: 'Can't connect to local MySQL server through socket
> '/tmp/mysql.sock'
> 
>  - When I execute the command "mysqld_safe":  
>[EMAIL PROTECTED] mysql]# bin/mysqld_safe --user=mysql & 
>[1] 7298 [EMAIL PROTECTED] mysql]# Starting mysqld daemon 
>with databases from /var/lib/mysql /* {processing... 
>the cursor is blinking but I don't have any answer... 
>So, I press } */ [EMAIL PROTECTED] mysql]#
> 
>  - The log message is:
> 060323 16:51:11  mysqld started
> 060323 16:51:11  InnoDB: Started; log sequence number 0 43655
> 060323 16:51:11 [Note] /usr/local/mysql/bin/mysqld: ready for
> connections.
> Version: '5.0.19-standard'  socket: '/var/lib/mysql/mysql.sock'  port:
> 3306  MySQL Community Edition - Standard (GPL)

So you have got mysqld running OK, and waiting for you to 
connect to it on the socket /var/lib/mysql/mysql.sock
 
>  - Aparently it's OK. But when I execute the command below 
>occurs the following error:  [EMAIL PROTECTED] mysql]# 
>bin/mysqladmin version bin/mysqladmin: connect to 
>server at 'localhost' failed error: 'Can't connect to 
>local MySQL server through socket '/tmp/mysql.sock' 
>(2)' Check that mysqld is running and that the socket: 
>'/tmp/mysql.sock' exists!

You are trying to connect to the mysql server on a different 
socket than the one mysqld is listening on for connections.

You need to tell mysqladmin to connect to the socket that 
mysqld is listening to. In this case it is 
/var/lib/mysql/mysql.sock.

You could do this with:

/bin/mysqladmin --socket=/var/lib/mysql/mysql.sock

That should work. If you have set a password you will need 
to use that as well.

You could also set the --socket value in /etc/my.cnf by 
adding a few lines to it like this:

Note that directives in the my.cnf file are the same as on 
the command-line, but without the preceeding -- double-dash.

# /etc/my.cnf
#
# The following options will be passed to all MySQL clients

[client]
socket = /var/lib/mysql/mysql.sock
port = 3306


HTH

Keith

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock'

2006-03-28 Thread Áquila Chaves
 - When I execute the command "mysqld_safe":
[EMAIL PROTECTED] mysql]# bin/mysqld_safe --user=mysql &
[1] 7298
[EMAIL PROTECTED] mysql]# Starting mysqld daemon with databases from
/var/lib/mysql
/*  {processing... the cursor is blinking but I don't have any answer... So,
I press }  */
[EMAIL PROTECTED] mysql]#

 - The log message is:
060323 16:51:11  mysqld started
060323 16:51:11  InnoDB: Started; log sequence number 0 43655
060323 16:51:11 [Note] /usr/local/mysql/bin/mysqld: ready for
connections.
Version: '5.0.19-standard'  socket: '/var/lib/mysql/mysql.sock'  port:
3306  MySQL Community Edition - Standard (GPL)

 - Aparently it's OK. But when I execute the command below occurs the
following error:
[EMAIL PROTECTED] mysql]# bin/mysqladmin version
bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock'
exists!

 - In the log file, there isn't any new message. No Log Message was
generated.

 - Now, I kill the process and tried another command (I don't execute the
inicial command "bin/mysqld_safe –user=mysql &"). But I have the same
answer:
[EMAIL PROTECTED] mysql]# bin/mysqladmin variables
bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock'
exists!

 - No log message was generated.
 - Maybe, I have change the port that MySQL is operating. Or the command
"bin/mysqld_safe --user=mysql &" is not really starting the DB.

Maybe, I have change the port that MySQL is operating. Or the command
"bin/mysqld_safe --user=mysql &" is not really starting the DB.

Thank's


Re: APACHE 2.0 can't connect to MYSQL 5 when using PHP 5.1.2

2006-02-16 Thread mysql

First you need to make sure that you have a running mysql 
server for the client mysql program to connect to. If the 
server is not runing, you will obviously not be able to 
connect to it.

I find the following utility very helpfull - been messsing 
around with it today.

http://www.student.nada.kth.se/~f91-men/qps/

It give a graphical UI, into the running processes.

I noticed using qps, that sometimes the mysqld_safe script 
loads into memory, but does not actually load a mysqld 
process. Also, version 4.0.21 only spawns one child process, 
where 5.0.18 starts several processes in memory.

I had the RPM 5.0.18 version running, and two other seperate 
binary distro's of 5.0.18, all on different sockets and 
ports.

I've given up with using mysqld_safe to run the mysqld 
daemon. It is to unpredictable.

qps also shows all the command line arguments passed to 
mysqld, which shows at a glance which ports and sockets the daemons 
are listening on.

It is included with SuSE 9.2 pro, as an extra package. I 
think it lives on the DVD's.

You can download qps from the link above.

Keith

In theory, theory and practice are the same;
In practice they are not. 

On Thu, 16 Feb 2006, persant mpote wrote:

> To: mysql@lists.mysql.com
> From: persant mpote <[EMAIL PROTECTED]>
> Subject: APACHE 2.0 can't connect to MYSQL 5 when using PHP 5.1.2
> 
> hi,
>   since 3 days, i'm trying to connect to MYSQL 5.0.18 from 
>   php scripts using Apache et Macromedia 2004 Dreamweaver. 
>   Could someone help me doing this? Best regard.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: APACHE 2.0 can't connect to MYSQL 5 when using PHP 5.1.2

2006-02-16 Thread SGreen
persant mpote <[EMAIL PROTECTED]> wrote on 02/16/2006 10:29:37 AM:

> hi,
>   since 3 days, i'm trying to connect to MYSQL 5.0.18 from php 
> scripts using Apache et Macromedia 2004 Dreamweaver.
>   Could someone help me doing this?
>   Best regard.
> 
> 
> -
>  Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez 
> les tarifs exceptionnels pour appeler la France et l'international.
> Téléchargez la version beta.

What exactly have been the commands you have tried and what exactly were 
the error messages you received?  We can't help you until you provide us 
with more details.

Have you tried the advice in the manual?

http://dev.mysql.com/doc/refman/5.0/fr/can-not-connect-to-server.html
http://dev.mysql.com/doc/refman/5.0/fr/starting-server.html

What successes or failures have you had?

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine


APACHE 2.0 can't connect to MYSQL 5 when using PHP 5.1.2

2006-02-16 Thread persant mpote
hi,
  since 3 days, i'm trying to connect to MYSQL 5.0.18 from php scripts using 
Apache et Macromedia 2004 Dreamweaver.
  Could someone help me doing this?
  Best regard.


-
 Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs 
exceptionnels pour appeler la France et l'international.Téléchargez la version 
beta.

Re: ERROR 2003 (HY000): Can't connect to MySQL server on 'gandalf' (111)

2005-12-04 Thread Simon Garner

On 5/12/2005 11:56 a.m., Mike Smith wrote:

Hi,



Hi,


I've already check my /etc/my.cnf file for a "binding"
line.  Its not 
there.  I also found an item online that indicated

adding:



Look for the option "skip-networking". This disables TCP/IP so the 
server only accepts local connections via the Unix socket. This sounds 
like your situation.


Note that a "could not connect" error means just that. If the problem 
was related to user privileges you would get an "access denied" error.


HTH,
-Simon

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



ERROR 2003 (HY000): Can't connect to MySQL server on 'gandalf' (111)

2005-12-04 Thread Mike Smith
Hi,

I've been dealing with this problem for a week now
without resolution.
I'm running an application called mythtv which uses
mysql as its database.
I've installed mythtv and mysql dozens of times
without any problem.

I'd been running two Mandrake 10.1 systems for the
last nine months. One,
gandalf, was the mythtv backend server which also runs
mysql.  The other is
frodo, which runs the mythtfrontend ( client ) and
connects to the backend.
It must also connect to the mysql DB.
MySQL-4.0.20-3mdk.i586.rpm comes with
the Mandrake 10.1 distribution.  I don't know which
version of mysql that
equates to.

I first installed Mandrivia 2006 on the client system,
which comes with 
Mysql 4.1.2 ( MySQL-4.1.12-3mdk.i586.rpm ).  I did an
install, not an
upgrade.  I could still connect to gandalf with:

mysql -umythtv -pmythtv -hgandalf mythconverg

I then did a mysqldump on mythconverg and install
Mandrivia 2006 on 
server gandalf.  I restored the mythconverg;  Now,  I
get:

[EMAIL PROTECTED] mysql -u mythtv -pmythtv -h gandalf
mythconverg
ERROR 2003 (HY000): Can't connect to MySQL server on
'gandalf' (111)

I then tried granting privledges to mythconverg using
on the server
gandalf:

# mysql -u root mythconverg
mysql> grant all on mythconverg.* to mythtv@"%"
identified by "mythtv";
mysql> flush privileges;

Still can't connect.

I booted off the old installation and did a mysql dump
of mysql database
and did inserts of the appropriate tables, like the
user table.  Still
can't connect.

I've droped the mythconverg database, recreated a
skeleton of it, granted
the open privledges and still can not connect to it.

Another fact:  on the server gandalf,  I can connect
to the database
as localhost, but not if I specify the host:

gandalf# mysql -u mythtv -pmythtv mythconverg 
Success!!

gandalf# mysql -u mythtv -pmythtv -h gandalf
mythconvergFailure!!

gandalf# mysql -u mythtv -pmythtv -h 10.0.1.40
mythconverg Failure!!

gandalf# mysql -u mythtv -pmythtv -h 127.0.0.1
mythconverg Success!!

gandalf# mysql -u mythtv -pmythtv -h localhost
mythconverg  Success!!

I've already check my /etc/my.cnf file for a "binding"
line.  Its not 
there.  I also found an item online that indicated
adding:

skip-innodb
set-variable=thread_stack=256k

to /etc/my.cnf was needed for mysql under Mandrake. 
Still no help.


Also,  I can resolve the name/ip of both hosts from
both hosts.  I
can ping each host ( by name ) both ways.  I can ssy (
by name ) between
both hosts.

Thanks,

Mike




__ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: can't connect to the MySQL server from remote machine?

2005-12-02 Thread SGreen
That means that the MySQL server installed on the machine on which you 
issued the command is running AND that it can be connected to by the local 
loopback address (127.0.0.1). This still does not mean that you can 
connect to it from any other machine as your firewall may permit local 
(within the machine) communication but still block access from all other 
addresses.

If your server is on a different machine, substitute 127.0.0.1 with the 
actual address or DNS name of the machine you are trying to connect to 
("localhost"  CANNOT be it unless the server is on the same machine you 
are).

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Jenny Chen <[EMAIL PROTECTED]> wrote on 12/02/2005 04:28:51 PM:

> Hi,
> 
> I tried with
> "telnet localhost 3306"
> locally, and got the message as:
> 
> "Connected to localhost.localdomain (127.0.0.1).
> Escape character is '^]'.
> =
> 5.0.16-standard!QS//?.e,7~9>iw;]E!r=Connection closed by foreign host."
> 
> What is this meaning?
> 
> Thanks,
> Jenny
> 
> On 12/2/05, Fernando Antunes <[EMAIL PROTECTED]> wrote:
> >
> > To test if the 3306 is listening, try this command from client :
> >
> > telnet hostname 3306
> >
> > If MySQL return some string, it´s there and listening
> > If not, two possibilities :
> >
> >   1) A firewall between or on client and server
> >   2) MYSQL is stopped or listening in a different port.
> >
> > What is the version of your MYSQL ?
> >
> >
> > On 12/2/05, Jenny Chen <[EMAIL PROTECTED]> wrote:
> > >
> > > Yes, I did try both hostname and IP, but can't work although I can 
ping
> > > to
> > > the two boxes from each other.
> > > Just wondering if it is because of the port(3306) got disabled??
> > >
> > >
> > > Thanks,
> > > Jenny
> > >
> > >
> > >
> > >
> > > On 12/2/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > >
> > > > Jenny Chen < [EMAIL PROTECTED]> wrote on 12/02/2005 12:27:33 PM:
> > > >
> > > > > Hi,
> > > > >
> > > > > I'm trying to connect to the MySQL server on the RedHat AS 4 
from a
> > > > remote
> > > > > Solaris SPARC box. When I run the command:
> > > > >
> > > > > mysql -h HOSTNAME
> > > > >
> > > > > I got the error as
> > > > >
> > > > > ERROR 2003 (HY000): Can't connect to MySQL server on 'HOSTNAME'
> > > (145)
> > > > >
> > > > >
> > > > >
> > > > > Could anyone please explain what the mean of the error message 
and
> > > how
> > > > to
> > > > > solve it?
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Jenny
> > > >
> > > > The value after the -h must either be a valid hostname in your
> > > > organization or an IP address. If you can "ping" the server you 
want
> > > to
> > > > reach by name, that's the name to use. Otherwize use the IP 
address of
> > > the
> > > > machine you are trying to reach.
> > > >
> > > > Shawn Green
> > > > Database Administrator
> > > > Unimin Corporation - Spruce Pine
> > >
> > >
> >


Re: can't connect to the MySQL server from remote machine?

2005-12-02 Thread Jenny Chen
Hi,

I tried with
"telnet localhost 3306"
locally, and got the message as:

"Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
=
5.0.16-standard!QS//?.e,7~9>iw;]E!r=Connection closed by foreign host."

What is this meaning?

Thanks,
Jenny

On 12/2/05, Fernando Antunes <[EMAIL PROTECTED]> wrote:
>
> To test if the 3306 is listening, try this command from client :
>
> telnet hostname 3306
>
> If MySQL return some string, it´s there and listening
> If not, two possibilities :
>
>   1) A firewall between or on client and server
>   2) MYSQL is stopped or listening in a different port.
>
> What is the version of your MYSQL ?
>
>
> On 12/2/05, Jenny Chen <[EMAIL PROTECTED]> wrote:
> >
> > Yes, I did try both hostname and IP, but can't work although I can ping
> > to
> > the two boxes from each other.
> > Just wondering if it is because of the port(3306) got disabled??
> >
> >
> > Thanks,
> > Jenny
> >
> >
> >
> >
> > On 12/2/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > >
> > > Jenny Chen < [EMAIL PROTECTED]> wrote on 12/02/2005 12:27:33 PM:
> > >
> > > > Hi,
> > > >
> > > > I'm trying to connect to the MySQL server on the RedHat AS 4 from a
> > > remote
> > > > Solaris SPARC box. When I run the command:
> > > >
> > > > mysql -h HOSTNAME
> > > >
> > > > I got the error as
> > > >
> > > > ERROR 2003 (HY000): Can't connect to MySQL server on 'HOSTNAME'
> > (145)
> > > >
> > > >
> > > >
> > > > Could anyone please explain what the mean of the error message and
> > how
> > > to
> > > > solve it?
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Thanks,
> > > >
> > > > Jenny
> > >
> > > The value after the -h must either be a valid hostname in your
> > > organization or an IP address. If you can "ping" the server you want
> > to
> > > reach by name, that's the name to use. Otherwize use the IP address of
> > the
> > > machine you are trying to reach.
> > >
> > > Shawn Green
> > > Database Administrator
> > > Unimin Corporation - Spruce Pine
> >
> >
>


Re: can't connect to the MySQL server from remote machine?

2005-12-02 Thread Jenny Chen
Yes, I did try both hostname and IP, but can't work although I can ping to
the two boxes from each other.
Just wondering if it is because of the port(3306) got disabled??


Thanks,
Jenny




On 12/2/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
> Jenny Chen <[EMAIL PROTECTED]> wrote on 12/02/2005 12:27:33 PM:
>
> > Hi,
> >
> > I'm trying to connect to the MySQL server on the RedHat AS 4 from a
> remote
> > Solaris SPARC box. When I run the command:
> >
> > mysql -h HOSTNAME
> >
> > I got the error as
> >
> > ERROR 2003 (HY000): Can't connect to MySQL server on 'HOSTNAME' (145)
> >
> >
> >
> > Could anyone please explain what the mean of the error message and how
> to
> > solve it?
> >
> >
> >
> >
> >
> > Thanks,
> >
> > Jenny
>
> The value after the -h must either be a valid hostname in your
> organization or an IP address. If you can "ping" the server you want to
> reach by name, that's the name to use. Otherwize use the IP address of the
> machine you are trying to reach.
>
> Shawn Green
> Database Administrator
> Unimin Corporation - Spruce Pine


Re: can't connect to the MySQL server from remote machine?

2005-12-02 Thread SGreen
Jenny Chen <[EMAIL PROTECTED]> wrote on 12/02/2005 12:27:33 PM:

> Hi,
> 
> I'm trying to connect to the MySQL server on the RedHat AS 4 from a 
remote
> Solaris SPARC box. When I run the command:
> 
> mysql -h HOSTNAME
> 
> I got the error as
> 
> ERROR 2003 (HY000): Can't connect to MySQL server on 'HOSTNAME' (145)
> 
> 
> 
> Could anyone please explain what the mean of the error message and how 
to
> solve it?
> 
> 
> 
> 
> 
> Thanks,
> 
> Jenny

The value after the -h must either be a valid hostname in your 
organization or an IP address. If you can "ping" the server you want to 
reach by name, that's the name to use. Otherwize use the IP address of the 
machine you are trying to reach.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

can't connect to the MySQL server from remote machine?

2005-12-02 Thread Jenny Chen
Hi,

I'm trying to connect to the MySQL server on the RedHat AS 4 from a remote
Solaris SPARC box. When I run the command:

mysql -h HOSTNAME

I got the error as

ERROR 2003 (HY000): Can't connect to MySQL server on 'HOSTNAME' (145)



Could anyone please explain what the mean of the error message and how to
solve it?





Thanks,

Jenny


Re: Can't connect to MySQL v5.0.15 on 'Windows XP

2005-11-16 Thread Gleb Paharenko
Hello.



> If I try to run mysqlshow, I see:

>

>   C:\Documents and Settings\Chris>mysqlshow sql

>   mysqlshow: Access denied for user 'ODBC'@'localhost' (using

password: NO)





ODBC is default username that is used on Windows. Create a new user

account and use it to connect to the MySQL server:

  http://dev.mysql.com/doc/mysql/en/Adding_users.html



If mysql command line client works, it is rather MySQL Keeper program.

Check if you have specified the correct connection parameters for it.







[EMAIL PROTECTED] wrote:

> I've just installed MySQL v5.0.15 on my 'Windows XP system and most ways

> I want to connect to it fail. I don't see what I'm doing wrong. I've

> searched the manual, the web, and the forums without seeing anything

> that clearly addressed my problem. Help, please!

> 

> If I navigate through Programs / MySQL / MySQL Server v5.0 / MySQL

> Command Line Client, I'm prompted for a password and when I enter the

> password, I am connected and can work fine.

> 

> If I try to run mysqlshow, I see:

> 

>   C:\Documents and Settings\Chris>mysqlshow sql

>   mysqlshow: Access denied for user 'ODBC'@'localhost' (using password: NO)

> 

> If I run the command interpreter (cmd) and type "mysql -uroot -pmypwd",

> it works now but I swear it didn't 10 minutes ago. Arg.

> 

> My real problem is that I've used MySQLKeeper with MySQL v4 and have

> backups created with it that I want to restore into MySQL v5.0 and when

> I try to connect with MySQLKeeper, I get:

> 

>   CONNECT

>   Result: Connection error

> 

> Now, it may be that MySQL Keeper is trying to connect via ODBC and

> that's why it's failing but I didn't think that's how it connected, it's

> an MySQL-specific tool, why would it use ODBC? And shouldn't mysqlshow

> work "out of the box"? How could I have installed MySQL to screw up

> mysqlshow?

> 

> Thanks for any pointers.

> 

> Chris

> 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Can't connect to MySQL v5.0.15 on 'Windows XP

2005-11-16 Thread cnelson
I've just installed MySQL v5.0.15 on my 'Windows XP system and most ways
I want to connect to it fail. I don't see what I'm doing wrong. I've
searched the manual, the web, and the forums without seeing anything
that clearly addressed my problem. Help, please!

If I navigate through Programs / MySQL / MySQL Server v5.0 / MySQL
Command Line Client, I'm prompted for a password and when I enter the
password, I am connected and can work fine.

If I try to run mysqlshow, I see:

  C:\Documents and Settings\Chris>mysqlshow sql
  mysqlshow: Access denied for user 'ODBC'@'localhost' (using password: NO)

If I run the command interpreter (cmd) and type "mysql -uroot -pmypwd",
it works now but I swear it didn't 10 minutes ago. Arg.

My real problem is that I've used MySQLKeeper with MySQL v4 and have
backups created with it that I want to restore into MySQL v5.0 and when
I try to connect with MySQLKeeper, I get:

  CONNECT
  Result: Connection error

Now, it may be that MySQL Keeper is trying to connect via ODBC and
that's why it's failing but I didn't think that's how it connected, it's
an MySQL-specific tool, why would it use ODBC? And shouldn't mysqlshow
work "out of the box"? How could I have installed MySQL to screw up
mysqlshow?

Thanks for any pointers.

Chris

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: why i can't connect to the mysql server from a client pc?

2005-10-19 Thread Jigal van Hemert

zhou bin wrote:

hi,
mysql is a very goode software,so i made mysql_3.23_58 and mysql_4.1
in two of my server, and i changed the root password, but why i can't
connect to the mysql server from a client pc(use mysqlcc or any other
tools)?

the error message is:

[206] ERROR 1130: Host '218.4.**.***' is not allowed to connect to
this MySQL server


Probably user 'root' is only allowed to access MySQL from 'localhost' 
(which it should be for security reasons).


You can learn more about the privilege system and how to grand users 
access from various locations to various parts of the database at:

http://dev.mysql.com/doc/refman/5.0/en/privilege-system.html
http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html
http://dev.mysql.com/doc/refman/5.0/en/user-account-management.html
http://dev.mysql.com/doc/refman/5.0/en/account-management-sql.html
etc.

Kind regards, Jigal.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



why i can't connect to the mysql server from a client pc?

2005-10-18 Thread zhou bin
hi,
mysql is a very goode software,so i made mysql_3.23_58 and mysql_4.1
in two of my server, and i changed the root password, but why i can't
connect to the mysql server from a client pc(use mysqlcc or any other
tools)?

the error message is:

[206] ERROR 1130: Host '218.4.**.***' is not allowed to connect to
this MySQL server

please tell me what's wrong with it,how to solve this problem!


zhoubin

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Can't connect to mysql server from another windows box

2005-09-20 Thread Gerald Williams
>it sounds like you need to look at, and potentially cleanup (or make
>your mysql access entries match) what's in the inverse-map record for
>the IPnumbers of your machines.

>when you connect mysql takes the IPnumber on the inbound connection,
>looks it up in DNS and then checks the result against the access
>table(s). so, if you've put "xpbox.domain.xxx" in the access table but
>the lookup on the inbound IPnumber only returns "xpbox" (which is
>technically an invalid entry anyway) things will fail.

>so, do lookups on the IPnumbers of the client machines and see what's
>returned. that's what you want in the mysql access tables.

Flushing privileges permitted a connection from the mysql client. To get the 
ODBC
Admin 'Test Data Source' button to work, I had to create a user table entry 
with a
password hashed by Old_Password(). 

Is ipconfig /all what you mean by lookup on the IPnumbers? That gives the name 
of the client box without domain.xxx. In any event, the 'technically incorrect' 
name
did work, and adding the domain.xxx part of the name to the user record did not 
work.

Gerald Williams

>Host=name of the machine being used as a client 
> 'skip-networking' is not set on either machine.
> 
> But when ODBCAdmin (3.51) is used to create a DSN on the winxp machine
> for connecting to the mysql server on the w2k machine, clicking 'Test
> Data Source' yields this error:
> 
>Host 'XPBOX' is not allowed to connect to this MySQL server'.
> 
> (Oddly, the mysql server capitalizes the name of the winxp box. Why
> does it do that?)
> 
> Issuing the command
>telnet w2kbox 3306
> on the xpbox also produced this same error message.
> 
> This ought to be simple. What's the secret?
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]

-- End Original Message --



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Can't connect to mysql server from another windows box

2005-09-20 Thread Gerald Williams
>Note that if you set the password by directly editing (UPDATE) the 
>mysql.user table like this, you will have to run

   FLUSH PRIVILEGES;

Thank you. That solved the problem connecting from the mysql client.

It changed the problem connecting via the 'Test' button from the ODBC 
Administrator, to an 'authentication protocol' message. Apparently 
Connector/ODBC 3.51 uses the old protocol.

Gerald Williams 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Can't connect to mysql server from another windows box

2005-09-20 Thread Michael Stassen

[EMAIL PROTECTED] wrote:

Gerald Williams <[EMAIL PROTECTED]> wrote on 09/20/2005 10:49:22 AM:



MySQL 5.0.12, P2P Microsoft network

I cannot get the manual's instructions (24.1.9.6) to work for 
connecting from a mysql client on a windows machine to a mysql 
server running on another windows machine (xp and w2kpro repsectively)


The client machine can ping the server machine by name or IP address.
One each machine, a local client successfully connects to the local 
mysql server as localhost.
In mysql server on the w2k box, a client row in mysql.user has been 
created with:

  user=the exact value used in the ODBC Admin dialog
  password=the exact value used in the ODBC Admin dialog
  Host=name of the machine being used as a client 
'skip-networking' is not set on either machine.


But when ODBCAdmin (3.51) is used to create a DSN on the winxp 
machine for connecting to the mysql server on the w2k machine, 
clicking 'Test Data Source' yields this error:


  Host 'XPBOX' is not allowed to connect to this MySQL server'.

(Oddly, the mysql server capitalizes the name of the winxp box. Why 
does it do that?)


Issuing the command
  telnet w2kbox 3306
on the xpbox also produced this same error message.

This ought to be simple. What's the secret?


From your description, the mostly likely problem is that the password 
field of the user table is NOT a hashed password value. The authentication 
attempt would fail because the database is trying to compare a hashed 
password (coming from your ODBC driver) to a non-hashed value.  Use the 
PASSWORD() function to hash a plain-text password for the user so that it 
will match the authentication attempt from the driver


update mysql.user set password = PASSWORD(`password`) WHERE user = 
'odbclogin';


http://dev.mysql.com/doc/mysql/en/encryption-functions.html

A second reason could be because the MySQL ODBC driver is acting as a 
PRE-4.1 client (it is using the shorter password hashes that existed 
before v4.1). 

update mysql.user set password = OLD_PASSWORD('plaintext_of_password') 
WHERE user = 'odbclogin';


http://dev.mysql.com/doc/mysql/en/old-client.html

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine


Note that if you set the password by directly editing (UPDATE) the 
mysql.user table like this, you will have to run


  FLUSH PRIVILEGES;

afterward to make the change take effect.

Alternatively, you can set the password with

  SET PASSWORD FOR 'odbclogin'@'xpbox' = PASSWORD('odbc_pass');

or

  SET PASSWORD FOR 'odbclogin'@'xpbox' = OLD_PASSWORD('odbc_pass');

or even

  GRANT USAGE ON *.* TO 'odbclogin'xpbox'%' IDENTIFIED BY 'odbc_pass';

FLUSH PRIVILEGES is not necessary sfter any of these.  See the manual for 
the details .


Michael

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Can't connect to mysql server from another windows box

2005-09-20 Thread SGreen
Gerald Williams <[EMAIL PROTECTED]> wrote on 09/20/2005 10:49:22 AM:

> MySQL 5.0.12, P2P Microsoft network
> 
> I cannot get the manual's instructions (24.1.9.6) to work for 
> connecting from a mysql client on a windows machine to a mysql 
> server running on another windows machine (xp and w2kpro repsectively)
> 
> The client machine can ping the server machine by name or IP address.
> One each machine, a local client successfully connects to the local 
> mysql server as localhost.
> In mysql server on the w2k box, a client row in mysql.user has been 
> created with:
>user=the exact value used in the ODBC Admin dialog
>password=the exact value used in the ODBC Admin dialog
>Host=name of the machine being used as a client 
> 'skip-networking' is not set on either machine.
> 
> But when ODBCAdmin (3.51) is used to create a DSN on the winxp 
> machine for connecting to the mysql server on the w2k machine, 
> clicking 'Test Data Source' yields this error:
> 
>Host 'XPBOX' is not allowed to connect to this MySQL server'.
> 
> (Oddly, the mysql server capitalizes the name of the winxp box. Why 
> does it do that?)
> 
> Issuing the command
>telnet w2kbox 3306
> on the xpbox also produced this same error message.
> 
> This ought to be simple. What's the secret?
> 

>From your description, the mostly likely problem is that the password 
field of the user table is NOT a hashed password value. The authentication 
attempt would fail because the database is trying to compare a hashed 
password (coming from your ODBC driver) to a non-hashed value.  Use the 
PASSWORD() function to hash a plain-text password for the user so that it 
will match the authentication attempt from the driver

update mysql.user set password = PASSWORD(`password`) WHERE user = 
'odbclogin';

http://dev.mysql.com/doc/mysql/en/encryption-functions.html

A second reason could be because the MySQL ODBC driver is acting as a 
PRE-4.1 client (it is using the shorter password hashes that existed 
before v4.1). 

update mysql.user set password = OLD_PASSWORD('plaintext_of_password') 
WHERE user = 'odbclogin';

http://dev.mysql.com/doc/mysql/en/old-client.html


Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine






Can't connect to mysql server from another windows box

2005-09-20 Thread Gerald Williams
MySQL 5.0.12, P2P Microsoft network

I cannot get the manual's instructions (24.1.9.6) to work for connecting from a 
mysql client on a windows machine to a mysql server running on another windows 
machine (xp and w2kpro repsectively)

The client machine can ping the server machine by name or IP address.
One each machine, a local client successfully connects to the local mysql 
server as localhost.
In mysql server on the w2k box, a client row in mysql.user has been created 
with:
   user=the exact value used in the ODBC Admin dialog
   password=the exact value used in the ODBC Admin dialog
   Host=name of the machine being used as a client 
'skip-networking' is not set on either machine.

But when ODBCAdmin (3.51) is used to create a DSN on the winxp machine for 
connecting to the mysql server on the w2k machine, clicking 'Test Data Source' 
yields this error:

   Host 'XPBOX' is not allowed to connect to this MySQL server'.

(Oddly, the mysql server capitalizes the name of the winxp box. Why does it do 
that?)

Issuing the command
   telnet w2kbox 3306
on the xpbox also produced this same error message.

This ought to be simple. What's the secret?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)'

2005-09-13 Thread Michael Stassen

Ed Collins wrote:

Description:


I get the following  message "error: 'Can't connect to local MySQL
server through socket '/tmp/mysql.sock' (61)'"


This is the error the client gives when it cannot connect to the server, 
usually because the server isn't running.



Everything has run
fine for along time.  This is running on OS X server 10.3 and ever
since the ran the last software update mysql has not be available.


Some OS X updates in the past have incorrectly changed permissions on /tmp. 
 That's a possibility here.



 I have tried reinstalling the os x Installer package (Mac OS X
v10.3)  Standard 4.1.14 darwin 7.9.0-powerpc.dmg and that did not
help.


This shouldn't be necessary.


my .err files show the following info

050912 23:15:37  mysqld started
050912 23:15:39 Warning: Setting lower_case_table_names=2 because file
system f$
050912 23:16:16  InnoDB: Operating system error number 13 in a file
operation.


  perror 13
  OS error code  13:  Permission denied

Mysql does not have permission to access its data directory, perhaps because 
of the reinstall.



InnoDB: See http://dev.mysql.com/doc/mysql/en/InnoDB.html
InnoDB: for installation help.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
050912 23:16:19  mysqld ended



How-To-Repeat:


The problem is continuious  I have not been able to fix the problem


Fix:


None


Set correct permissions on /tmp:

  cd /tmp
  sudo chmod 1777 .

Now make sure the data directory has the correct permissions:

  cd /usr/local/mysql
  sudo chown -R mysql:mysql data

Then try to start again.


Submitter-Id:  
Originator:EdCollins
Organization:  Collins Consulting


 


MySQL support: [none |
Synopsis:  mysql server not starting up OS x 10.3 server


Michael

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)'

2005-09-13 Thread Ed Collins
>Description:
I get the following  message "error: 'Can't connect to local MySQL
server through socket '/tmp/mysql.sock' (61)'"  Everything has run
fine for along time.  This is running on OS X server 10.3 and ever
since the ran the last software update mysql has not be available.
 I have tried reinstalling the os x Installer package (Mac OS X
v10.3)  Standard 4.1.14 darwin 7.9.0-powerpc.dmg and that did not
help.

my .err files show the following info

050912 23:15:37  mysqld started
050912 23:15:39 Warning: Setting lower_case_table_names=2 because file
system f$
050912 23:16:16  InnoDB: Operating system error number 13 in a file
operation.
InnoDB: See http://dev.mysql.com/doc/mysql/en/InnoDB.html
InnoDB: for installation help.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
050912 23:16:19  mysqld ended

>How-To-Repeat:
The problem is continuious  I have not been able to fix the problem
>Fix:
None
>Submitter-Id:  
>Originator:EdCollins
>Organization:  Collins Consulting
 
>MySQL support: [none |
>Synopsis:  mysql server not starting up OS x 10.3 server



-- 
**
Ed Collins
Collins Consulting
Authorized Apple Service Provider+ (AASP+)
Authorized Hewlett Packard Sales & Service
PO Box 194
Colby, KS 67701

Phone (785) 462-8352
email: [EMAIL PROTECTED]
web: http://www.collins.net
**



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Can't connect from remote computer

2005-07-12 Thread Nuno Pereira

Probably one problems with permissions.

Salama hussein wrote:


I can't connect to Mysql from a remote computer yet I can log in fine 
locally. When I telnet from a remote computer to port 3306, I get a 
response. The response wasn't meaningful but it was a response.



Any ideas?

Salama





--
Nuno Pereira
Estagiário
Carclasse - Comércio Automóveis, S.A.
Lugar Sr. dos Perdões - Ribeirão (Famalicão)
Telf.: 252 330 550 - Tlm: 965 215 076
email: [EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Can't connect from remote computer

2005-07-12 Thread Duncan Hill
On Tuesday 12 July 2005 14:25, Salama hussein typed:
> I can't connect to Mysql from a remote computer yet I can log in fine
> locally. When I telnet from a remote computer to port 3306, I get a
> response. The response wasn't meaningful but it was a response.

Exact error message?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Can't connect from remote computer

2005-07-12 Thread Salama hussein


I can't connect to Mysql from a remote computer yet I can log in fine 
locally. When I telnet from a remote computer to port 3306, I get a 
response. The response wasn't meaningful but it was a response.



Any ideas?

Salama



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Can't connect to Local Mysql database server

2005-06-08 Thread Gleb Paharenko
Hello.



Error 2013 means: "Lost connection to MySQL server during query". See:

   http://dev.mysql.com/doc/mysql/en/gone-away.html



rtroiana wrote:





Hi All,

 >

 >

 >

 >I had posted a query few days back that I couldn't connect to mysql 

database

 >from a network machine. So for that I added two entries in my firewall

 >exceptions.

 >

 >

 >

 >I added the Port 3306 and mysqld, so firewall should allow any 

connection to

 >database from external computer. My problem was solved after adding those

 >entries. I was able to access DB server from other machines. But the 

problem

 >now is I can access the Db server from a network and not from the local

 >machine where it is installed.

 >

 >

 >

 >Whenever I try to connect I get error number 2013. I tried to connect with

 >localhost and with IP too. I even removed the two entries from firewall

 >exception and it still didn't work.

 >

 >

 >

 >I have installed Norton AntiVirus and Microsoft Spyware y'day. Does anyone

 >of these block access to Mysql.

 >

 >

 >

 >I'll appreciate any help on this problem.



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Can't connect to Local Mysql database server

2005-06-08 Thread rtroiana
Hi All,

 

I had posted a query few days back that I couldn't connect to mysql database
from a network machine. So for that I added two entries in my firewall
exceptions.

 

I added the Port 3306 and mysqld, so firewall should allow any connection to
database from external computer. My problem was solved after adding those
entries. I was able to access DB server from other machines. But the problem
now is I can access the Db server from a network and not from the local
machine where it is installed.

 

Whenever I try to connect I get error number 2013. I tried to connect with
localhost and with IP too. I even removed the two entries from firewall
exception and it still didn't work.

 

I have installed Norton AntiVirus and Microsoft Spyware y'day. Does anyone
of these block access to Mysql.

 

I'll appreciate any help on this problem.

 

Thanks,

Reema Duggal Troiana
Senior Software Developer
BitArmor Systems, Inc.
357 North Craig Street
Ground Floor
Pittsburgh, PA 15213
[TEL] 412-682-2200 Ext 314
[FAX] 412-682-2201

 



RE: 'Can't connect to local MySQL server....' error

2005-03-29 Thread bruce
after more examination, it appears that i have different versions of mysql,
installed in different locations

an #/rpm -q mysql says that i have mysql-3.23, which is the FC2 versionof
mysql.

given that i apparently have mysql files in /usr/bin, and /usr/local/bin,
i'd like to first clean out the system, so i have the mysql files in the
correct location, and then i'd like to upgrade mysql to the latest stable
mysql version...

can anyone provide pointers as to how to do this...

or, can anyone tell me how to clean up my mysql duplicates?

or, can i simply delete the mysql files under the /usr/local/bin dir, and
somehow 'point' the system to the '/usr/bin' dir for the mysql files?

it seems my environment path has both '/usr/local/bin' and '/usr/bin'. also,
how do i change the environment path??

thanks

bruce


-Original Message-
From: Tom Crimmins [mailto:[EMAIL PROTECTED]
Sent: Monday, March 28, 2005 7:54 PM
To: [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com
Subject: RE: 'Can't connect to local MySQL server' error



On Monday, March 28, 2005 21:36, bruce wrote:

> hi...
>
> a server went from RH8 to FC2. it appears that the guy who did the
> upgrade didn't perfrom any backups...
>
> i get a 'Can't connect to local MySQL server through socket...' error.
>
> i've tried to 'fix' the tables 'mysql_fix_privilege_tables' with no
> luck... i've tried to start/restart with no luck. i've lloked through
> google/mysql with no luck...
>
> any ideas as to what might be causing the problems... if i can get the
> daemon started, i'll (hopefully) be ok...

Is there anything in the error log? You could try starting it from the
command line to see what errors you get. The following will work assuming
you installed using the rpm's. Otherwise the location of mysqld and the
user may differ.

#su - mysql
#/usr/sbin/mysqld

Run this and see what errors are reported.

> thanks
>
> bruce
> [EMAIL PROTECTED]

--
Tom Crimmins
Interface Specialist
Pottawattamie County, Iowa


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



  1   2   3   4   5   >