#1
  1. No Profile Picture
    ads
    Guest
    Devshed Newbie (0 - 499 posts)
    Hi,
    What is the command to change permissions of mysql table?
    I am getting following error when I perform command from mysql command propmt.
    mysql> SELECT * INTO OUTFILE 'output.txt' fields terminated by '|' FROM information1;

    ERROR 1045: Access denied for user: '*****@*****.com' (Using password: YES)

    How to change access permission of information1.
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Location
    Lakewood, CO, USA
    Posts
    8
    Rep Power
    0
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by ads:
    Hi,
    What is the command to change permissions of mysql table?
    I am getting following error when I perform command from mysql command propmt.
    mysql> SELECT * INTO OUTFILE 'output.txt' fields terminated by '|' FROM information1;

    ERROR 1045: Access denied for user: '*****@*****.com' (Using password: YES)

    How to change access permission of information1.
    [/quote]

    Two Options here:

    We can teach you how to eat the fish, or we can teach you how to fish. Let's pick the second, and teach you how to fish.

    See Devshed's documentation Section 6 (6.10).
    http://www.devshed.com/Server_Side/M...nual/manfiles/

    The folks at Devshed have provided us a wonderful service, we should all use it.

    Good luck fishing!

  4. #3
  5. No Profile Picture
    ads
    Guest
    Devshed Newbie (0 - 499 posts)
    thanks for help, but i am not root user.
    I am on virtual host and my ISP does not allow these permissions. If you can suggest something which can be done through php script will be great help for me.
    thanks

    [This message has been edited by ads (edited February 23, 2000).]
  6. #4
  7. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    18
    If you don't have permissions and you aren't root, and root refuses to change for you... well, you are out of luck.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Location
    Englewood, CO
    Posts
    30
    Rep Power
    15
    If you have an account with a host and your account is supposed to have PHP/MySQL access, you'll probably have to ask your support team to set up a database for you. They will then give you privileges and a user_id/password to use to access your database to create tables, etc.

    Generally, hosts don't automatically set up a database for you even if it is included in your hosting fee.

    -TM

  10. #6
  11. No Profile Picture
    ads
    Guest
    Devshed Newbie (0 - 499 posts)
    Hi Troutmask,
    As you said my ISP has given me username and password to creat database table. Here I want to take backup of table 'information1' and need to take backup almost daily for which i want to copy table 'information1' to output file 'output.txt' with following command.
    mysql> SELECT * INTO OUTFILE 'output.txt' fields terminated by '|' FROM information1;
    I have tried all the command mentioned earlier.

    I am getting following error.
    ERROR 1045: Access denied for user: '*****@*****.com' (Using password: YES
    I am new to MySql, bur error means permissions for file 'output.txt' has to be changed to copy data from 'information1'.
    My basic requirement is to take backup of database table to text file. If one can suggest any other way to do this job. I will be thankful to him and the forum.



    [This message has been edited by ads (edited February 24, 2000).]
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Location
    Englewood, CO
    Posts
    30
    Rep Power
    15
    Your other SQL commands work okay with the same user_id and password from that host?

    The only time that I have seen that error is when the MySQL database permissions weren't set up for me to connect from a specific host. Once I set up correct permissions, I don't see that error any more.

    If it is in fact MySQL telling you that it can't write that file, you may have to have mysqld (the MySQL daemon) set up as a user on the system where it is trying to write the file. Perhaps it is a problem with mysqld trying to write the file, but it does not have permission to create files on the system, though that seems unlikely.

    Anyway, as far as an alternative method, I would write a Perl or PHP script to select * and write it to a text file. Quite easy.

    -TM

Similar Threads

  1. mouseover a table rows
    By robin01 in forum HTML Programming
    Replies: 3
    Last Post: April 3rd, 2003, 11:35 PM
  2. MySQL vs PostgreSQL
    By Adman in forum Database Management
    Replies: 46
    Last Post: September 10th, 2002, 12:48 AM
  3. test for mySQL table
    By Splendid_Bob in forum PHP Development
    Replies: 4
    Last Post: July 12th, 2002, 07:50 AM
  4. Replies: 9
    Last Post: July 8th, 2002, 09:46 AM
  5. reordering rows in mysql table
    By amanda in forum MySQL Help
    Replies: 4
    Last Post: January 7th, 2002, 06:49 PM

IMN logo majestic logo threadwatch logo seochat tools logo