The example in this article describes how MySQL sets trigger permissions and is useful for permissions errors. The specific analysis is as follows:MySQL Import data tip does not have SUPER privilege permission handling, as follows:ERROR 1419 (HY000):
1. Query interface input command, check whether the scheduled task is open, does not start off:show variables like '%event_scheduler% '; 2. Query interface Input command, open timed task: Set global Event_scheduler =1 (then use show variables like '%
The most MySQL can be set when installed, but the lower version of the seemingly no, need to be installed in order to set up.mysql5.7.18 connection error under Mac, error message: Access denied for user ' root ' @ ' localhost ' (using Password:yes)()
The rights module in the background of the website is very common, so it is necessary to master 3 right separation.3 The right discrete table has the user table, the role table, the Permissions table, the corresponding relationship is as
When you delete a table or a piece of data in MySQL, it appears[ERR] 1451-cannot Delete or update a parent ROW:A FOREIGN KEY constraint fails (...) This is because the foreign Key association is set in MySQL, resulting in the inability to update or
1, modify the table, log in to the MySQL database, switch to the MySQL database, using SQL statements to view"Select Host,user from User;"\mysql-u root-pvmwaremysql>use MySQL;\mysql>update User Set host = '% ' where user = ' root ';\mysql>select
You can add the following points if you have any better solutions.Modify the my. ini configuration file under the MySQL installation directory
One location is under the [client] label. Change this location to default-character-set = gutf8 to change
There's a 400,000-piece test data sheet.
Flag set (' R ', ' L ', ' C ', ' P ')
SELECT A. *, B.typedir
From Mzrui_archives A
Left JOIN mzrui_kind b on a.kid = B.uid
WHERE a.flag like '%p% '
and A.kid
In (3, 17, 18)
ORDER by A.uid
LIMIT 0, 15
This
Speaking of this, try to use mysqli_set_charset (mysqli: set_charset) instead of "set names". Of course, this content is also described in the PHP manual, but it does not explain why.
Recently, several friends asked me this question. Why?
When there
MySQL under Windows
(for administrators or users with global permissions to reset another user's password)
Enter command line mode
The code is as follows
Copy Code
Mysql-u Root MySQLmysql> UPDATE user SET
ALTER TABLE table_name AUTO_INCREMENT=N;Note that n can only be greater than an integer value of an existing auto_increment, and less than the value is invalid.Show table status like ' table_name ' can see auto_increment this column is a performance
Copy Code code as follows:
' Mark ' Set (' Index ', ' best ', ' hot ')
The use of fewer people, understand less people, looking for a long time, finally gathered a set of knowledge points
Look at the structure above, MySQL is not
May be IP is not set good
Problem: MySQL permissions are set correctly, but still cannot be accessed remotely. The 3306 port was not opened by Telnet.
Analysis: MySQL defaults to bind only 127.0.0.1, that is, only on this computer to access Port 33
set,enum data types are object of string type, where the set can contain up to 64 elements and can be arbitrarily taken to the elements in the collection. An enum is an element that can only be taken to a wood in a collection, containing up to 65,536
MySQL remote access settings allow remote connection to local database. 1. Go to the local MySQL installation directory under bin , log in to MySQL,2. Switch the database to the built-in database named "MySQL" and you can see a table named "User"
1. Open MySQL, enter the password2, input: use MySQL;3, query host input: Select User,host from User;4. Authorized Users(1) Any host connected to MySQL server with user root and password pwdMysql> GRANT All privileges on * * to ' root ' @ '% '
If the job failed to start occurs when the MySQL service is restarted under Linux, the restart fails under window because you installed a high version of MySQL (mysql5.5 above), and in the method of modifying the character encoding in the high
CausesIn the local database execution test platform database structure file Data_struct.sql, the execution of the build table statement resembles the following:CREATE TABLE' demo ' (' ID ' )int(Ten) unsigned not NULLAuto_increment,' name ' Longtext
Set log retention days and automatically delete after expirationView current journal days saved:
Show variables like '%expire_logs_days% ';
The default is 0, which never expires.
Modify by setting Global parameters:
Set
The ideal index:
Tables with very frequent table queries are indexed relative to write operations
High field sensitivity
The length is small (suitable length, not the smaller the better)
Try to cover characters commonly used
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.