Below is my system configuration:
OS: RHEL5 MySQL: 5.1.73 Default datadir=/var/lib/mysql/
But, the above directory has space crunch. So, I decided to change the path. I found
/u000 directory has enough space. So, I created
/u000 and assign permission (chmod) as
Then after, I changed the below values in mysql configuration file:
innodb_data_home_dir = /u000/lib/mysql innodb_data_file_path = ibdata1:10M:autoextend innodb_log_group_home_dir = /u000/lib/mysql log_error = /u000/lib/mysql/rpc4939.err general_log_file = /u000/lib/mysql/rpc4939.log slow_query_log_file = /u000/lib/mysql/rpc4939-slow.log datadir = /u000/lib/mysql/ pid_file = /u000/lib/mysql/rpc4939.pid
Then, tried to restart mysql service but it failed.
When, I changed the datadir as
datadir = /var/lib/mysql/ it started working.
- Can I know Why am I unable to change the datadir?
- Is there any special way to change the datadir?
log_errorvalue is always pointing to
/u000/lib/mysql/. How this variable can be changed?