MySql adds user, authorization, password modification, and other statements

1. Create a user. // Log on to MYSQL@> Mysql-u root-p@> Password// Create a userMysql> insert into mysql. user (Host, User, Password, ssl_cipher, x509_issuer, x509_subJect) values ("localhost", "pppadmin", password ("passwd "),'','','');In this way,

Mysql is stuck. Most threads are in the sending data state for a long time.

There is a server with a large volume of access traffic. There are nearly 600 million dynamic PVS per day, and the database query average is nearly times per second.On the other server, the program is the same as this one, but only about dynamic PVS

Mysql database category

/*** @ Purpose: Mysql database category* @ Package:* @ Author: lisen@sellingclub.cn* @ Modifications:* @ See:* @ Time: 2008.10.10*/Class DB_MYSQL{// ================================================ ======================================Private $

Considerations for upgrading MySQL on Windows

Back up old dataStop old ServerDelete the mysql service from the windows System Service and run the following command:C: \> C: \ mysql \ bin \ mysqld -- remove install mysql using an executable installation file, or decompress a binary compressed

How to Use distinct to query multiple unique record values in mysql

When using mysql, you sometimes need to query records with unique fields. Although mysql provides the keyword distinct to filter out redundant duplicate records, only one record is retained, but it is often used to return the number of records that

Learning query statements from a MySQL example

Since I have been in school for so many years, I have come to the conclusion that learning from an example is the fastest and most effective, and can cultivate a strong practical ability. This is a good way to learn. Try not to access. For example,

Performance Comparison Test of MyISAM and InnoDB table storage structures in MySQL

MySQL supports two main table storage formats: MyISAM and InnoDB. InnoDB was used for a project last month. The results are very slow and only a dozen pieces can be inserted in one second. Later I changed to MyISAM format and inserted tens of

How to add new user permissions in MySQL

There are two different ways to add users: using the GRANT statement or directly operating the MySQL authorization table. The better way is to use the GRANT statement, because they are more concise and seem to have fewer errors.The following example

MySQL and stored procedure related information

MySQL is "the most popular open database in the world", at least for MySQL Web sites. However, no matter how popular MySQL is, many companies are resistant to MySQL usage. This phenomenon comes from several reasons, some of which mistakenly think

Master and slave have equal MySQL server ids

This afternoon, I copied the data from mysql. After all the servers are configured, I found that the following errors were reported. Copy codeThe Code is as follows:Last_IO_Error: Fatal error: The slave I/O thread stops because master and slave have

Simple display of MySQL query results by percentage

I found some information, and then I used the two functions concat () and left () in MySQL string processing ()1. CONCAT (str1, str2 ,...)Returns a string from the parameter link. If any parameter is NULL, return NULL. There can be more than two

The difference between on and where in left_join and inner_join in SQL statements

Table a (id, type ):Id type----------------------------------1 12 13 2Table B (id, class ):Id class---------------------------------1 12 2SQL statement 1: select a. *, B. * from a left join B on a. id = B. id and a. type = 1;SQL statement 2: select

Common commands used for monitoring during MySQL Database Maintenance

Status = show status like '%' [Example: show status like 'com _ select']Variables = show variables like '%' [Example: show variables like 'query _ cache_size '] 1. MySQL Query Count (status)Com_select; Com_update; Com_insert; Com_delete;

Mysql keyword relevance sorting method detailed example analysis

Small projects sometimes need to use keywords to search for relevance sorting. If sphinx appears to be a zombie, use order by of mysql to deal with it.Method 1:Copy codeThe Code is as follows:Select * from articles where (title LIKE '% keywords %')

How to install the MySQL support module in Python

After installing the MySQL support library for Python, I encountered a series of problems at one time. Fortunately, Google solved them all. Record it and forget it.1. Download the Python MySQL support libraryAddress:

Notes on using VirtualBox to build a MySQL test environment

Network Environment:HOST: Win7VirtualBox 4.1.4 + Ubuntu 11.10 server 64bitWhen the host uses a network cable, the client uses the Atheros AR8131 PCI-E Gigabit Ethernet Controller in Bridged Adapter mode to access the Internet.When the host uses

SQL statement used by MySQL to query the disk space used by all databases and the size of all tables in a single database

SQL statement used to query the disk space of all databases: Copy codeThe Code is as follows:Select TABLE_SCHEMA, concat (truncate (sum (data_length)/1024/1024, 2), 'mb') as data_size,Concat (truncate (sum (index_length)/1024/1024, 2), 'mb') as

Detailed parsing of modifying the default Character Set of mysql

(1) The simplest modification method is to modify the character set key value in mysql's my. ini file.,For example, default-character-set = utf8Character_set_server = utf8 After modification, restart the mysql service, service mysql restartUse mysql>

How to solve Chinese garbled characters in the csv file imported and exported by Mysql

Import csv:Copy codeThe Code is as follows:Load data infile '/test.csv' into table table_nameFields terminated by ', 'optionallyEnclosed by '"'escaped '"'Lines terminated by '\ r \ N'Ignore 1 lines; Export csv:Copy codeThe Code is as follows:SELECT

Check and fix mysql database tables

01#! /Bin/sh02# Code by scpman03# Function: Check and fix mysql database tables04# Add the script to the timer. When the script is executed, it will read the database, list all the tables to be repaired, timing them, and start fixing.05# The damaged

Total Pages: 3233 1 .... 2855 2856 2857 2858 2859 .... 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.