MYSQL basic commands

Start: net start mySql; Enter: mysql-u root-p/mysql-h localhost-u root-p databaseName; List databases: show databases; Select Database: use databaseName; List tables: show tables; Show columns from tableName; Create a database: source

A simple solution to the problem of excessive resource occupation by mysql

In linux, it is often the case that VBB is used in a forum system such as slow, mysql is suspended, and there are too many sleep processes. As a result, the system was completed for dozens of users.In fact, this is the problem of mysql configuration,

Back up a MySQL database using mysqldump

In practical work, regular database backup is extremely important. When using MySQL, we have a lot of options for database backup. This article will introduce you to how to use MySQL mysqldump to back up the database. I. Importance of Data Backup At

Common knowledge for MySQL database development

MySQL can be said to be the most widely used database for programmers. I will share some common knowledge about MySQL database development and the selection of storage engines, design and use of indexes and optimization of SQL statements when a

Modify the default MySQL encoding settings

Recently, I used the django framework for web development in MacOS, So I installed MySQL5 with MacPorts. However, during the test, the django test framework reports an error because UTF8 data cannot be inserted. We know that the default encoding for

ROLLUP substitution method in MySQL

Extract data from MySQL today. After using ROLLUP statistics, add the project name to the left column of the data and use SQLSQL codeSELECT (case when isnull (PLAYERNO) then playerno = total else playerno end) as playerno, SUM (AMOUNT) FROM

MySQL table_cache optimization (1)

The table_cache parameter sets the table cache quantity. Each connection will open at least one table cache. Therefore, the size of table_cache should be related to the settings of max_connections. For example, for 200 concurrent connections, the

Mysql generates random numbers with fixed digits

The project needs to dynamically generate random numbers with fixed digits, such as 8-bit and 5-bit. The method we saw earlier is as follows: ROUND (RAND (), 5) * 100000) This is not accurate, and there is a probability that four digits will occur.

AB replication (mysql synchronization)

Project Environment:All systems are cent OS 5.5Master Server IP Address: 192.168.19.172 (master)Slave Server IP: 192.168.19.168 (slave)Both of them have set up mysql (the root user and password are empty)1: Set synchronization master and modify the

MySQL Database Synchronization

MySQL Data Synchronization, in the official MySQL website documentation, is called Replication literally meaning, is synchronized. In fact, MySQL synchronization does not use the word "sync", but instead uses replication again, which accurately

Mysql common statements

1. Copy the table structure and data, but do not copy the index and foreign key:Create table a select * from B;2. Copy the table structure, index, and foreign key without copying data:Create table a like B;3. Copy data only:Insert into a select *

MySQL compilation Error

When installing MySQL today, the following error is reported when the./configure command is executed because the package selected by default is not installed in the initial Linux:./Configure -- prefix =/usr/local/mysql -- with-charset = utf8 -- with-

Synchronization of mysql slave lock tables

Problem description:The log update updata on the slave locks the table with the select table from the web request, causing synchronization congestion.The load of mysql slave is soaring, and the website anti-problem is very slow.    Problem Analysis:

Mysql quick backup

  1.1 backup Mysqldump adopts an SQL-level backup mechanism. It imports data tables into SQL script files and is suitable for upgrading between different MySQL versions. This is also the most common backup method. Here are some main parameters of

Connect to MySQL in LAN

  To connect to MySQL in a LAN, you must first enable the remote connection function for MySQL. On the MySQL server, run the following command on the MySQL command line: SQL code Grant all privileges on *. * to root @ "%" identified by '000000'

Mysql configuration instance

  The mysql configuration file on the server is only for reference and record.   # MySQL Server Instance Configuration File #---------------------------------------------------------------------- # Generated by the MySQL Server Instance

Mysql database Stored Procedures

1. Create a stored procedure 1. Basic Syntax: Create procedure sp_name () Begin ......... End Ii. Call the Stored Procedure 1. Basic Syntax: Call sp_name () Note: The stored procedure must be enclosed in parentheses, even if the stored procedure is

Mysql physical backup and Incremental Backup

Physical backup:MysqlShow variables like 'datadir ';Use hellodb;Show table status;MysqlFlush logs with read lock;\ QLvcreate-L 50 M-n mysnap-s/dev/myvg/mydataMysqlUnlock tables;\ QMount/dev/myvg/mysnap/mntCd/mntCd data/LsTar-jcf/root/mysql.tar.bz2

Install mysql in Linux

Install mysql// Upload mysql-5.0.221.tar.gz to this path:/mnt/disk1/program and installTar-xzvf mysql-5.0.221.tar.gzCd mysql-5.0.22# Creating a folderMkdir/mnt/disk1/program/mysql# Create a group/etc vi groupGroupadd mysql# Create a user/home under

Usage of join, left join, and right join in mysql !!!

When I checked the brophp framework today, I conveniently reviewed the combined query in mysql. (In the past, I would use the simplest "select * from..."). Others do not dare to use them as much as they do. I am cleaning out the "blind spots" in the

Total Pages: 3233 1 .... 3194 3195 3196 3197 3198 .... 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.