免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1592 | 回复: 0
打印 上一主题 下一主题

mysql更改存储报错 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-06-11 14:26 |只看该作者 |倒序浏览
在ubuntu上将mysql的存储目录更改到其他磁盘分区上
更改步骤:
1.、/etc/init.d/mysql stop
2、vim /etc/mysql/my.cnf
     datadir                = /data/mysql       //之前为/var/lib/mysql
3、mv /var/lib/mysql  /data/                   //data在其他分区上
4 、/etc/init.d/mysql start
但是重启后就显示各种报错信息:
150611 13:41:39 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
150611 13:42:31 mysqld_safe Starting mysqld daemon with databases from /data/mysql
150611 13:42:31 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
150611 13:42:31 [Note] /usr/sbin/mysqld (mysqld 5.5.43-0ubuntu0.14.04.1) starting as process 26942 ...
150611 13:42:31 [Warning] Can't create test file /data/mysql/iZ23urd20hoZ.lower-test
150611 13:42:31 [Warning] Can't create test file /data/mysql/iZ23urd20hoZ.lower-test
150611 13:42:31 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
150611 13:42:31 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
150611 13:42:31 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
150611 13:42:31 InnoDB: The InnoDB memory heap is disabled
150611 13:42:31 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150611 13:42:31 InnoDB: Compressed tables use zlib 1.2.8
150611 13:42:31 InnoDB: Using Linux native AIO
150611 13:42:31 InnoDB: Initializing buffer pool, size = 128.0M
150611 13:42:31 InnoDB: Completed initialization of buffer pool
150611 13:42:31  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
150611 13:42:31 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
请问各位大神,是哪里有问题吗。第3行的那个“instead of”应该影响不大吧。
我在新开的虚拟机上按照上面的步骤,就成功了,没有这么多报错。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP