Linked Questions
23 questions linked to/from Suppress warning messages using mysql from within Terminal, but password written in bash script
445 votes
15 answers
632k views
Export and Import all MySQL databases at once
I want to keep a backup of all my MySQL databases. I have more than 100 MySQL databases. I want to export all of them at the same time and again import all of them into my MySQL server at once. How ...
54 votes
11 answers
222k views
Store mysql query output into a shell variable
I need a variable to hold results retrieved from the database. So far this is basically what I'm trying with no success. myvariable=$(mysql database -u $user -p $password | SELECT A, B, C FROM ...
47 votes
11 answers
137k views
Linux shell script for database backup
I tried many scripts for database backup but I couldn't make it. I want to backup my database every hour. I added files to "/etc/cron.hourly/" folder, changed its chmod to 755, but it didn't run. At ...
45 votes
11 answers
83k views
mysqldump: Got errno 32 on write
I used this script for years on my VPS. And it's still working. DBLIST=`mysql -uroot -pROOT_PASSWORD -ANe"SELECT GROUP_CONCAT(schema_name) FROM information_schema.schemata WHERE schema_name NOT IN ('...
23 votes
5 answers
55k views
How to disable MySQL root logins when no password is supplied?
MySQL is installed on my laptop and it works fine, except that I am allowed to log in without supplying the root password. I can also log in by supplying the root password. If the supplied password ...
13 votes
3 answers
7k views
mysql_config_editor --login-path=local not working
I have upgraded to mysql 5.6.13 and thought I would try the new --login-path feature. I configure with "mysql_config_editor set --login-path=local --host=localhost --user=user --password" After ...
5 votes
1 answer
35k views
Automatically input a password when a bash script is run [duplicate]
For example, say if I have a script saying: #!/bin/bash sudo setpci -s 00:02.0 F4.B=00 How do I put the root password into the script so that it accepts it as the password when it reads and executes ...
8 votes
4 answers
13k views
Pass password to mysql_config_editor using variable in shell
I have password stored in a variable $db_pwd and I want to pass it to mysql_config_editor in a shell script. I can not use config file or db_pwd environment variable. I am doing this ...
9 votes
2 answers
28k views
Bash Script Mysql Warning: Using a password on the command line interface can be insecure
Hi I have a script to partition some mysql databases. We are upgrading from 5.5 to 5.6. While testing the scripts i noticed that with the new 5.6 version mysql returns Warning: Using a password on the ...
3 votes
1 answer
7k views
How to run cron in a secure way? (getting this warning: "Using a password on the command line interface can be insecure")
I've created a cronjob using cPanel. Every a certain period of time it runs this php file that generates a backup: <?php include $_SERVER['DOCUMENT_ROOT'].'conectar.php'; $filename='...
3 votes
0 answers
4k views
How to Globally Suppress MYSQL Warning Messages
I have a number of large BASH scripts which execute queries against a MySQL database. When running these scripts on MYSQL version 5.7.17, I get the following error' [Warning] Using a password on the ...
1 vote
1 answer
4k views
How to connect to mysql and to pass credentials on Jenkins freestyle job
I am trying to connect to a remote MySQL Server from a Jenkins job. I bound the MySQL user credentials into two variables MYSQL_USERNAME and MYSQL_PASSWORD. I need to SSH first, and then connect to ...
2 votes
1 answer
2k views
skip-secure-auth option not working with mysqldump
I am trying to export a mysql schema from remote server to local but geting the following error: C:\Program Files\MySQL\MySQL Server 5.6\bin>mysqldump --skip-secure-auth -h x.y.z.d -uatulya -p'...
1 vote
6 answers
2k views
mysqldump - cron job
Am trying to get a auto backup of our mysql database via a cron job that runs daily. We have: $database_user = 'VALUE'; $database_pass = 'VALUE'; $database_server = 'localhost'; // Name of the ...
1 vote
1 answer
987 views
Ignore "nohup" warning not working for mysqldump
I know there're tons similar question but somehow I can't get it right. When run this command, my "dump.sql" produced desired result mysqldump -uuser -ppassword --comments --single-...