Yesterday, the character set of the varchar field of all table in MySQL was converted into utf8mb4/utf8mb4_unicode_ci, in order to save some emoji Martian text, the error was as follows when an SQL statement was executed: Illegalmixofcollations (utf8
See which libraries > show databases are available;View the table > use DB for a library; Show tables;View table fields > Desc TB;View Build Statement > Show CREATE TABLE TB;Which user is currently > select User ();View current Library > select
Originally thought that MySQL can make such a querySelect ID, list, name from table where ' Daodao ' in (list); ANote: 1. Table contains three fields Id:int, List:varchar (255), Name:varchar (255)In fact, this is not possible, so that only when the '
In the CentOS system, enter MySQL return with the following error resolution:MySQL BUG: Error 2002 (HY000): Can ' t connect to local MySQL server through socket '/var/lib/mysql/mysql.sock ' (2)Workaround One:If you are installing with the Yum method:
Will enter the ~ folder2. Then enter: Touch. Bash_profileAfter the carriage return is executed,2. Re-enter: Open-e. bash_profileThis file is opened in TextEdit (this should be a blank document if the environment variable has not been previously
This data access function, I have implemented on the. Net+mysql net+sqlserver Php+mysql, and are published in my blog park inside, because I think this function is too important, will let you write a lot less SQL statements do not say, but also to
MySQL restricts the size of packets accepted by the server according to the configuration file.Sometimes large inserts and updates are limited by the Max_allowed_packet parameter, resulting in failure.View current configurationShow VARIABLES like
Summary of commands: SS, Killall, Kill, PkillTo close the database method:Mysqladmin-uroot-ppassword shutdown/etc/inti.d/mysqld stopKILL-USR2 $ (cat path/pid)To change the MySQL data logon prompt:1.mysql> prompt \[email protected] \r:\m\s->PROMPT
Phenomenon: When the data inserted into the database is in Chinese, the following error is reportedThe reason is: the system default encoding of the computer is GBK, and the MySQL client provides encoding method is UTF8, two encoding inconsistency
User representation in MySQL: ' username ' @ ' host '1. For data security, you need to set a password for the user who is using the database and grant the appropriate permissions2. You need to modify the Mysql.user permissions to set the user
VS does not proactively provide the many connectors that you need to install these third-party packages yourself.MySQL provides a number of packages for Windows platform developers: http://dev.mysql.com/downloads/windows/This includes the connectors
A typical example of mysql connection Query,
Mysql connection query:
MysqlConnection query supports multi-Table connection
The same table can be connected multiple times (aliases are important when connecting the same table multiple times)
Example 1:
How to Use the FROM and EXISTS clauses in MySQL subqueries,
FROM subquerySubquery in the from clauseMySQL FROM subquery refers to the FROM clause as a subquery statement. The primary query then obtains the required data FROM the subquery results.
User authorization and deletion authorization methods in MySQL,
User authorization method
You can add new users by issuing the GRANT statement:
shell> mysql --user=root mysql mysql> GRANT ALL PRIVILEGES ON *.* TO monty@localhost IDENTIFIED BY
Linux keepalived + LVS implements mysql slave database load balancing and keepalivedlvsPrerequisites:
Reference link:
Http://www.osyunwei.com/archives/7464.html
Ps: the above are the main references for this operation. I am very grateful for the
Java + mysql Chinese garbled problem, javamysql Chinese garbled Problem
There are multiple causes of garbled characters, one of which is because MySQL uses the ISO-8859-1 (Latin1) Character Set by default, while JAVA uses Unicode encoding internally,
User authorization/deletion authorization method in MySQL,
User authorization method
You can add new users by issuing the GRANT statement:
The Code is as follows:
Copy code
Shell> mysql -- user = root mysqlMysql> grant all
A simple MySQL Database Import backup,
Task objective: to import content from the current database (MySQL5.5, windows) to the test database (MySQL5.1, linux)
1. Because I am not familiar with MySQL, I first considered the solution to be handled
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