Results 1 to 5 of 5

 

Thread: MySQL - INTO OUTFILE - Access Denied

  1. #1
    Registered User

    Status
    Offline
    Join Date
    Mar 2006
    Location
    West London, UK
    Posts
    44
    Thanks
    8
    Thanked 4 Times in 4 Posts


    I'm trying to capture the results of a database query in a seperate file using 'INTO OUTFILE' but receive an 'Access denied for user user@'localhost' (using password: YES)' error when I run my script.

    Is there a work around this as I've found out a lot of host will not allow 'INTO OUTFILE'.

    I do not want to use a php include in my site as my database query has an 'ORDER BY RAND () command in it which really slows things up!

    Ideally I'd like to run the database query once a day by CRON, capture the results in another file and include that file in my site to help speed things up.

    I'm a litte stumped at the moment on how to do this as every method I have tried so far just copies my database query script which is no good for me.

  2. #2
    Typing with both fingers.

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Allt Y Coed Farm, North Pembrokeshire
    Posts
    4,123
    Thanks
    247
    Thanked 198 Times in 157 Posts
    You could capture your result and then use fopen to store the results in a local file or you could record the result in another database table.

    Ta

    Baz

  3. The Following User Says Thank You to Barry For This Useful Post:

    chessyb (03-09-09)

  4. #3
    Registered User

    Status
    Offline
    Join Date
    Mar 2006
    Location
    West London, UK
    Posts
    44
    Thanks
    8
    Thanked 4 Times in 4 Posts
    Quote Originally Posted by Barry View Post
    You could capture your result and then use fopen to store the results in a local file or you could record the result in another database table.

    Ta

    Baz
    I'll have to look into this as I've no idea how to do it, but thanks info.

  5. #4
    Registered User

    Status
    Offline
    Join Date
    Jan 2008
    Location
    Yorkshire
    Posts
    536
    Thanks
    22
    Thanked 37 Times in 31 Posts
    If I have understood correctly what you are trying to do, you could maybe output the results as an xml file and then use this xml file wherever you want

  6. The Following User Says Thank You to Andrew Starr For This Useful Post:

    chessyb (03-09-09)

  7. #5
    Registered User

    Status
    Offline
    Join Date
    Mar 2006
    Location
    West London, UK
    Posts
    44
    Thanks
    8
    Thanked 4 Times in 4 Posts
    I've managed to solve the problem by saving the results of the query as an external csv file. Thank you to Andrew and Barry for the nudge in the right direction. :tup



Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Access Denied
    By mayday3 in forum Affiliate Future
    Replies: 1
    Last Post: 16-09-08, 06:15 PM
  2. Why Access Denied?
    By ana_lee in forum Analytics
    Replies: 0
    Last Post: 30-04-08, 05:02 AM
  3. Access Denied
    By Spartacus in forum Affiliate Future
    Replies: 0
    Last Post: 22-10-07, 01:14 PM
  4. MySQL to Access
    By Fraser in forum Programming
    Replies: 5
    Last Post: 18-01-05, 11:23 AM
  5. MS Access & mySQL
    By Frostie in forum Programming
    Replies: 5
    Last Post: 04-10-03, 10:46 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
To Top

Content Relevant URLs by vBSEO 3.5.0 RC2