0

When I'm executing mysqldump command from localhost or from remote host, it's not prompting me for password. I want the password prompt even though I'm running it from remote or from local. On my server there is no ~/.my.cnf present. Also I have Ubuntu server. I'm running mariadb. Also I would like to know how mysqldump command pick up a password everytime ?

3 Answers 3

1

If you want to enter a password manually each time you invo mysqldump you should use the -p option:

  -p, --password[=name] 
                      Password to use when connecting to server. If password is
                      not given it's solicited on the tty.

If you do not specify the password in the commandline, it will ask you to enter one.

0

From mariadb website, you can see:

Options

mysqldump supports the following options, which can be specified on the
command line or in the [mysqldump] and [client] option file groups. Default
options are read from the following files in the given order:

    1. /etc/my.cnf
    2. /etc/mysql/my.cnf
    3. /usr/etc/my.cnf
    4. ~/.my.cnf 

mysqldump also supports the options for processing option files

So you should check that no password option for mysqldump is specified in all these files.

0

You should check that you have specified a password for the root@localhost user in MariaDB users table.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.