Solved

service mysqld restart FAILS

Posted on 2011-03-22
12
742 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
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 500 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 500 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP website on Linux - server DNS address could not be found. 18 77
LINUX Field Separators 7 55
rsyslog raw message 4 35
i am unable to add data to mysql database 6 48
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

679 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