标签: mysql

  • Mysql database repair

    /opt/local/bin/mysqlcheck -c piwigo piwigo_history -u root -p

    /opt/local/bin/mysqlcheck -r piwigo piwigo_history -u root -p

    piwigo_history ==> Database table name

    piwigo ==> Database name

  • mysql server with GTID log-bin

    Mysql Master Server:

         ARGU+=” –gtid-mode=ON “
         ARGU+=” –enforce-gtid-consistency=TRUE “
         ARGU+=” –log-slave-updates=FALSE “
         ARGU+=” –log-bin=/opt/local/data/mysqld/mysql-bin “

     

    Mysql Slave Server:

         ARGU+=” –relay_log=/opt/local/data/mysqld/relay-bin “
         ARGU+=” –read_only=on “
         ARGU+=” –skip_slave_start=on “

     

    Launch Mysl Server:

          mysqld     ${ARGU}     ${OTHER_ARGU} 

    Display Master Status:
           mysql>  show master status;

    Display Master Status:
          mysql>  show slave status;

    Display uuid:
          mysql>  show GLOBAL VARIABLES like ‘server_uuid’;

    Display gtid variable:
          mysql>  mysql> show variables like ‘%gtid%’;