Fw: cannot find my.cnf file
am 13.11.2009 10:50:08 von Sydney Puente
Guys,=0AThat's a great response. Thanks.=0AI have copied /usr/share/doc/MyS=
QL-server-community-5.1.39/my-huge.cnfto /etc/my.cnf and restarted.=0AHowev=
er I can no longer log on via the command line from the database box, =0A=
=0AI can still log via a remote client=0ASo I presume the problem is relate=
d to the host in the mysql.user table.=0A mysql -h localhost -u martin -p=
=0AEnter password:=0AERROR 1045 (28000): Access denied for user 'martin'@'l=
ocalhost' (using password: YES)
mysql> select host from mysql.user whe=
re user =3D 'martin';=0A+------+=0A| host |=0A+------+=0A| % |=0A+------=
+
mysql> select host from mysql.user where user =3D 'root';=0A+-------=
----+=0A| host |=0A+-----------+=0A| % |=0A| 127.0.0.1 |=0A| l=
ocalhost |=0A| object01 |=0A+-----------+
=0ASydney Puente schrieb:=
> Hello,=0A> I want to log all sql queries made against a mysql db.=
=0A> Googled and found I should add a line to my.cnf.=0A> =0A> However I ca=
nnot find a my.cnf file=0A> [root@radium init.d]# ps -ef | grep mysql=0A> r=
oot 13614 1 0 Sep24 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe=
--datadir=3D/var/lib/mysql --pid-file=3D/var/lib/mysql/object01.pid=0A> my=
sql 13669 13614 0 Sep24 ? 00:21:40 /usr/sbin/mysqld --basedir=3D=
/ --datadir=3D/var/lib/mysql --user=3Dmysql --log-error=3D/var/lib/mysql/ob=
ject01.err --pid-file=3D/var/lib/mysql/object01.pid=0A> root 23050 2274=
6 0 19:05 pts/0 00:00:00 grep mysql=0A> [root@radium init.d]# locate cn=
f=0A> /usr/share/doc/MySQL-server-community-5.1.39/my-huge.cnf=0A> /usr/sha=
re/doc/MySQL-server-community-5.1.39/my-innodb-heavy-4G.cnf= 0A> /usr/share/=
doc/MySQL-server-community-5.1.39/my-large.cnf=0A> /usr/share/doc/MySQL-ser=
ver-community-5.1.39/my-medium.cnf=0A> /usr/share/doc/MySQL-server-communit=
y-5.1.39/my-small.cnf=0A> /usr/share/man/man8/cnfsheadconf.8.gz=0A> /usr/sh=
are/man/man8/cnfsstat.8.gz=0A> /usr/share/ssl/openssl.cnf=0A> /usr/share/my=
sql/my-large.cnf=0A> /usr/share/mysql/my-huge.cnf=0A> /usr/share/mysql/my-i=
nnodb-heavy-4G.cnf=0A> /usr/share/mysql/my-medium.cnf=0A> /usr/share/mysql/=
my-small.cnf=0A> Any ideas?=0A> I might add i did not install mysql and I d=
id not start it and the guy who did is in holiday!=0A>
Systemwide con=
fig files are always in /etc/ (see: man hier).
re,=0Awh
=0A
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg
Re: Fw: cannot find my.cnf file
am 13.11.2009 11:38:47 von John Daisley
Hmmmm I wouldn't use that my-huge.cnf file unless that machine is a
dedicated mysql server with plenty of ram and even then I wouldn't use it
without modification.
Are you sure you have the password correct? A % under host is a synonym
for 'any host'.
Regards
John
> Guys,
> That's a great response. Thanks.
> I have copied /usr/share/doc/MySQL-server-community-5.1.39/my-huge.cnfto
> /etc/my.cnf and restarted.
> However I can no longer log on via the command line from the database box,
>
> I can still log via a remote client
> So I presume the problem is related to the host in the mysql.user table.
> mysql -h localhost -u martin -p
> Enter password:
> ERROR 1045 (28000): Access denied for user 'martin'@'localhost' (using
> password: YES)
>
> mysql> select host from mysql.user where user = 'martin';
> +------+
> | host |
> +------+
> | % |
> +------+
>
> mysql> select host from mysql.user where user = 'root';
> +-----------+
> | host |
> +-----------+
> | % |
> | 127.0.0.1 |
> | localhost |
> | object01 |
> +-----------+
>
>
> Sydney Puente schrieb:
>
>> Hello,
>> I want to log all sql queries made against a mysql db.
>> Googled and found I should add a line to my.cnf.
>>
>> However I cannot find a my.cnf file
>> [root@radium init.d]# ps -ef | grep mysql
>> root 13614 1 0 Sep24 ? 00:00:00 /bin/sh
>> /usr/bin/mysqld_safe --datadir=/var/lib/mysql
>> --pid-file=/var/lib/mysql/object01.pid
>> mysql 13669 13614 0 Sep24 ? 00:21:40 /usr/sbin/mysqld
>> --basedir=/ --datadir=/var/lib/mysql --user=mysql
>> --log-error=/var/lib/mysql/object01.err
>> --pid-file=/var/lib/mysql/object01.pid
>> root 23050 22746 0 19:05 pts/0 00:00:00 grep mysql
>> [root@radium init.d]# locate cnf
>> /usr/share/doc/MySQL-server-community-5.1.39/my-huge.cnf
>> /usr/share/doc/MySQL-server-community-5.1.39/my-innodb-heavy -4G.cnf
>> /usr/share/doc/MySQL-server-community-5.1.39/my-large.cnf
>> /usr/share/doc/MySQL-server-community-5.1.39/my-medium.cnf
>> /usr/share/doc/MySQL-server-community-5.1.39/my-small.cnf
>> /usr/share/man/man8/cnfsheadconf.8.gz
>> /usr/share/man/man8/cnfsstat.8.gz
>> /usr/share/ssl/openssl.cnf
>> /usr/share/mysql/my-large.cnf
>> /usr/share/mysql/my-huge.cnf
>> /usr/share/mysql/my-innodb-heavy-4G.cnf
>> /usr/share/mysql/my-medium.cnf
>> /usr/share/mysql/my-small.cnf
>> Any ideas?
>> I might add i did not install mysql and I did not start it and the guy
>> who did is in holiday!
>>
>
> Systemwide config files are always in /etc/ (see: man hier).
>
> re,
> wh
>
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=john.daisley@butterflysys tems.co.uk
>
>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org