From man mysql
:
If you use the short option form (-p), you cannot have a space between the option and the password.
So either
mysql -u root -p"$PASSWORD"
or
mysql -u root --password "$PASSWORD"
More Related Contents:
- How to export and import a .sql file from command line with options? [duplicate]
- Suppress warning messages using mysql from within Terminal, but password written in bash script
- Downloading MySQL dump from command line
- Install MySQL on Ubuntu without a password prompt
- How do I know when my docker mysql container is up and mysql is ready for taking queries?
- Bash script to insert values in MySQL
- How to get number of rows affected, while executing MySQL query from bash?
- How do I make this MySQL query faster and better?
- MySQL update table based on another tables value
- On Duplicate Key Update same as insert
- Ordering by the order of values in a SQL IN() clause
- LAST_INSERT_ID() MySQL
- SQL Selecting from two Tables with inner join and limit [duplicate]
- a count for each join – optimisation
- The equivalent of SQLServer function SCOPE_IDENTITY() in mySQL?
- Are column and table name case sensitive in MySQL?
- MySQL – SELECT WHERE field IN (subquery) – Extremely slow why?
- How to add not null constraint to existing column in MySQL
- Special Characters in MySQL Table Name
- connect ECONNREFUSED – node js , sql
- MySQL Aggregate Functions without GROUP BY clause
- Count days between two dates, excluding weekends (MySQL only)
- How to insert values in table with foreign key using MySQL?
- Is there a way to “limit” the result with ELOQUENT ORM of Laravel?
- Fixing “Lock wait timeout exceeded; try restarting transaction” for a ‘stuck” Mysql table?
- How to set root password to null
- the MySQL service on local computer started and then stopped
- Rename a table in MySQL
- #1292 – Incorrect date value: ‘0000-00-00’ [duplicate]
- mySQL regex in the where clause