Showing posts with label data directory. Show all posts
Showing posts with label data directory. Show all posts

Sunday, April 19, 2015

MySQL 5.5.30 Can't start in external HardDisk

Recently I have faced a big issue in one of my Live Production server.MySQL server could not start and throws the below error.

MySQL - 5.5.30 version
OS - Centos 6.5 - 64 bit
MySQL Data Directory in  2TB external Hard Disk


This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
Please help us make Percona Server better by reporting any
bugs at http://bugs.percona.com/

key_buffer_size=104857600
read_buffer_size=131072
max_used_connections=0
max_threads=8002
thread_count=0
connection_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 3273305 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0 thread_stack 0x40000




Then I have searched and found this issue because of Hardware.Becuase I have my MySQL Data directory in 2TB external HDD with ext4 file system.

So I rebooted the entire server and then started MySQL. Now it started fine with out issue.


This issue might be cause becaue of Hardware also.


Now its resolved.


Monday, October 14, 2013

Create a new MySQL Server with existing MySQL data directory


Do you like to create a new server with existing MySQL data directory ?

Taking dump and import in new server will take so much time to do the process.

So better copy the data directory to new server is a good way.Below I have given the steps that how to copy the data directory and set up a new server.


1.Create a new MySQL Server.

2.Stop this newly created MySQL server.

3.Move this server data directory to some other location.now nothing should not be there in new server data directory.

4.Now copy the data directory files from the existing server it should includes ibdata,log file 0 and 1.(This server should be stop while copying the files)

5.After copied all the files, Check the owner and group name for the data directory files.If the owner and group name are in root then change it to mysql.

7.Start this new MySQL server.

8.After started check the new MySQL error logs to confirm that there is no issues.

9.Login to new MySQL server.

10.Now use the same databases and tables like existing server.



There is a tool to copy the files by taking the data directory backup with "xtrabackup" and restore it in new server. 

 

Note :

If you get this below error:

" ERROR 1146 (42S02): Table 'database.tablename' doesn't exist"

 It means that you have not copied all the files properly from the existing server.

 Now copy the all files properly and start the server and now it will works fine.