Jump to content

Backup and read logs


phpmo

Recommended Posts

I'm logging slow queries and all queries at times looking for various things.

 

I have this in my my.cnf

 

log_slow_queries=/var/lib/mysql/slow-queries.log

long_query_time=10

log=/var/lib/mysql/mysql_query.log

 

Then I'll logon and do a

 

cp /var/lib/mysql/slow-queries.log /home/user/logs

 

 

cp /var/lib/mysql/mysql_query.log /home/user/logs

 

It does correctly copy the file but when I try to view the file I get this.

 

Error opening slow-queries.log: Permission denied

 

 

I download the .log file to my computer and open it and get this.

 

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<HTML><HEAD>

<TITLE>401 Authorization Required</TITLE>

</HEAD><BODY>

<H1>Authorization Required</H1>

This server could not verify that you

are authorized to access the document

requested.  Either you supplied the wrong

credentials (e.g., bad password), or your

browser doesn't understand how to supply

the credentials required.<P>

<P>Additionally, a 404 Not Found

error was encountered while trying to use an ErrorDocument to handle the request.

<HR>

<ADDRESS>Apache/1.3.37 Server at www.mysite.com Port 80</ADDRESS>

</BODY></HTML>

 

 

Any ideas what I"m doing wrong? I can view the files through putty using the PICO command. This includes the copied and original versions.

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/57992-backup-and-read-logs/
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.