ALTER PUBLICATION
Description
ALTER PUBLICATION can change the attributes of a publication.
You must own the publication to use ALTER PUBLICATION. Adding a table to a publication additionally requires owning that table.
Syntax
1. ALTER PUBLICATION pubname ACCOUNT
2. { ALL
3. | account_name, [, ... ]
4. | ADD account_name, [, ... ]
5. | DROP account_name, [, ... ]
6. [ COMMENT 'string']
Explanations
- pubname: The name of an existing publication whose definition is to be altered.
- account_name: The user name of the owner of the publication.
Examples
1. create account acc0 admin_name 'root' identified by '111';
2. create account acc1 admin_name 'root' identified by '111';
3. create account acc2 admin_name 'root' identified by '111';
4. create database t;
5. create publication pub3 database t account acc0,acc1;
6. mysql> alter publication pub3 account add accx;
7. show create publication pub3;
8. Query OK, 0 rows affected (0.00 sec)
10. mysql> show create publication pub3;
11. +-------------+-----------------------------------------------------------------------+
12. | Publication | Create Publication |
13. +-------------+-----------------------------------------------------------------------+
14. | pub3 | CREATE PUBLICATION `pub3` DATABASE `t` ACCOUNT `acc0`, `acc1`, `accx` |
15. +-------------+-----------------------------------------------------------------------+
16. 1 row in set (0.01 sec)
18. mysql> show publications;
19. +------+----------+
20. | Name | Database |
21. +------+----------+
22. | pub3 | t |
23. +------+----------+
24. 1 row in set (0.00 sec)
