LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-14-2010, 07:25 AM   #1
strycnine
Member
 
Registered: Jul 2006
Location: Romania
Distribution: Fedora 12
Posts: 160

Rep: Reputation: 31
mysql question dumb database of a user


Hi
Is there a way to dumb all the databases owned by a specific user?

Exe: I am root, and I want to dumb all the database of the user user01.

thx
 
Old 04-14-2010, 08:06 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by strycnine View Post
Hi
Is there a way to dumb all the databases owned by a specific user?

Exe: I am root, and I want to dumb all the database of the user user01.

thx
you mean dump right??
well in that case you would dump these the same way you would dump any other dbs

Code:
Usage: mysqldump [OPTIONS] database [tables]
OR     mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
OR     mysqldump [OPTIONS] --all-databases [OPTIONS]
For more options, use mysqldump --help
example


Code:
mysqldump -h hostname -u user -ppassword db1 table > dump.sql
 
Old 04-14-2010, 11:15 PM   #3
strycnine
Member
 
Registered: Jul 2006
Location: Romania
Distribution: Fedora 12
Posts: 160

Original Poster
Rep: Reputation: 31
with mysqldumb I must loggin with a user passwd. I 'm trying to say if there is a way to dumb all databases of user x, while I'm logged with root(in mysql).

I'm triying to do mysqldumb -u x -p --all-databases > db.sql but from root user.
 
Old 04-15-2010, 03:32 AM   #4
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by strycnine View Post
with mysqldumb I must loggin with a user passwd. I 'm trying to say if there is a way to dumb all databases of user x, while I'm logged with root(in mysql).

I'm triying to do mysqldumb -u x -p --all-databases > db.sql but from root user.
shutdown mysql.

add this

Code:
skip-grant-tables

to my.cnf, under [mysqld] section, then restart mysql.
then you can run mysqldump without a password.

Remember to remove the skip-grant-tables and restart mysql when you are done.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
If I have public_html website for every user whereis MYSQL database for each user? RMLinux Linux - Newbie 1 12-02-2008 05:37 AM
Create mysql user for backup of database timgerr Linux - Server 2 01-04-2008 10:44 AM
mySQL deny user access to database blizunt7 Programming 3 10-10-2007 09:34 AM
creat MySQL database for each user ? Data-Base SUSE / openSUSE 3 03-07-2005 02:42 PM
User managment problem / dumb question xedios Linux - Software 1 12-10-2004 06:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration