The explain command is the first recommended command to address database performance, and most performance issues can be easily resolved with this command, explain can be used to see how SQL statements are executed, to help select better indexes
Commonly used in a total of 4 methods, as follows: 1. Using the Locate () method1.1. General Usage:SELECT ' column ' from ' Table ' where locate (' keyword ', ' condition ') >0Java-like indexOf (), but locate () can only find the returned result is
CREATE PROCEDURE ' test '. ' New_procedure ' () begin--need to define a variable that receives cursor data DECLARE a CHAR (+); --Cursor DECLARE cur cursor for SELECT i from test.t; --Traversal data end flag DECLARE done INT DEFAULT FALSE;
Troubleshoot remote connections MySQL error 1130Remotely connect to MySQL server's database, error code is 1130,error 1130:host xxx.xxx.xxx.xxx are not allowed to connect to this MySQL serverConjecture is a problem with user permissions that cannot
Installing navicat for MySQL software
After you create a new database, create a new table
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M00/9A/0E/wKiom1lQwm3yDZsbAAJMPgMZBuY583.png-wh_500x0-wm_ 3-wmp_4-s_2895721085.png "style="
1. Newly opened cloud server, need to detect whether the system comes with the installation of MySQL# yum list installed | grep mysql2. If you find a system that comes with MySQL, do it decisively# yum -y remove mysql-libs.x86_643. Wherever you
I. Overview1. Definition 2, the Classification of locks① from the type of data operation (read \ Write)Read lock (Shared lock): For the same data, multiple read operations can be performed simultaneously without affecting each other.Write lock
New Date (); New SimpleDateFormat ("Yyy-mm-dd HH:mm:ss"); int seconds=1481194381; Long millions=new Long (seconds) *1000; Nedate.settime (millions); System.out.println (Dateformat.format (nedate));Time
Tag:change block pos war Password Process exit centos server
Translated from: http://www.cnblogs.com/sbaicl/articles/3132010.html
1. First verify that the server is in a secure state, that is, no one
1 [Mysqld]2Basedir =/data/MySQL3DataDir =/data/Mysqldata4Tmpdir =/data/mysqltmpdata//mysql Query Temp directory, avoid due to lack of disk space, resulting in related5Port =33066Socket =/data/mysql/Mysql.sock7init-connect='SET NAMES UTF8the
Upload files and unzip them[Email protected] ~]# cd/usr/local/ls mysql*mysql-5.7. 9-LINUX-GLIBC2. 5-x86_64. Tar tar zxvf mysql-5.7. 9-LINUX-GLIBC2. 5-x86_64. tar. gzCreate a soft connection after the decompression is complete[Email protected] local]
MySQL5.6 Master-slave replicationFive steps to complete MySQL master-slave replication1./ETC/MY.CNF configuration of master and slave server, set unique ID to enable binary log.2. Create a master-slave copy of the account and authorize replication
Master (Master) 192.168.1.10 machine settings:[Email protected] mysql]# VI my.cnfAdd the following configuration under the [MYSQLD] nodeServer-id=1Log-bin=mysql-bin #这个一定得设置, otherwise there is no log, from the database will be error[Email protected]
Similar to other Linux versions!!!
Modify MySQL Login settings
Vim/etc/my.cnfFor example:[Mysqld]Datadir=/var/lib/mysqlSocket=/var/lib/mysql/mysql.sockSkip-grant-tablesAdd this lineSave and exit. 2. Restart MysqldService Mysqld Restart
1. Background* MySQL is a relational database management system developed by the Swedish MySQL AB company and currently belongs to Oracle products. MySQL is one of the most popular relational database management systems, and MySQL is the best RDBMS (
The modified users are listed as root.first, the root of the original myql password;Method One:Outside the MySQL system, use the Mysqladmin#mysqladmin-u root-p Password "test123"Enter Password: "Enter the original password"Method Two:By logging into
Common data types in MySQLone, character type①char (n): fixed N-character length string, if the length is not enough automatic space to be padded; Range of N 0~255②varchar (N): Storing variable-length strings, most commonly③text: Storing
Mysql tuning process
A few days ago, I made a database query, which was slow. I made a query and recorded it here to facilitate later reading,
1) first review the query Index
(Tue Jun 27 12:33:24 2017) db_1> show keys from xxxx ;=> (same as show
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