Save the following code as phpinfo.php:
Phpinfo ();?>
Mysql-------MySQL Support EnabledActive Persistent Links 1Active Links 1Client API version 5.0.37-------If you do not see it and you are sure that the database is installed, you may need to
1. mysql under Windows system
Modify the value of "Max_connections" in the configuration file "My.ini", and change the value to a large size.
max_connections = 1000
2, the Linux system under the MySQL
Modify the value of "Max_connections" in the
By default, MySQL allows uploading files up to 2M, for some large applications is obviously not enough, so we need to change the default settings to import large
File
The modified method is done by modifying the PHP configuration file php.ini.
To avoid garbled when you want to import, as long as you ensure that the encoding of data files and even the encoding of the import is always possible, note: Not the same as the encoding of the database. For example: Data file Data.sql, encoded as
Use show processlist to view problems
Cause: The reason is that when you use the InnoDB table type,Default parameter: Innodb_lock_wait_timeout set the lock wait time is 50s,Because some lock wait more than this time, so the wrong.
You can take
MySQL command mode is connected to MySQL as follows
The code is as follows
Copy Code
Mysql-h host Address-u user name-P user Password
1, connected to the MySQL on the computer.
First open the DOS window, then
Installation EnvironmentCentOS 5.4MySQL 5.1.xx with rpm direct installationxtrabackup 1.2.22 with rpm direct installation1. master:/etc/my.cnf
The code is as follows
Copy Code
[Mysqld]Server-id = 1Log-binInnodb_flush_log_
Here are one by one explanations:
1. Left intercept (str, length)
Left (str, length)
Description: Left (intercepted field, intercept length)
The code is as follows
Copy Code
Mysql> Select Left (' 111cn.net ', 3);+-----
1, Example 1: Connect to MySQL on this computer
First in the Open DOS window, and then into the MySQL installation directory under the bin directory, such as: D:mysqlbin, and then type the command mysql-uroot-p, enter after the prompts you to lose
Forgot the MySQL root password, you can reset it in the following ways:
1. Kill off the MySQL process in the system;
The code is as follows
Copy Code
Killall-term mysqld
2. Use the following command to start
Insert is used to insert new rows into an existing table. INSERT ... The values statement inserts a row based on an explicitly specified value. Let's take a look at the definition of the INSERT statement standard, which can be omitted in []:
Update syntax
The code is as follows
Copy Code
UPDATE [low_priority] [IGNORE] Tbl_nameSET col_name1=expr1 [, col_name2=expr2 ...][WHERE Where_definition][Order BY ...][LIMIT Row_count]
Instance
The
Cases
The code is as follows
Copy Code
mysqldump--default-character-set latin1-uroot-pxxx database name >/tmp/old.sql
Similarly, the same is true for exports:
The code is as follows
Copy Code
Solutions
Simply set your table ID to self increase, and then the ID no matter when inserting the data.
or set MySQL configuration
The workaround is to change the configuration in MySQL My.ini
Find Sql-mode in My.ini,
Default to
Method One, has the server Management permission modification method
View database-level character set support
The code is as follows
Copy Code
Mysql> show VARIABLES like character_set_% ';Mysql> show VARIABLES like
MySQL uses rand () for random queries
The code is as follows
Copy Code
1 ORDER by rand () limit X
Random MySQL query efficiency is extremely low, tonight I met a few wordpress plugin author, random value,
In Linux, there are usually no garbled characters. Recently, many of my friends have asked me this problem in Windows. Now let's take a look at it.1. in the mysql database, the default database type is latin1. You must change the default data type
Let's talk about the local environment. centos 6.5 is 64-bit. nagios is installed in yum and the version is Nagios Core 3.5.1. The built-in check_mysql1. Modify commands. cfg.# Vim/etc/nagios/objects/commands. cfg # add the following content Define
First, the php compressed package (PHP4.3.2 here for example) decompress to C: php-4.3.2-Win32 directory, and then find a named php. ini-recommended file, rename it php. ini.2. Open the file and find extension_dir = ". /", change it to extension_dir
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