Login-->mysql-uroot-p123456 after installationShow all databases-->show databases;Create a new database-->create database name;Delete database-->drop database name;Use database-->use datsbase database name;Creating Tables-->create table name ([]
Cause investigation:Receive a large number of email alerts Presumably, ask colleagues what happened? Colleague login from the library view, found the following error prompt, indicating that synchronization with the main library failed, always stuck
According to the error, the obtained main library file format is wrong.First, lock the master-slave Normal LibraryMysql> flush tables with read lock; Lock tableUnlock tables; UnlockSHOW MASTER STATUS;Main MySQL add user to connect from server: GRANT
1. First describe how to run the command line as an administrator and modify the administrator user password:to run the command line as an administrator:Method 1: Start--All Programs--attachments--command prompt--right--run as Administrator Method 2:
-, apahce associated php, download PHP When choosing thread Safe, this version with Php5apache2_4.dll" D:/php/php5apache2_4.dll " AddHandler application/x-httpd-"d:/php"-Start Apache with the following error check if Port 80 is occupied-, Apache 2.4
For a user, there are three things about permissions: What permissions I have (how to view), how I delegate permissions to others (how to authorize), and how to retrieve permissions. InThere are three types of syntax that can be done in MySQL:First,
1. Use mysqladmin to create a password for the root user of MySQLMysqladmin-uroot password ' abc.123 '2. If you forget the root password of MySQLEdit/ETC/MY.CNFAdd the following statementSkip-grant3. No password required for direct login after
1. For the convenience of database query problem, can establish important table log backup record table, add in Main table, modify, delete add trigger, modify trigger to increase trigger field point, limit condition.The database log table is more
Connection and shutdown of 1.mysql databasesTo connect to a database:Mysql-h Server host address-u user name-p passwordTo close the connection:Enter exit or quit at any time2. Create a new user and authorizeGrant permissions on the database. Data
From:http://www.cnblogs.com/allenblogs/archive/2010/08/12/1798247.html1. First verify that the server is in a secure state, that is, no one can connect to the MySQL database arbitrarily.Because the MySQL database is completely password-protected
First, create a table code formatCREATE table ( [NOT NULL], ... )Cases:#人员基本信息表CREATE TABLE info//Create tables named info(Xuhao int PRIMARY Key auto_increment,//Build column named Xuhao, data type integer type, set as primary key and self-growing
Optimization Order:
Select the appropriate engine and table structure and data type
Build an index and optimize SQL.
Increased cache, Redis, memcache.
Master and slave, main master, read/write separation.
MySQL comes with
Tags: mysql server cachedisk2012-08-23 23:06 23377 People read comments (0) favorite reports Classification:MySql (+)1.show statusthreads_connected Current number of connectionsConnections the number of connections that attempted to connect to
Create a tableCREATE TABLE Table name (Column name data type constraints,Column name data type constraint conditions);Constraints include: PRIMARY key primary keyAuto_increment Self-growthNot NULL non-nullForeign key (from table column) references
Select A.id,a.ssmz, (select count (SSMZ) from Shop_tourist_key b where b.ssmz=a.ssmz) as CountFrom Shop_tourist_key a WHERE a.ssmz are not null GROUP by A.SSMZ LIMIT 0, 3;Select A.id,a.ssmz, (select count (SSMZ) from Shop_tourist_key b where
1. Simple querySELECT * from info;Select Code as ' Code ', name as ' name ' from info;2. Conditional querySELECT * from car where code = ' c002 ';SELECT * FROM car where brand = ' b001 ' and power = 130; #或用or3. Fuzzy querySELECT * from car where
MySQL is always a problem yesterday, when the various programs run, the connection has been disconnected.Causes for this problem:1. Maximum number of connections2. Network problems3. mysql Server resource issuesHowever, none of the 3 most common
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