Web site appears MySQL version can not be less than 4.1 how to do
Recently encountered a lot of customers have said database problems, Web site open Prompt Database 4.1, this is how it? inquired in detail, just know that so, this side will give you
MySQL instance using ALTER TABLE command to modify the table structure
The MySQL ALTER TABLE statement can modify the basic structure of the table, such as adding fields, deleting fields, adding primary keys, adding indexes, modifying field data
Today, I encountered the problem of modifying the MySQL default character set code, toss a half-day resolved, and quickly recorded, then do not have to toss every time.
The command to view the MySQL character set is "show variables like '%char% ';"
The problem is this:
A test table, the character set used by the latin1.
Select to_id from test where to_id= ' cn like _ King ';
+---------------+
| to_id |
+---------------+
| CN Ceramics _ Pottery |
| cn like _ King |
+---------------+
2 rows in
one, the connection MySQL. Format: mysql-h host address-u user name-P user Password1, Example 1: Connect to MySQL on this machine.First in the Open DOS window, and then into the directory Mysqlbin, and then type the command mysql-uroot-p, enter
#BEGIN CONFIG INFO
#DESCR: 4GB RAM, using only InnoDB, ACID, a small number of connections, large queue load
#TYPE: SYSTEM
#END CONFIG INFO
#
# This MySQL profile example for 4G memory, and in www.bt285.cn bt download with www.5a520.cn novel 520,
How to start/stop/restart MySQL
First, the way to start
1, use service to start: Service mysqld start
2. Start with mysqld script:/etc/inint.d/mysqld start
3. Use Safe_mysqld to start:safe_mysqld&
Second, stop
1, use service to start: Service
First step: Define your backup directory on your Linux server:
Copy Code code as follows:
Mkdir/var/lib/mysqlbackup
Cd/var/lib/mysqlbackup
The second step: The following is the most important step, is to write a scheduled
Kinds of data types
Shaping: can have decimal and hexadecimal representations
Fu: Floating-point numbers consist of a number plus a decimal point plus a number. Two number sequences cannot be empty at the same time.
String: A character or number
Related reading:
MYSQL 5.7.14 Installation Tutorial detailed (decompression version)
Mysql 5.7.14 Use FAQ summary (recommended)
1, decompression
2, in the directory D:\Program files\mysql-5.7.14-winx64 copy My-default.ini, placed in its same
The most recent exposure to a lot of databases was that it had been in contact with SQL Server, but it started to connect to MySQL because of the needs of the project. Below let me this rookie talk about the next experience bar.
For C + +
A few days ago in the development of a system, need to use a random string, but the MySQL library function is not directly provided, it is simple to use the existing functions to scrape out a random string. The following simple to say the
Mysql:mysql cannot delete the foreign key, rename error on the./ruler/test2child to./ruler/#sql2 -298-92 (errno:152)
It used to be a bug in MySQL, but now it's just an unfriendly place in MySQL.
Examples are as follows:
mysql> ALTER TABLE
I met a strange question about exists today.
The first statement is as follows:
Select
count (1) from the
APPLY t
WHERE
EXISTS (
select r.apply_id
from record R
WHERE
t.apply_id = r.apply_id
);
The resulting results are: 89584
The
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
one, the connection MySQL.
Format: mysql-h host address-u user name-P user Password
1, connected to the MySQL on the computer.
First open the DOS window, and then enter the directory Mysql\bin, and then type the command Mysql-u root-p, enter
Copy code code as follows:
DELIMITER $$
CREATE
FUNCTION ' T_girl '. ' Func_rand_string ' (f_num tinyint unsigned, f_type tinyint)
RETURNS varchar (32)
BEGIN
--Translate the number to letter.
--No 1 stands for string.
--
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.
When we enter regardless of the case can be queried data, such as: Enter AAA or AAA, AAA can query the same results, stating that the query condition is not sensitive to case.
Solution One:
So the question of MySQL is suspected. Do an experiment:
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