MariaDB / mariadb-docker

Docker Official Image packaging for MariaDB
https://mariadb.org
GNU General Public License v2.0
755 stars 436 forks source link

MariaDB 11.1.2 incorrect flags #536

Closed rgreenn closed 8 months ago

rgreenn commented 8 months ago

The --help printout says that -p is password flag, while -D is for database. However, when running mariadb -u username -p password in the container I am prompted to enter the password and it returns: ERROR 1044 (42000): Access denied for user 'username'@'%' to database 'password'

Running mariadb -u username -D database returns: ERROR 1045 (28000): Access denied for user 'username'@'localhost' (using password: NO)

I would like to run a command like mariadb -e "SELECT * FROM TABLE" -u username -p password -D database within a bash script, but am unable to do so as the -p flag appears to specify the database, and the -D flag does nothing.

tanji commented 8 months ago

@rgreenn This is the wrong project for asking such a question but anyway. This is clearly documented in the manual: https://dev.mysql.com/doc/refman/8.0/en/connecting.html

If you use a --password or -p option and specify a password value, there must be no space between --password= or -p and the password following it.

Hope that helps!

rgreenn commented 8 months ago

Sorry, I'm fairly new to github.

Thanks, I appreciate the help!

grooverdan commented 8 months ago

Also documented https://mariadb.com/kb/en/mariadb-command-line-client/#-p-passwordname

https://mariadb.com/kb/en/getting-help-with-mariadb/

Welcome to MariaDB and github.

/wave @tanji :smile_cat: