An important application is how to modify the password when the root user password is forgotten, using the method is to boot the MySQL server to ignore loading authorization table.
The way that MySQL uses usernames and passwords differs a lot from
This is because you have installed MySQL in a step to check the "ADD firewall exception for this port", but your server's Windows Firewall is not open, so there will be this prompt, generally click OK, OK, No system errors are generated.
Windows
1.character_set_server and Collation_server
These two variables are the character set of the server. They can be set by--character-set-server and--collation-server when the system is started. If not, the system will set the two variables to default
first step-install MySQL
Download this server, MySQL GUI tool, and MySQL ODBC driver to http://dev.mysql.com/downloads/. The servers you can choose from are: 5.0, 5.1 or 6.0. Then install them.
Considerations during the installation:
Your firewall
This article records the MySQL 5.7.14 installation configuration code, details as follows
Os:centos 6.6Db:mysql 5.7.14
1. Download MySQL
Cd/tools
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.14-linux-glibc2.5-x86_64.tar.gz
2.
Resource type
Two resource types are used in the MySQL module. The first is the connection handle for the database and the second is the result set returned by the SQL query.
Predefined constants
The following constants are defined by this
Objective
Index is the data structure that helps MySQL get data efficiently. It is critical for high performance, but people often forget or misunderstand it. Indexes are more important when the data is larger. Small, lightweight databases can have
First of all, I use the MySQL database is 5.7.12 version.
The problems that arise:
1. Insert data display error, insert unsuccessful, appear: incorrect string value: ' \XCD\XF5\XD5\XBC\XBE\XA9 ' for column ' sname ' at row 1
2. Insert Chinese,
LOCATE (SUBSTR,STR)
POSITION (substr in str)
Returns the position of the substring substr the first occurrence in string str. If substring substr does not exist in STR, the return value is 0:
mysql> SELECT LOCATE (' Bar ', ' Foobarbar ');
-> 4
mysql>
1. View configuration file:
Skip-networking #注释掉 because it's shielding everything. TCP/IP connection
bind-address = 127.0.0.1 #它和上一个选项是异曲同工, if you want to connect remotely, you have to comment out
2. If the above work has been done or
Date_add (date, INTERVAL expr type) date_sub (date, INTERVAL expr type )
These functions perform date operations. Date is a DATETIME or date value that specifies the starting time. expr is an expression that specifies the value of a time
Definition of a variableThe variable definition in MySQL uses declare to define a local variable, which can only be used in a begin...end block, and the variable must be defined at the beginning of the compound statement, and before other statements,
System: Centos6.0 32 bits
First, install MySQL
#yum-y install MySQL mysql-server mysql-devel
Configure MySQL boot up service
#chkconfig--add mysqld (add MySQL service to the list of services)
#chkconfig mysqld on (setting up the MySQL service
The previous company used an online search for MySQL automatic backup to the FTP shell script, has been used well. But the problem is with more and more backup files, have to regularly clean up FTP old backup files, very inconvenient.
In fact,
To create a user information table:
Copy Code code as follows:
CREATE TABLE Tbl_auth_user (
USER_ID VARCHAR (Ten) is not NULL,
User_password CHAR (not NULL),
PRIMARY KEY (user_id)
);
INSERT into Tbl_auth_user (user_id,
Every technology uses a lot of people, someone will optimize it to make a simple, practical, popular tool, which is very convenient for the beginning of the and try, but for a long time to study or work this aspect of the human technical staff is
--Basic query
SELECT * FROM Pet
--Lists the specified columns
Select name, owner form Pet
--Direct arithmetic operations, alias Fields
Select sin (1+2) as Sin
--where conditions
SELECT * FROM pet where (birth> ' 1980 ' and species= ' dog ')
One, what is a database?
A database is a warehouse that organizes, stores, and manages data according to data structures, and each database has one or more different APIs for creating, accessing, managing, searching, and replicating the data that
Variables like ' character_set%% ' by show
There are several ways to modify MySQL encoding:
1. Modify My.ini (under Windows) or/ETC/MY.CNF (under Linux) via configuration files
Add the following separately
[Mysqld]
Character_server_set=utf8
[
Installation Environment
CentOS 5.4
MySQL 5.1.xx with rpm direct installation
Xtrabackup 1.2.22 with RPM direct installation
Copy Code code as follows:
[Mysqld]
Server-id = 1
Log-bin
Innodb_flush_log_at_trx_commit=1
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