Deploying and Tuning 2.9 MySQL master-slave configuration-3

Source: Internet
Author: User

Test

Unlock the main MySQL first

>  unlock tables;

Delete a table

> Use db1; > show tables; > drop table  help_category;

Go and see it from MySQL.

> Use db1; > Show tables;
No help_category.

////////////////////////////////////////////////////////////////////////
Create a table
Show create table user;
> CREATE TABLE ' Wangshaojun '

(
' Host ' char COLLATE utf8_bin not NULL DEFAULT ' ',
' User ' char (+) COLLATE utf8_bin not NULL DEFAULT ' ',
' Password ' char (CHARACTER SET latin1 COLLATE latin1_bin not NULL DEFAULT ' ',
' Select_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Insert_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Update_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Delete_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Create_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Drop_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Reload_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Shutdown_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Process_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' File_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Grant_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' References_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Index_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Alter_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Show_db_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Super_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Create_tmp_table_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Lock_tables_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Execute_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Repl_slave_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Repl_client_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Create_view_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Show_view_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Create_routine_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Alter_routine_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Create_user_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Event_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Trigger_priv ' enum (' n ', ' Y ') CHARACTER SET UTF8 not NULL DEFAULT ' N ',
' Ssl_type ' enum (' ', ' any ', ' X509 ', ' SPECIFIED ') CHARACTER SET UTF8 not NULL DEFAULT ' ',
' Ssl_cipher ' blob not NULL,
' X509_issuer ' blob not NULL,
' X509_subject ' blob not NULL,
' Max_questions ' int (one) unsigned not NULL DEFAULT ' 0 ',
' Max_updates ' int (one) unsigned not NULL DEFAULT ' 0 ',
' Max_connections ' int (one) unsigned not NULL DEFAULT ' 0 ',
' Max_user_connections ' int (one) unsigned not NULL DEFAULT ' 0 ',
PRIMARY KEY (' Host ', ' User ')
) Engine=myisam DEFAULT Charset=utf8 collate=utf8_bin comment= ' Users and global privileges ';

This string is the copy of the above command inside,

View List

> Show tables;

One more Wangshaojun table.

In the view from MySQL, as many as a table: Wangshaojun

//////////////////////////////////////////////////////////////////////////////////////

The main delete db1 library, view the library, no db1.

> drop database db1; > show databases;

From view db1 the table below, error. View library, no db1.

> show tables; > show databases;















Deploying and Tuning 2.9 MySQL master-slave configuration-3

Related Article

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.