The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > Web Programming, Web 2.0 and Mashups
.
google unix.com



Web Programming, Web 2.0 and Mashups Discuss Web Programming and Web Server Administration, including LAMP, Apache, MySQL, Flash, HTML, SEO, Mashups and other Web APIs and topics.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
MySQL Developer, meet “Quan” (aka the MySQL Query Analyzer) iBot MySQL DevZone RSS 0 05-15-2009 02:30 PM
MySQL University - Training on MySQL Development & Internals iBot Solaris BigAdmin RSS 0 11-12-2008 09:10 AM
how to break mysql dump sql file learnbash Shell Programming and Scripting 2 05-14-2008 06:39 AM
restore mysql dump file in many remote servers? blesets Shell Programming and Scripting 2 09-13-2006 02:17 AM
help, what is the difference between core dump and panic dump? aileen UNIX for Dummies Questions & Answers 1 06-11-2001 09:08 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 5.00 average. Display Modes
  #1 (permalink)  
Old 06-03-2009
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,893
Quote:
i'm guessing that means I can't run things properly? (I'm not sure, I obviously had a shell to output a file with and everything... I just wasn't successful in outputting a GOOD file)
Redirect stderr from mysqldump as well. Use &> instead of just >
  #2 (permalink)  
Old 06-03-2009
jzacsh jzacsh is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 29
Quote:
Originally Posted by otheus View Post
Redirect stderr from mysqldump as well. Use &> instead of just >
Thanks! I did just that, and got the following error (which, allow me to preface, I've been having similar errors trying to make a small test site on my server of Drupal)


Code:
Enter password: mysqldump: Got error: 1045: Access denied for user 'jzacsh_jzacsh'@'localhost' (using password: NO) when trying to connect

But I don't understand - I'm using the same username/password and database as my wordpress install, I even copy/pasted the syntax of it out of the wp-config.php file, so I don't know what I'm mistyping
  #3 (permalink)  
Old 06-03-2009
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,893
Isn''t that curious... with mysqldump, you have to specify --password, not -p.

mysqldump -u jzacsh_jzacsh --password=wordpres --single-transaction jzacsh_jzwp
  #4 (permalink)  
Old 06-03-2009
jzacsh jzacsh is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 29
Question

Quote:
Originally Posted by otheus View Post
Isn''t that curious... with mysqldump, you have to specify --password, not -p.

mysqldump -u jzacsh_jzacsh --password=wordpres --single-transaction jzacsh_jzwp

aah! thank you. okay, this is now what I get:

Code:
mysqldump: Got error: 1044: Access denied for user 'jzacsh_jzacsh'@'localhost' to database 'jzwp' when selecting the database
-- MySQL dump 10.11
--
-- Host: localhost    Database: jzwp
-- ------------------------------------------------------
-- Server version	5.0.81-community

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

any suggestions? how is it possible I'm still getting an access error at the beginning of the output, if I clearly have some kind of interaction going on below??
  #5 (permalink)  
Old 06-03-2009
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,893
Could it be you are selecting the wrong database? Maybe internal to MySQL it is simply 'jzwp' and not 'jzacsh_jzwp' ? So the login works and you have access to your own database. But you can't switch to a non-existent database, so you get the error. But because you successfully logged in, you get the database dump as normal.
  #6 (permalink)  
Old 06-04-2009
jzacsh jzacsh is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 29
Smile

Quote:
Originally Posted by otheus View Post
Could it be you are selecting the wrong database? Maybe internal to MySQL it is simply 'jzwp' and not 'jzacsh_jzwp' ? So the login works and you have access to your own database. But you can't switch to a non-existent database, so you get the error. But because you successfully logged in, you get the database dump as normal.
wow that's amazing! (I had been trying that previously, when I had the --password syntax incorrect). Thank you so much for sticking around! I'll be finishing a book soon on PHP & MySQL and a 2-part unix admin course... you can be sure I'll be around to support these forums!

ps.
so that others can benefit, here's what the final proper output looks like for me:


Code:
mysqldump -u uname --password=psswd --single-transaction prefix_dbname | dd bs=1M | gzip -c > $sql_Path 2>&1


Last edited by jzacsh; 06-04-2009 at 12:52 AM..
Closed Thread

Bookmarks

Tags
backup, mysql, php test

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:43 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0