The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Databases
> MySQL Help
|
How to change mysql table permissions
Discuss How to change mysql table permissions in the MySQL Help forum on Dev Shed. How to change mysql table permissions MySQL Help forum discussing administration, SQL syntax, and other MySQL-related topics. MySQL is an open-source relational database management system (RDBMS).
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

February 19th, 2000, 05:42 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
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.
|

February 22nd, 2000, 12:21 PM
|
|
Junior Member
|
|
Join Date: Jan 2000
Location: Lakewood, CO, USA
Posts: 8
Time spent in forums: < 1 sec
Reputation 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/...anual/manfiles/
The folks at Devshed have provided us a wonderful service, we should all use it.
Good luck fishing!
|

February 23rd, 2000, 04:12 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
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).]
|

February 23rd, 2000, 08:24 AM
|
|
Apprentice Deity
|
|
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237

Time spent in forums: 4 m 8 sec
Reputation Power: 17
|
|
|
If you don't have permissions and you aren't root, and root refuses to change for you... well, you are out of luck.
|

February 23rd, 2000, 03:32 PM
|
|
Contributing User
|
|
Join Date: Feb 2000
Location: Englewood, CO
Posts: 30
Time spent in forums: < 1 sec
Reputation Power: 14
|
|
|
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
|

February 24th, 2000, 07:22 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
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).]
|

February 24th, 2000, 09:52 AM
|
|
Contributing User
|
|
Join Date: Feb 2000
Location: Englewood, CO
Posts: 30
Time spent in forums: < 1 sec
Reputation Power: 14
|
|
|
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
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|