• Mysql 迁移最完整可用的教程


    此教程来源stackoverflow,仅供我自己需要时查看,其他人不可以瞎看!

    ## Stop MySQL using the following command:
    
    `sudo /etc/init.d/mysql stop`
    
    ## Copy the existing data directory (default located in /var/lib/mysql) using the following command:
    
    `sudo cp -R -p /var/lib/mysql /newpath`
    
    ## edit the MySQL configuration file with the following command:
    
    `sudo gedit /etc/mysql/my.cnf`
    
    ##Look for the entry for datadir, and change the path (which should be /var/lib/mysql) to the new data directory.
    
    In the terminal, enter the command:
    
    `sudo gedit /etc/apparmor.d/usr.sbin.mysqld`
    
    ## Look for lines beginning with /var/lib/mysql. Change /var/lib/mysql in the lines with the new path.
    
    Save and close the file.
    
    ## Restart the AppArmor profiles with the command:
    
    `sudo /etc/init.d/apparmor reload`
    
    ## Restart MySQL with the command:
    
    `sudo /etc/init.d/mysql restart`
    
    Now login to MySQL and you can access the same databases you had before.
  • 相关阅读:
    DB2完美卸载
    protobuf2.5 iphone5s中崩溃的问题
    由fprintf和printf看C语言三种标准流
    AIR加载PDF
    使用二叉堆实现优先队列
    11636
    apache archiva安装教程
    WP独立文件资源字典
    常用软件架构模式(收集)
    MATLAB——单层感知器
  • 原文地址:https://www.cnblogs.com/cutd/p/5946322.html
Copyright © 2020-2023  润新知