Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysqldump password

add this to .my.cnf file
user can be omitted

[mysqldump]
user=mysqluser
password=secret

The -p option must be excluded from the command in order to use the password in the config file.
Correct:
mysqldump –u my_username my_db > my_db.sql
Wrong:
mysqldump –u my_username -p my_db > my_db.sql
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mysqldump #password
ADD COMMENT
Topic
Name
4+4 =