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
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.