MySQL common operation in work

Log in to MySQL, if you are connecting to a remote database, you need to specify hostname with-H.#mysql-H hostname-u root-p#mysql-uroot-p-s/data/3306/mysql.sock #本地登录Update permissions/privileges for the database.mysql> flush Privileges;View the

mysqldump use of MySQL data backup

Mysqldump is commonly used in MySQL database logical backups.1. Various usage instructionsA. The simplest usage:Mysqldump-uroot-ppassword [database name] > [dump file]The above command backs up the specified database to a dump file (dump file), such

MySQL Slow query troubleshooting optimization

Instant Analysis:Show full percesslist;Turn on the slow query log and analyze the log records:Long_query_time = 1Log-slow-queries =/data/3306/slow.logLog_queries_not_using_indexesSplit log sent to mailboxAdd explain to see how the statement is

MySQL data type

Reprinted from: http://www.jb51.net/article/55853.htmObjectiveAs in C + +, how many bytes are required to define an int type, and how many bytes are required to define the double type, MySQL has strict control over the data in each column of the

Four ways to start MySQL

Four ways to start MySQL:1, MysqldStart the MySQL server:./mysqld--defaults-file=/etc/my.cnf--user=rootClient connections:MySQL--DEFAULTS-FILE=/ETC/MY.CNFOrMysql-s/tmp/mysql.sock2, Mysqld_safeStart MySQL

MySQL Common commands

Show all databases: show databases; use a database: Usethe name of the database; Show all tables for one database show FullTables fromMblogswhereTable_type= 'base Table'; Show database encoding show charset create a formCreate TableMblogs. M_LINKSS (

Centos6.5 Installation Configuration Apache+php+mysql environment

1. Preparatory work# yum-y Update && yum-y install vim make cmake gcc gcc-c++ bison bison-devel ncurses ncurses-devel autoconf Auto Make wget unzip Lrzsz zlib libgcrypt* libtool*  2. Installing apache2.2# wget

MySQL Master-slave replication (log-based)

Master (Master) operationExperiment Machine: two setsip:192.168.1.5 192.168.1.10Operating system: Linux RedHat 6.5MySQL version: 5.6.31# VIM/ETC/MY.CNF#log_slave_updates comment out this lineServer-id=1 Change the ID number to 1Slave (from)

Knowledge of MySQL database features

Recently interviewed by the interviewer often asked about the database knowledge, so summed up the interviewer asked questions have been gradually understanding of the database1, before the Baidu interview officer asked me a special basis of SQL

Python installation operation MySQL database.

Take Ubuntu and MySQL for exampleCheck your machine for a database that's not installed.1 [email protected]:~$ sudo service mysql start2Trying to enter a command to open a different version of MySQL will have different effects, I do not have any

MySQL forgot root password workaround

Change Password1. Newly Installed database setup passwordMysqladmin-u Root Password 1234562. If your root now has a password (123456), then the command to change the password to ABCdef is:Mysqladmin-u root-p Password abcdefNote that the command will

Maridb/mysql Source Read 1

Transfer from http://blog.csdn.net/theorytree/article/details/7335612The MySQL server's main () in/sql/main.cc, the actual entry point in/sql/mysqld.cc.We start reading directly from Mysqld_main ().First understand some of the more important macro

MySQL Sub-query

1 single value (Scalar operand)The corresponding value is returned only if the outer layer (Parent) is not empty, otherwise null is returned.Note:for the subquery just shown, if t1 were empty, the result would be NULL even though s2 is NOT NULL .2

Differences between int, bigint, smallint, and tinyint in MySQL

An exact numeric data type that uses integer data.bigintInteger data (all numbers) from -2^63 (-9223372036854775808) to 2^63-1 (9223372036854775807). The storage size is 8 bytes.IntInteger data (all numbers) from -2^31 (-2,147,483,648) to 2^31-1 (2,1

Mysql 5.7 CENTOS7 Environment installation

Download the installation of red Hat Enterprise Linux 7/oracle Linux 7 (Architecture Independent) at the following URL, RPM package (MYSQL57-COMMUNITY-RELEASE-EL7 -8.NOARCH.RPM)http://dev.mysql.com/downloads/repo/yum/can be directly executedYum

Zabbix upgrade MySQL Optimizer

./configure--enable-server--enable-agent--with-mysql--enable-ipv6--with-net-snmp--with-libcurl--with-libxml2Apt-get Install Libmysqlclient-dev--aptitude Search SNMP | grep DevApt-get Install LIBXML2 Libxml2-devApt-get Install Libsnmp-devApt-get

MySQL Client Add stored procedure

DROP PROCEDURE IF EXISTS add_costitem;DELIMITER $$CREATEPROCEDURE ' cloud_org '. ' Add_costitem ' ()BEGIN#定义 variablesDECLARE Costtypeid BIGINT;DECLARE Costtypecode VARCHAR (32);DECLARE Accttypeid INT;DECLARE Bizzhycode VARCHAR (40);DECLARE

MySQL Change root password

Method 1: Use the Set password commandMysql-u Rootmysql> SET PASSWORD for ' root ' @ ' localhost ' = PASSWORD (' Newpass ');Method 2: Use Mysqladminmysqladmin-u root Password "Newpass"If Root has already set a password, use the following

MySQL remote connection does not open the workaround

MySQL remote connection does not open the workaround1, change the table method .Please use MySQL management tools such as: SQLyog Enterprise, navicate MySQLIt may be that your account is not allowed to log on remotely, only on localhost. This time,

What is the storage engine and the characteristics of different storage engines?

What is the storage engine and the characteristics of different storage engines? I used to play with Oracle databases all day round the business needs and execution plans. I just got in touch with Mysql and saw that the storage engine was not

Total Pages: 3233 1 .... 1606 1607 1608 1609 1610 .... 3233 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.