Trying to configure mysqldump command from C:\wamp\bin\mysql\mysql5.6.17\bin to the following:
mysqldump -u db_username -p db_name (will add direction and path later..)
So I by looking at the my.ini file in C:\wamp\bin\mysql\mysql5.6.17 I learned that:
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is C:\mysql\data) or
# ~/.my.cnf to set user-specific options.
OK.
So now for the mysqldump command to work without putting the password in the command line I can pass the password to MySQL via the configuration file I think.
So in the my.ini file I put:
# The following options will be passed to all MySQL clients
[client]
password = my_password
port = 3306
socket = /tmp/mysql.sock
and later down the line
[mysqldump]
user = my_username
password = my_password
quick
max_allowed_packet = 16M
OK.
So then I saved this file once as my.ini and tried putting it in the following locations:
C:\wamp\bin\mysql\mysql5.6.17
C:\wamp\bin\mysql\mysql5.6.17\data
C:\wamp\bin\mysql\mysql5.6.17\data\mysql
C:\wamp\bin\mysql\mysql5.6.17\bin
restarted WAMP, executed the command
mysqldump -u db_username -p db_name
but always get:
C:\wamp\bin\mysql\mysql5.6.17\bin>mysqldump -u my_username -p fabermaticdb
Enter password:
mysqldump: Got error: 1045: Access denied for user 'my_username'@'localhost' (using password: NO) when trying to connect
C:\wamp\bin\mysql\mysql5.6.17\bin>
OK.
So I thought it talks about my.cnf instead of my.ini.
OK.
So I go back to Notepad++ and save the my.ini file as my.cnf file with the changes above, leave everything else like it is and also try all of the 4 locations given above and still get that same error.
So, please, where do I put this my.ini or my.cnf file for MySQL to accept the password from inside the WAMP installation instead of asking me interactively what the password is?
Thanks for any help with this.
Best Regards
Version of Operating system? Windows 7 Ultimate 64bit
Version of Wamp Server installed? 2.5 32bit
Version of Apache you are running? 2.4.9
Version of MySQL you are running? 5.6.17
Version of PHP you are running? 5.5.12
What colour is your WampManager icon? Green
Host file localhost 127.0.0.1
New to WAMP?
Read this please: [
forum.wampserver.com]