MySQL Character set: cp1252 West European (latin1), solve garbled problem
Use the virtual host space on the phpMyAdmin operation database, if you see the phpMyAdmin home page on the MySQL character set for cp1252 West European (latin1), when we
Copy Code code as follows:
Delimiter | |
DROP FUNCTION IF EXISTS is_mobile| |
CREATE FUNCTION is_mobile (x VARCHAR (255)) RETURNS TINYINT (1)
BEGIN
DECLARE result TINYINT (1) DEFAULT 0;
SET x = LCASE (x);
IF Right (x,4) = '. mp4 ' THEN
We continue to use the previous example. The table previously established contains some basic information about the employee, such as name, sex, date of birth, place of birth. We'll create a table that describes the articles published by the
There are many MySQL performance optimization programs on the web, however, the MySQL optimization compared to SQL Server, more trouble, the same settings, in different environments, due to memory, access, read and write frequency, data differences
MySQL Master-slave replication (replication sync) Now enterprise use more, also very mature. It has the following advantages:
1. Reduce the pressure on the primary server, you can perform query work from the library.
2. Make a backup from the
Through the previous experience of MySQL operation, the MySQL configuration problem is excluded, to see if the MSYQL is running normally, by looking at the MySQL data directory inside the *.err file (change the extension to. txt) Notepad view. If
This article describes all the common MySQL commands some data import Export command, as long as we hold these commands can be a quick way to backup our database restore the
MySQL data to import export 500MB data
Problem: 500M of the library table
MySQL installed after good, there will be a database named MySQL, the user's table is user,mysql database user management is around this table, of course, there are some tables, such as: Tables_priv,procs_priv,clumns_priv, INFORMATION_SCHEMA
Mysql Query Cachethe effect of query caching is that when a query receives a query that is the same as before, the server retrieves the results from the query cache, rather than parsing and executing the last query again. This greatly improves
Monitoring SQL statement execution efficiency based on MySQL slow log
Enable MySQL log-slow-queries (slow query record).
In the Linux environment to find the My.cnf file (generally in/etc/mysql/), and then you may find that the file can not be
The scope of this article: a comprehensive description of MySQL database operations, divided into virtual host and server two situations.
Virtual Host
1, through the phpMyAdmin import and export function, this software generally only supports the
One, multiple table connection type1. Cartesian product (cross join) in MySQL can be a cross join or omit cross that join, or use ', ' such as:
Because the result it returns is the product of the two data tables that are connected, it is generally
Copy Code code as follows:
# VI Mysqlusers.txt
Create Database Dataname;
Grant all privileges on dataname.* to username@localhost identified by ' password ';
Flush privileges;
#/usr/local/mysql/bin/mysql-u root-p Password
Brief Introduction
Xtrabackup is the MySQL database Backup tool provided by Percona, according to the official, this is also the world's only one by one open source to be able to the InnoDB and XTRADB database hot standby tool. Characteristics:
(1)
For Windows platforms, when the MySQL database is installed, the system defaults to generating the license tables and accounts, and you do not need to execute mysql_install_db scripts to generate accounts and appropriate permission tables as you
MySQL has different types of log files (each store a different type of log), from which you can query what is done in MySQL, for the management of MySQL, these log files are indispensable.1. Error log: Log the database startup, operation and stop
Mysqldump is a utility that MySQL uses to store databases. It primarily produces a SQL script that contains the command create TABLE inserts that are required to re-create the database from scratch. Now let us study together!
First, Mysqldump:
Environment
MySQL 5.1 + command line tools
problem
MySQL table field Set default value
Solve
Copy Code code as follows:
--sql:
CREATE TABLE Test (
i_a int not NULL DEFAULT 1,
Ts_b Timestamp not NULL DEFAULT now (),
C_c
Automatic deletion of temporary files 23:00 daily
First look at the crontab task list:Crontab-lAnd then NEW:Crontab-eAdd a line:* * * rm-rf/www/cmstest/my120/public/scripts/jpgraph/*Save exit.Restart Service:/etc/rc.d/init.d/crond restart
Second,
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