Re: error 13

2012-10-16 Thread Lixun Peng
Hi,

What's the dir permissions?

For example, if we have a file in /a/b/file, dir a is 644, even though file
is 777, we can't access file, too.

On Wed, Oct 17, 2012 at 10:31 AM, kalin ka...@el.net wrote:



 hi all..

 this hasn't happened before...

 i'm in as root on the command line cleint. trying to load data infile
 '/path/to/file'

 file is owned by mysql and it has 777 permissions. the directory where the
 file is is also owned by mysql.

 when i do:
 mysql load data infile '/path/to/file' etc...

 i get:

 ERROR 13 (HY000): Can't get stat of '/path/to/file' (Errcode: 13)

 ls -al /path/to/file

 lists the file...

 so why do i get errcode 13?!


 i'm on os x.


 thanks...

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




-- 
Senior MySQL Developer @ Taobao.com

Mobile Phone: +86 18658156856 (Hangzhou)
Gtalk: penglixun(at)gmail.com
Twitter: http://www.twitter.com/plinux
Blog: http://www.penglixun.com


Re: Error message I am getting today. All help appreciated.

2012-10-16 Thread Lixun Peng
Hi,

What query is running? Is web server and DB server in the same server? Have
something in error.log of MySQL?

On Wed, Oct 17, 2012 at 10:32 AM, ad...@canadianinvestors.com 
ad...@canadianinvestors.com wrote:

 Hi,

 I run www.canadianinvestors.com and am getting this error message.

 Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL
 server during query in
 /var/www/domains/
 x.canadianinvestors.com/docs/common/library/db_connect.inc
 on line 15
 Lost connection to MySQL server during query

 Able to log in to the phpmyadmin database account and the script that the
 query is pointing to has the right password and appears to the untrained
 eye to be working.

 I host with myhosting.com and the site has been down for about 8 hours.

 Any and all help is appreciated.

 Yours Sincerely,

 Adrian Burridge
 CanadianInvestors.com Inc.

 
 mail2web - Check your email from the web at
 http://link.mail2web.com/mail2web



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




-- 
Senior MySQL Developer @ Taobao.com

Mobile Phone: +86 18658156856 (Hangzhou)
Gtalk: penglixun(at)gmail.com
Twitter: http://www.twitter.com/plinux
Blog: http://www.penglixun.com


Re: error 13

2012-10-16 Thread Lixun Peng
Hi,

you can switch to mysql user su - mysql, and then stat this file.
if you can't access, mysql user have not permissions.

On Wed, Oct 17, 2012 at 11:49 AM, kalin ka...@el.net wrote:




 On 10/16/12 10:49 PM, Michael Dykman wrote:

 is your mysql client on the same host as the mysql server? if not, google
 the docs for 'local infile'


 yes. my laptop.





 On 2012-10-16 10:45 PM, Lixun Peng pengli...@gmail.com wrote:

 Hi,

 What's the dir permissions?

 For example, if we have a file in /a/b/file, dir a is 644, even though
 file
 is 777, we can't access file, too.


 On Wed, Oct 17, 2012 at 10:31 AM, kalin ka...@el.net wrote:



 hi all..

 this hasn't happe...

 --
 Senior MySQL Developer @ Taobao.com

 Mobile Phone: +86 18658156856 (Hangzhou)
 Gtalk: penglixun(at)gmail.com
 Twitter: http://www.twitter.com/plinux
 Blog: http://www.penglixun.com


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




-- 
Senior MySQL Developer @ Taobao.com

Mobile Phone: +86 18658156856 (Hangzhou)
Gtalk: penglixun(at)gmail.com
Twitter: http://www.twitter.com/plinux
Blog: http://www.penglixun.com


Re: Can I measure the use of index?

2012-10-15 Thread Lixun Peng
Hi,

If you are using Percona Server, you can use this query:

SELECT DISTINCT s.table_schema,
s.table_name,
s.index_name
FROM   information_schema.statistics `s`
   LEFT JOIN information_schema.index_statistics indxs
 ON ( s.table_schema = indxs.table_schema
  AND s.table_name = indxs.table_name
  AND s.index_name = indxs.index_name )
WHERE  indxs.table_schema IS NULL
   AND s.index_name NOT IN ( 'PRIMARY' ) ;

It will display all indexes that not use.

or this query:

SELECT table_name,
   index_name,
   SUM(rows_read)
FROM   information_schema.index_statistics
GROUP  BY table_name,
  index_name;

you can get the all indexes are using.

On Tue, Oct 16, 2012 at 12:44 AM, Perrin Harkins per...@elem.com wrote:

 On Mon, Oct 15, 2012 at 11:24 AM, Carlos Eduardo Caldi
 ce_ca...@hotmail.com wrote:
  Somebody knows how can I log or measure the index use ?

 http://www.percona.com/doc/percona-toolkit/2.1/pt-index-usage.html

 - Perrin

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




-- 
Senior MySQL Developer @ Taobao.com

Mobile Phone: +86 18658156856 (Hangzhou)
Gtalk: penglixun(at)gmail.com
Twitter: http://www.twitter.com/plinux
Blog: http://www.penglixun.com