随笔分类 -  Mysql

摘要:1,查看原根目录 2,然后关闭数据库服务 3,cp -r 源根目录到目的根目录 4,修改my.cnf文件定义的根目录位置到目的根目录 5,启动数据库 阅读全文
posted @ 2020-03-05 18:53 Withfeel 阅读(736) 评论(0) 推荐(0)
摘要:参考文章 https://www.timeblog.cn/article/118.html 在我们使用mysql导入大文件sql时可能会报MySQL server has gone away错误,该问题是max_allowed_packet配置的默认值设置太小,只需要相应调大该项的值之后再次导入便能成功。该项的作用是限制mysql服务端接收到的包的大小,因此如果导入的文件过大则可能会超过... 阅读全文
posted @ 2019-11-05 11:45 Withfeel 阅读(432) 评论(0) 推荐(0)
摘要:xtrabackup参考文章 https://www.cnblogs.com/linuxk/p/9372990.html 下载5.7的mysql 社区版包 https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.25-1.el7.x86_64.rpm-bundle.tar 如果是redhat7系统需要删除mariadb的包 ... 阅读全文
posted @ 2019-10-14 11:36 Withfeel 阅读(284) 评论(0) 推荐(0)
摘要:-- 登录yellowcong 数据库 mysql -uroot -proot yellowcong -- 查看当前数据库 select database() -- 查看数据库里面的表 --table_schema 当前的数据库 --table_type='base table' 表示基础的普通表 SELECT table_name FROM information_sche... 阅读全文
posted @ 2019-10-09 11:45 Withfeel 阅读(13922) 评论(0) 推荐(1)
摘要:参考文章: https://blog.csdn.net/f18770366447/article/details/80703347 https://www.cnblogs.com/benjamin77/p/8682360.html https://www.xiaocoder.com/2017/03/17/mysql-installation-guide/ https://blog.cs... 阅读全文
posted @ 2019-10-09 11:30 Withfeel 阅读(1031) 评论(0) 推荐(0)
摘要:window下 1.导出整个数据库 mysqldump -u 用户名 -p 数据库名 > 导出的文件名 mysqldump -u dbuser -p dbname > dbname.sql 2.导出一个表 mysqldump -u 用户名 -p 数据库名 表名> 导出的文件名 mysqldump - 阅读全文
posted @ 2019-04-30 16:12 Withfeel 阅读(38041) 评论(2) 推荐(0)
摘要:要想知道每个数据库的大小的话,步骤如下: 1、进入information_schema 数据库(存放了其他的数据库的信息) use information_schema; 2、查询所有数据的大小: select concat(round(sum(data_length/1024/1024),2),' 阅读全文
posted @ 2019-04-30 16:12 Withfeel 阅读(10681) 评论(0) 推荐(0)
摘要:参考文章 https://www.xiaocoder.com/2017/03/17/mysql-installation-guide/ 下载5.7的mysql 社区版包 https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.25-1.el7.x86 阅读全文
posted @ 2019-04-01 11:42 Withfeel 阅读(525) 评论(0) 推荐(0)