Recently, I picked up MySQL again in the development project and encountered Chinese garbled characters when setting up the environment. I will share with you the solution below.
1. Show variables like 'character _ % '; shows all settings. Set
MySQL storage engine MyISAM, InnoDB, and memoryMemory will be introduced later
InnoDB supports transactions, foreign keys, and row locks. MySQL does not.
InnoDB does not support Fulltext index types
InnoDB does not save the specific number of
Step 1: Define the backup directory on your Linux Server:
CopyCode The Code is as follows: mkdir/var/lib/mysqlbackup
CD/var/lib/mysqlbackup
Step 2: The following is the most important step: Write a regular backup script.
Copy code The
This article briefly describes the full-text index application example, MYSQL demo version 5.5.24.
Q: When is full-text index applicable?
A: Full-text indexing is currently A key technology for big data search.
For more details, refer to Baidu.
-----
Reference Table: student
Multi-field Query
Copy codeThe Code is as follows: mysql> select id, name, birth from student;
Query all fieldsCopy codeThe Code is as follows: mysql> select * from student;
Where specified QueryCopy codeThe Code is as
Reference Table
Count () is used to count the number of records
Copy codeThe Code is as follows: mysql> select count (*) from score;
Mysql> select count (*) from score where stu_id = 901;
Sum () summation Function
Copy codeThe Code is as follows:
View version information
#1 Enter mysql in command line mode and you will see the initial prompt
Your MySQL connection id is 3
Server version: 5.1.69 Source distribution
#2 You can see the status in the command line. Copy codeThe Code is as
When multiple mysql statements are connected, such
$ Sqls = "insert table a values (1, 2); insert table a values (2, 3 );"
You can use three methods in php to execute the command:
Mysql_query
Pdo
Mysqli
Three methods are available when sqls
1. Update
1
Sudo apt-get update
2. Install nginx
1
Sudo apt-get intsall nginx
After Ubuntu is installed, the file structure is roughly as follows:* All configuration files are under/etc/nginx, and each virtual
1.
Right-click the project (not Src) and choose -- Build Path -- Add External Archives. Select the jar package under the driver. This is the release version and the debug version under the bin directory.
The example is in connector-j.html under docs.
1. Create a stored procedure
Create a MySQL Stored Procedure add_pro
Copy codeThe Code is as follows: delimiter //
Drop procedure add_pro //
Create procedure add_pro (a int, B int, out sum int)
Begin
Set sum = a * B;
End;
//
2. Call the Stored
Cause analysis:Host 'local' is not allowed to connect to this MySQL server typical remote permission issues.Problem:
MySQL does not have the permission to enable remote logon. It depends on the system used by your server, such as linux or Windows.
To replace part of a field, use the update statement:
UPDATE table name SET field name = REPLACE (REPLACE the previous field value, 'replace the previous keyword ', 'replace the previous keyword') WHERE field name REGEXP "REPLACE the previous
How can I use a command line to access mysql? I have not seen a friend raise such a question on the Forum recently. Some netizens have also given the answer, and I would like to share it with you here!
A free version of software for converting
MySQLTuner: http://github.com/rackerhacker/MySQLTuner-perl
MySQLTuner usage:Downloading and using MySQLTuner is actually a very simple process:
Wget mysqltuner. plPerl mysqltuner. pl
If you 'd rather not invoke perl every time, just make it
Relational databases depend on primary keys, which are the foundation of the Physical Mode of databases. The primary key has only two purposes on the physical layer:
Uniquely identifies a row.As an object that can be effectively referenced by a
The searchd daemon of sphtracing supports MySQL binary network protocol from version 0.9.9-rc2 and can be accessed through standard MySQL APIs.For example, the "mysql" command line program can work well.
The following is an example of using the
Dump is performed at every day to back up the corresponding database, and binlog files of the corresponding database are updated.If a database error is found, you only need to recover the previous dump backup and then restore the binlog file of the
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