3 月 012014
 

 



mysql 遇到的一些问题

alter table message_board_reply_sequence      auto_increment=10001;
alter table message_board_sequence            auto_increment=10001;
alter table room_activity_sequence            auto_increment=10001;
alter table room_message_board_reply_sequence auto_increment=10001;
alter table room_message_board_sequence       auto_increment=10001;
alter table room_sequence                     auto_increment=10001;
alter table room_topic_sequence               auto_increment=10001;
alter table user_sequence                     auto_increment=10001;
auto_increment=10001;
 

#######mysqld_multi stop 关闭不了数据库

1:授权
grant shutdown on *.* to ‘shutdown’@’localhost’ identified by ‘shutdown123’;
flush privileges;
2:更改my.cnf的配置
[mysqld_multi]
mysqld = /usr/local/mysql/bin/mysqld_safe
mysqladmin = /usr/local/mysql/bin/mysqladmin
user = shutdown
password = shutdown123 (对应的授权账号和密码)
#######同步指定端口的数据库以及双数据库的配置
CHANGE MASTER TO MASTER_HOST=’192.168.0.88′,master_port=3307,   MASTER_USER=’repl’,  MASTER_PASSWORD=’ceshi160′,  MASTER_LOG_FILE=’mysql-bin.000001′,   MASTER_LOG_POS=107;
如果变成双示例记得修理my.cnf
[mysqld_multi]
mysqld     = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin
user = shutdown
password = shutdown123
修改  [mysqld1]
添加
[mysqld2]
socket     = /tmp/mysql.sock2
port       = 3307
pid-file   = /var/lib/mysql2/hostname.pid2
datadir    = /var/lib/mysql2
user            = mysql
server-id       = 81
binlog-do-db = shanliao_sequence
log-bin=mysql-bin

auto-increment-increment = 1
auto-increment-offset = 1

 

 Posted by at 下午 3:50

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny