mysqldump command getting "Access Denied".

Solution Verified - Updated -

Issue

  • mysqldump command throws access deny error
# mysqldump --databases --add-drop-table --single-transaction -h db_server.example.com -u admin -p sys > /tmp/sysadmin.sql
mysqldump: Got error: 1045: Access denied for user 'admin' (using password: NO) when trying to connect

Environment

  • Red Hat Enterprise Linux (RHEL) 8
  • Mysql

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content