mysql服务器:
service httpd start
service httpd stop
修改/etc/my.conf中的mysql数据文件所在目录:
datadir=/assets/mysql
重启mysql服务器后生效
注意在上面修改datadir重启服务过程中可能出现权限问题:因为mysqld是以mysql这个用户来运行的,而datadir可能并不属于mysql用户,解决方案:
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. 071027 07:43:13 mysqld ended chown -R mysql.mysql /assets/mysql
数据盘挂载和扩容:
https://help.aliyun.com/document_detail/25452.html?spm=5176.doc25445.6.173.XKkyJu
检查linux下占用cpu高的进程详细信息:
1. top -c 查出对应的命令以及pid,
2. cd /prox/pid
3. ls -l,显示的cwd以及exe就可以看出具体是哪条命令启动了这个占用CPU巨大的任务!
时间: 2024-11-09 00:09:43