for more information about the three types, see the MySQL help documentation.
char summary: the maximum length of a char is 255 characters. Note: Number of characters and character set . There can be a default value, and spaces at
At the beginning, users using Zend studio may encounter the problem that mysql_connect is not defined when debugging and connecting to MySQL. This is because related DLL files are not loaded in PhP5, therefore, you must manually add it. The first
In the JPA function, I used createnativequery to execute a query statement. This query statement uses union and left join. After the query result is displayed, the number of records is correct, however, the data of each record is exactly the same,
If a deadlock occurs, use the show InnoDB STATUS Command to determine the cause of the last deadlock. The returned results contain detailed information about deadlocked transactions, such as SQL statements that cause deadlocked transactions, locks
ArticleDirectory
1. First, log on to the MySQL Command Console
2. Select a data table
3. Add a connection user account in the MySQL user table:
4. Data Table Access Authorization
5. Authorization to take effect. creation is
Cause: There is an InnoDB Engine table, which is executed in a foreach loop of about 3000 times.Insert into table (Columna, columnb) values (valuea, valueb)
The results exceed the 60 s PHP Execution limit (which can be modified in PHP. INI), which
1. MySQL recursive query Process
Table:
Create Table 'torg '('Torgid' varchar (50) not null,'Torgname' varchar (200) not null,'Torgcode' varchar (50) not null,'Torgrank 'varchar (50) not null,'Torgflag' varchar (5) not null,'Torgorder' varchar (5)
For the process of changing the root password of MySQL in Linux, we can find a lot on the Internet, which is:
# Killall mysqld // interrupt the currently running MySQL process
# Mysqld_safe -- skip-grant-tables & // start the Security Mode
#
The "load data local infile" statement of MySQL usually imports the content of a text file into the database,This speed will be very fast, but today, if the text size exceeds 1 MB, an exception occurs: "packets larger than max_allowed_packet are not
MySQL server support# End of the row,-- The row endsAnd/* The middle of a row or multiple rows */Comment box:
Mysql> select 1 + 1; # This comment ends until the end of the row mysql> select 1 + 1; -- This annotation ends until the end of the row.
I sorted out the tuscany.org.cn server and found that the script I wrote three years ago was still running.
The script is as follows:
#===================================================== ==============================
#! /Bin/bashCurrent_date = '
I read the hibernate in the book of Li Gang a few days ago. The configuration file is also typed into hibernate according to the above. cfg. student. student configured in Java. HBM. the XML file is okay, but the connection can not open is reported.
1. Install MySQL
Sudo apt-Get install mysql-server mysql-Client
2. Configure MySQL
In ubuntu, MySQL only allows local access by default. If you want remote access from other machines, you need to change/Etc/MySQL/My. CNFConfiguration file.
Common MySQL operations: The following are all tests passed under mysql5.0. First, note that you must add them at the end of each command. (semicolon)
1. Export the entire databaseMysqldump-u username-p -- default-character-set = Latin1 Database
When running a JSP system, the following error is always reported:
HTTP status 500-
TypeException report
Message
Description The server encountered an internal error () that prevented it from fulfilling this request.
Exception
Modify the database character set:
ALTER DATABASE db_name DEFAULT CHARACTER SET character_name [COLLATE ...];
Change the default character set and all character columns (char, varchar, text) of the table to the new character set:
Alter table
There are two possible reasons for the garbled MySQL database:
1. MySQL database encoding problem (set during database creation ).
2. url encoding settings for connecting to the MySQL database.
For the first problem, the current personal discovery
StartMysqld
LoginMysql-u username-P Password
StopMysqladmin-u username Shutdown
View Current Character Set settingsShow variables like 'character/_ set/_ % ';
Set Character SetSet character_set_results = GBK;Set the character set of client,
If you want to directly store binary data, such as image files and HTML files, in your MySQL database, this article is for you! I will show you how to store these files through HTML forms and how to access and use these files.Overview:Create a new
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