1. install MySQL sudo apt-get install mysql-server mysql-client2. Verifying the installationsudo service MySQL restart3. Verify that MySQL is started PS Aux|grep MySQL4. using the databasemysql> CREATE database name DEFAULT Charset=utf8; Create a
Before the use of SQL statements are directly search commands, usually do not pay much attention to remember them, interview when the face of SQL statements but found how also write bad. So now is still the common list, in need of time can be
"Go" MySQL Database for internal connection, left join, right connectionInternal connection: The data corresponding to two tables are isolatedOuter joins: Isolate the corresponding data based on a tableFirst create the table in the database with the
MySQL Basic operationTo display the currently existing database:show databases;DatabaseInformation_schemaMysqlPerformance_schemaCreate a databaseCreate database user;Note: Under UNIX, the database name is case-sensitive (unlike the SQL keyword), so
MySQL backup The logical backup in MySQL is to back up the data in the database as a text file, and the backed up files can be viewed and edited. In MySQL, use the Mysaldump tool to complete the backup. There are 3 ways to call Mysqldump:
Using the command to implement backup MYSQLL provides a mysqldump command that we can use to back up data. Follow the prompts to enter the password, this will be the TM database all the table structure and # Mysqldump-u ROOT-P TM > Tm_050519.sql
In the process of using MySQL, MySQL parameters are often set and adjusted as needed. As a PAAs version of Mysql,mysql Database on Azure has some limitations on parameter settings, and customers cannot modify system parameters like MySQL deployed
Database login:Mysql-h ip-p Port-U account –pEnter, and then type the passwordTo create a user:MySQL>insert into MySQL. User (Host,uservalues(' localhost ', ' username ', password (' password '));Refresh System Permissions TableMySQL>privileges;For
MySQL High-Availability service deploymentMySQL master-slave setup is complete, (MySQL master-slave deployment please see MySQL master-slave replication now has a problem, if the master server down, how to quickly restore service? We have two sets
Recovery Level parameter Description:1 (srv_force_ignore_corrupt): Ignores the corrupt page that is checked.2 (Srv_force_no_background): Prevents the main thread from running, as the main thread needs to perform full purge operations, which can
Content= ' Asnfojassozxpdsgdspdps Dragon Rack who proud of the proud search ID plane sweep 'SELECT content from test where ID =1= REPLACE (content, ' ZX ', ' ZZZZ ') where ID =1Content = Asnfojassozzzzpdsgdspdps Dragon Rack who proud of proud
Preparing dataTable User (user), Dept (Department)1: Update one piece of data for a field that matches a single conditionUpdate user U set u.name = ' Test ' where u.id = ' "2:in updating more than one dataUpdate user U set u.name = ' Test ' where
Centos upgrade MySQL version or yum install Mysql5.61. Download the latest RPM file from the MySQL Yum repository: http://dev.mysql.com/downloads/repo/yum/CentOS 6 http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm2.yum Remove MySQL
Add: Create an instance and call save
Update: A. Get instance, then Sava;b.update (Specify column)
Delete: A. Filter (). Delete (); B.all (). Delete ()
Get: A. Single =get (id=1); b. all = All ()
Filtering: Filter (name= ' xxx '), filter
MySQL master-Slave synchronization processThe following is from the old boy education1. Execute start slave on slave server and turn on master-slave copy switch.2. At this point, the IO thread of the slave server connects to the master server by
The backup of the database is an extremely important thing. If you do not have a backup, you will be crazy if you encounter the following conditions:UPDATE or DELETE whitout where ...Table was DROPPed accidentally ...INNODB was corrupt ...Entire
Test environment:Os:rhel5Mysql:mysql-5.6.25-linux-glibc2.5-i686.tar.gzxtrabackup:percona-xtrabackup-2.2.10-1.el5.i386.rpmHere MySQL generic binary package installation steps omitted ~The MySQL data directory is built on a logical
We did a bit of testing on MySQL dual-master +keepalived high availability,MySQL did the Gtid multithreaded replication, also did the optimization, finally our aim is to see, this high availability in high concurrency high load case, down the
http://blog.csdn.net/m13666368773/article/details/7612113To optimize queries, avoid full table scans, and first consider indexing on the columns involved in where and order by:Try the following tips to prevent the optimizer from mistakenly selecting
MySQL configuration for master-slave replicationFirst, the principleThe distribution of MySQL data across multiple systems is done by copying data from one of the MySQL hosts to the other host (slaves) and re-executing it again. One server acts as
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