Tag Archives: 5.1

MySQL: upgrade from 5.0 to 5.1

1) stop all applications which works with mysql
2) make mysqldump(with right options like --single-transaction and --master-data)
3) make logs flush; in mysql
4) stop mysql
5) backup /var/lib/mysql folder (it's default path to mysql folder)
6) install new version of mysql (in ubuntu: aptitude install mysql-server-5.1
7) execute mysql_upgrade command in console
8) start mysql

mysql 5.1: replication

Master server

edit /etc/mysql/conf.d/replication.cnf

1
[mysqld]

1
server-id        =
1
1

1
# By
1
default
1
, the directory is written to the directory of database.

1
# IMPORTANT: If you lose the base, having a backup and binary logs, you can restore a database at the time of collapse. For
1
this

1
# reason, the logs and databases should be stored at physically different carriers.

1
log-bin          = /db/log/mysql-bin.log

1
# This variable applies when binary logging is enabled. It controls whether stored function creators can be trusted not to create #stored functions that will cause unsafe events to be written to the binary log.

1
log_bin_trust_function_creators =
1
1

1
# The number of days
1
for
1
automatic binary log file removal..

1
expire_logs_days =
1
90

1
# >=
1
5.1
1
.
1
28
1
- you is unable to start shard without
1
this
1
option.

1
# < 
1
5.1

   

1
- you is unable to start mysqld server without
1
this
1
option.

1
binlog_format    = MIXED

1
max_binlog_size  = 100M
# In addition, the transaction can determine what needs to change the data and may be useful to diagnose various problems.
# For MySQL <= 5.0: We don't recommend to use this option due to the replication became fragile.

mysql -uroot -p

1
GRANT REPLICATION CLIENT, REPLICATION SLAVE ON *.* TO replicator@
1
'%'
1
IDENTIFIED BY
1
'****'
1
;

/etc/init.d/mysql restart
Continue reading mysql 5.1: replication