The Ignoring query to other database problem occurs in MySQL, ignoringdatabase

Source: Internet
Author: User
Tags php mysql vps

The Ignoring query to other database problem occurs in MySQL, ignoringdatabase

When mysql is used today, any input command will output:

Ignoring query to other database

This error message is very strange. Later, we found that the-u parameter was missing when logging on to the database ..

The correct command is:

Mysql-uroot-p
I entered:

Mysql-root-p

Add-u.

Mysql configuration problems in ubuntu. You cannot use a database

The "-u" parameter does not exist when you connect to mysql.
[Root @ vps ~] # Mysql-hlocalhost-root-p
Reconnect to mysql and add the-u parameter. Everything works.
[Root @ vps ~] # Mysql-hlocalhost-uroot-p

No database selected in php mysql

Put mysql_select_db ($ database_conn, $ conn); put it behind mysql_pconnect.

If you refresh a few times, it will become normal. I assume that after the POST operation is performed, mysql_select_db ($ database_conn, $ conn) is executed );
Because persistent connections are used, the program will automatically find the last available connection, so it is normal.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.