Home >Database >Mysql Tutorial >MySQL-Ignoring query to other database solution
Linux command line successfully logs in to mysql and executes the command to report Ignoring query to other database.
[mysql@bjdev01 ~]$ mysql -Uroot -p Enter password: mysql> select now();
Ignoring query to other database
mysql> exit Bye
Log out and log in again, normal.
[mysql@bjdev01 ~]$ mysql -uroot -pEnter password: mysql> select now(); +---------------------+ | now() | +---------------------+ | 2014-01-27 10:29:47 | +---------------------+ 1 row in set (0.00 sec)
Compare the two login commands:
First login: mysql -Uroot -p
Second login: mysql -uroot -p
It was found that one of the parameters used is an uppercase U and the other is a lowercase u, and the two parameters are The meaning is different.
Checked the help of mysql and found that lowercase u and uppercase U represent different meanings
[mysql@bjdev01 ~]$ mysql --help| egrep 'user|safe-updates' -u, --user=name User for login if not current user. -U, --safe-updates Only allow UPDATE and DELETE that uses keys. -U, --i-am-a-dummy Synonym for option --safe-updates, -U. --select-limit=# Automatic limit for SELECT when using --safe-updates. --safe-updates. user (No default value) safe-updates FALSE
If you add -U to log in to mysql, you must add conditions to the update and deletion of data. .
The above is the detailed content of MySQL-Ignoring query to other database solution. For more information, please follow other related articles on the PHP Chinese website!