Getting Started 13 linux lab manual database Series 2

  1. centos7 execute mysql client command such mistakes: of Can not Connect to local MySQL Server through socket '/var/lib/mysql/mysql.sock' (2)
    mysql.sock is in general not in /tmp/mysql.sock /var/lib/mysql/mysql.sock there
    is no word to use ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
    or ln -s /tmp/mysql.sock / var / lib / mysql / mysql.sock
  2. CentOS 7: CD-ROM directly mariadb-server client server MariaDB package kits
    installed when the package server, the client will automatically bring
  3. Ways to completely uninstall the mysql:
    View is installed: yum install mysql * List
    RPM -qa | grep -i mysql
    uninstall package:
    yum the Remove Server mysql mysql mysql-libs-compat-mysql51
    yum the Remove-mysql-Community Community Release
    continue to delete the installation directory profiles and the like, refer to: https://blog.csdn.net/zhwyj1019/article/details/80274269
  4. This error master-master replication occurs: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file
    solution: stop slave; reset slave; start slave; ( pro-test success)
  5. Master-master replication conflicts error Solution: stop slave; set global sql_slave_skip_counter = 1; start slave;
  6. Skip main event from the copy: skip setting variables from the server, set global sql_slave_skip_counter = N can also be right! !
    Or: slave-skip-error = Error number
  7. log_slave_updates
    cascaded set, so the relay binary log write log, the log is then transferred to the next stage from the relay node
  8. Refresh permissions: flush privileges;
    MySQL> UPDATE the mysql.user the SET password = PASSWORD ( 'password') the WHERE clause;
    this approach requires the following commands to take effect to be tested?
    MySQL> FLUSH PRIVILEGES;
  9. Filters:
    1, the master server DB provided the binlog-do-the binlog the ignore-DB-
    2, and the like from a server provided replicate_do_db replicate_ignore_db
  10. rpm -qf /etc/my.cnf
    this file from centos comes with its own library, though they do not install mariadb

Guess you like

Origin www.cnblogs.com/linux521/p/11204845.html