Solved

service mysqld restart FAILS

Posted on 2011-03-22
12
725 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
 

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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem with Simple PHP/mySQL Query 3 51
updating table data with inner join 9 24
Sql query on a varchar that is numeric. 8 27
Help on running oracle SQL script in linux 3 36
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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…
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.

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now