zoukankan      html  css  js  c++  java
  • How to change data dir of mysql?

    # 1  copy orgin data dir of mysql to new one
    
    cp -R /var/lib/mysql /mysqldata
    chown mysql:mysql -R /mysqldata
    
    # 2 modify configure files, search for datadir in file /etc/mysql/my.cnf
    
    #datadir                = /var/lib/mysql
    datadir         = /mysqldata
    
    
    # 3 modify configure files, search  in file /etc/apparmor.d/usr.sbin.mysqld
    
    #  /var/lib/mysql/ r,
    #  /var/lib/mysql/** rwk,
      /bmysqldata/ r,
      /mysql_data/** rwk,
    
    
    # 4 restart your service
    
    service mysql restart
    

      

  • 相关阅读:
    作业6
    作业8
    作业7
    作业5
    作业4
    作业3
    作业2
    作业1
    浏览器跨域的细节
    解析node-cors模块
  • 原文地址:https://www.cnblogs.com/clor001/p/5180058.html
Copyright © 2011-2022 走看看