Re: From bash script (Debian Bookworm) login and query to MariaDB
The Natural Philosopher <[email protected]> Fri, 3 Nov 2023 16:45:24 +0000
| Newsgroups | comp.databases.mysql |
|---|---|
| Organization | A little, after lunch |
| Message-ID | <[email protected]> |
On 03/11/2023 14:42, ^Bart wrote: >> No space between your -p and your password. This is different from >> other parameters. > > You got the point, it works without space from -p and password but... > > It works from command line: > $ mysql -u MY_USER -pMY_PASSWORD < /home/itoffice/query.sql > > It doesn't work from crontab -e also from root: > */5 * * * * -u MY_USER -pMY_PASSWORD < /home/itoffice/query.sql > > I don't know why... :\ > perhaps adding 'mysql' would help? > ^Bart > -- "Nature does not give up the winter because people dislike the cold." ― Confucius