1. Install the required program 1. Install the development environment and mysql database in advance;
650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131227/1Z00a648-0.png "/>
650) this. width = 650;
When installing software, you need to useMysql databaseTo create a database and corresponding users in the database, execute the database creation script. The database is successfully created, but an error occurs during user authorization:
InMysql databaseFor standard servlet/tomcat network applications in the background, there is a problem when they are used again after one day of standby, and the First Login always fails. Check the log and find the following error: "com. mysql. jdbc.
MySQL databaseBecause of work requirements, we may useENUM typeBut since this type is not very common, we may not be very familiar with it. It doesn't matter. This article will explain the ENUM type in detail, hoping to help you.
The ENUM type is a
Method 1: use the set password commandCopy codeThe Code is as follows:Mysql-u rootMysql> set password for 'root' @ 'localhost' = PASSWORD ('newpass ');
Method 2: Use mysqladminCopy codeThe Code is as follows:Mysqladmin-u root password "newpass"
If
The reason why Mysql can synchronize between master and slave servers is that the events (events) on the master server are written to the binary log, and then these events are executed again on the slave server.
Events are written to BINLOG in the
Today, we found that the VPS hard disk is almost full. The first reaction is: it must have been caused by a log file of something, because it had similar experience in WINDOWS before.
After analysis, find the reason: MYSQL Log File.
You can also
Purpose:
The robustness of the Master/Slave server settings is improved. If the master server fails, the slave server that was originally used as a backup can be upgraded to the new master server.
You can process user requests separately on the
This afternoon, I have been working on the Mysql Character Set Problem. Using command line load to import text file data, Chinese characters are garbled.
So I checked the default encoding of Mysql, and the input show variables like 'character _ set
When you use mysql's load data local infile syntax to insert a file, The following ERROR occurs: ERROR 1148 (42000): The used command is not allowed with this MySQL version.
The reason is: if-enable-local-infile is not specified during mysql
To view indexes in mysql, we will use the show command. If there are show indexes or show keys, let's take a look at the specific mysql query table index Command show.
MySQL queries table indexes in two command forms:
The Code is as
In the temporary mysql table, xxx is full. You only need to modify the tmp_table_size and max_heap_table_size parameters in my. ini.
Tmp_table_size if the temporary table in the memory exceeds this value, MySQL automatically converts it to the
IN the past, it was very difficult to find out how to sort the values found in. Later, gg and bb found that mysql IN sorting is very simple. Next I will sort out the relevant instances for your reference.
Assume that a table is as follows:
For mysql database backup or recovery, we often use Direct Copy database backup. For mysqldump database backup and mysqlhotcopy database backup, let's take a look.
Mysqldump command mode
The backup IP address is 192.168.1.100:
The Code is
Mysql5.1 has the view function. The following articles will introduce some considerations for mysql views, creation, deletion, modification, and creation. I hope this article will be helpful to you.
Create View
In MySQL, the complete syntax for
Use the load command in mysql to show that the content in the txt file is stored in the data warehouse table. For example, if you create a table, the name is username, And the usernamefield contains the db.txt file. The content is separated by
If you are used to using windows databases, that is, operating databases on the graphic interface, you will feel unfamiliar when you operate mysql on commands. In fact, as long as you have mastered some basic commands, there are also frequent use,
I tested it myself. Many characters are changed '? '.
The utf8 character set is used for database connection:
Copy codeThe Code is as follows:Define ("MYSQL_ENCODE", "UTF8 ");
Mysql_query ('set names'. MYSQL_ENCODE, $ conn) or die ('character SET
When querying data in a database, if the data contains a Chinese string, garbled characters may occur during output. before performing the query operation, you can use the set names statement to set the encoding format. Then, no garbled characters
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