?
Solved

service mysqld restart FAILS

Posted on 2011-03-22
12
Medium Priority
?
746 Views
Last Modified: 2012-06-27
On my linux Red hat when i type
service mysqld restart, it fails. I tried changing many settings. Then finally i tried removing the sentence
[mysqld]
default_storage_engine=InnoDB
from /etc/my.cnf and it worked.  WOW.
But this seems to be the issue in my system alone.
My colleague's system does not have such problems. I can restart mysqld service on his system with the above sentence in /etc/my.cnf. Both are running the same version of mysql 5.0.77.
Any help?
0
Comment
Question by:pvinodp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
12 Comments
 
LVL 48

Expert Comment

by:hernst42
ID: 35187085
Did you check the logs in /var/log if an error is mentioned there?
0
 

Author Comment

by:pvinodp
ID: 35187997
Hi,
I checked the mysqld.log. Following is the error i see when i cannot restart mysqld service:

110322 15:27:19  mysqld started
110322 15:27:19 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
110322 15:27:19 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
InnoDB: Error: auto-extending data file ./ibdata1 is of a different size
InnoDB: 0 pages (rounded down to MB) than specified in the .cnf file:
InnoDB: initial 640 pages, max 0 (relevant if non-zero) pages!
InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my.cnf back
InnoDB: to what it was, and remove the new ibdata files InnoDB created
InnoDB: in this failed attempt. InnoDB only wrote those files full of
InnoDB: zeros, but did not yet use them in any way. But be careful: do not
InnoDB: remove old data files which contain your precious data!
110322 15:27:19 Default storage engine (InnoDB) is not available
110322 15:27:19 Aborting

110322 15:27:19 [Note] /usr/libexec/mysqld: Shutdown complete

110322 15:27:19  mysqld ended
0
 
LVL 8

Expert Comment

by:pilson66
ID: 35188966
Please show your mysql config file
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:pvinodp
ID: 35189233
It is the same as my coleague's:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
old_passwords=1


[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[mysqld]
default_storage_engine=InnoDB
0
 
LVL 8

Accepted Solution

by:
pilson66 earned 2000 total points
ID: 35189310
you need to set up InnoDB options, for example:
 
innodb_data_home_dir = /var/lib/mysql/ibdata/
innodb_data_file_path=ibdata1:32M:autoextend
set-variable = innodb_buffer_pool_size=128M
set-variable = innodb_additional_mem_pool_size=16M
innodb_log_arch_dir = /var/lib/mysql/iblogs/
innodb_log_group_home_dir = /var/lib/mysql/iblogs/
innodb_log_archive=0
set-variable = innodb_log_files_in_group=1
set-variable = innodb_log_file_size=8M

Open in new window

0
 

Author Comment

by:pvinodp
ID: 35189503
But my colleagues system works without these..

how is it possible..this app has to be deployed in thousands of client systems... most of the my.cnf
which i have see do not have more information than mine.
Is there any other setting which has changed in my system?
0
 
LVL 8

Expert Comment

by:pilson66
ID: 35189534
copy working config from your colleague`s and try
0
 

Author Comment

by:pvinodp
ID: 35189972
tried.. dint work
0
 

Author Comment

by:pvinodp
ID: 35189974
i assume that you are talking about /etc/my.cnf file.
0
 
LVL 8

Assisted Solution

by:pilson66
pilson66 earned 2000 total points
ID: 35190037
try to add options innodb_data_home_dir, innodb_data_file_path
0
 
LVL 6

Expert Comment

by:mohansahu
ID: 35197412
Hi,

if my.cnf is having problem, try to locate .cnf file in the system,

by default .cnf file is located in /usr/share/doc/MySQL-server-community-5.0.83/my-medium.cnf

rename my-medium.cnf to my.cnf in /etc/ folder...try to start the mysql service.
0
 

Author Closing Comment

by:pvinodp
ID: 35349814
Thanks all
0

Featured Post

Command Line Tips and Tricks

The command line is a powerful tool at the disposal of every Linux user. Although Linux distros come with beautiful user interfaces, it's worthwhile to learn the command line because it allows you to do a number of things that you otherwise cannot do from the GUI.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Fine Tune your automatic Updates for Ubuntu / Debian
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question