LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-04-2010, 05:33 AM   #1
zaeem
Member
 
Registered: Jan 2010
Posts: 125

Rep: Reputation: 15
MySQL fails


Dear All,

I've installed MySQL-server-community-5.1.35-0.rhel5.x86_64.rpm, client and devel on my 64 bit server having CentOS 5.4 (Final) as operating system. Now when I setup my.cnf file and add an entry "init-file=/usr/src/script.sql" and restart Mysql service then Mysql fails to start but when I comment init-file portion in my.cnf file then mysql runs fine. Please find below log file entry in mysql log

100304 3:03:38 [ERROR] /usr/sbin/mysqld: File '/usr/src/scripts/startup.sql' not found (Errcode: 13)
100304 3:03:38 [ERROR] Aborting

I have verified that file exist on the location mentioned in my.cnf file. Can anybody please suggest fix of this problem.

Regards,
Zaeem

Last edited by zaeem; 03-04-2010 at 05:34 AM. Reason: type mistake
 
Old 03-04-2010, 05:43 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Can you post the output of:
Code:
ls -l /usr/src/scripts/startup.sql
file /usr/src/scripts/startup.sql
Evo2.
 
Old 03-04-2010, 11:24 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,617

Rep: Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963
Quote:
Originally Posted by zaeem View Post
Dear All,

I've installed MySQL-server-community-5.1.35-0.rhel5.x86_64.rpm, client and devel on my 64 bit server having CentOS 5.4 (Final) as operating system. Now when I setup my.cnf file and add an entry "init-file=/usr/src/script.sql" and restart Mysql service then Mysql fails to start but when I comment init-file portion in my.cnf file then mysql runs fine. Please find below log file entry in mysql log

100304 3:03:38 [ERROR] /usr/sbin/mysqld: File '/usr/src/scripts/startup.sql' not found (Errcode: 13)
100304 3:03:38 [ERROR] Aborting

I have verified that file exist on the location mentioned in my.cnf file. Can anybody please suggest fix of this problem.

Regards,
Zaeem
The permissions on that file are probably wrong.
 
Old 03-05-2010, 06:31 AM   #4
zaeem
Member
 
Registered: Jan 2010
Posts: 125

Original Poster
Rep: Reputation: 15
Dear Evo2,

# ls -l startup.sql
-rwxr-xr-x 1 root root 149 Mar 3 07:29 startup.sql

# file startup.sql
startup.sql: ASCII text, with CRLF line terminators

Now after giving chmod 755 to this file mysql restarting fine but this script (startup.sh) is not populating few tables as it should be.

Any suggestion ?

Regards,
 
Old 03-08-2010, 05:48 AM   #5
zaeem
Member
 
Registered: Jan 2010
Posts: 125

Original Poster
Rep: Reputation: 15
Anybody??
 
Old 03-08-2010, 09:55 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,617

Rep: Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963
Quote:
Originally Posted by zaeem View Post
Dear Evo2,

# ls -l startup.sql
-rwxr-xr-x 1 root root 149 Mar 3 07:29 startup.sql

# file startup.sql
startup.sql: ASCII text, with CRLF line terminators

Now after giving chmod 755 to this file mysql restarting fine but this script (startup.sh) is not populating few tables as it should be.

Any suggestion ?

Regards,
and
Quote:
Anybody??
How about saying what, exactly is wrong? "not populating few tables", doesn't tell us anything. What are you expecting it to do? What are the contents of that sql file?
 
Old 03-08-2010, 08:39 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
You made this file on MS didn't you
Quote:
startup.sql: ASCII text, with CRLF line terminators
*nix files only have LF terminators. Try dos2unix to cvt it.
Then show the content if it doesn't work, along with EXACT err msgs.
 
1 members found this post helpful.
Old 03-08-2010, 09:28 PM   #8
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Originally Posted by chrism01 View Post
*nix files only have LF terminators. Try dos2unix to cvt it.
Nice catch!

Evo2.
 
Old 03-08-2010, 10:41 PM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,617

Rep: Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963
Quote:
Originally Posted by evo2 View Post
Nice catch!

Evo2.
Indeed...well done!
 
Old 03-09-2010, 04:24 AM   #10
zaeem
Member
 
Registered: Jan 2010
Posts: 125

Original Poster
Rep: Reputation: 15
Dear TBOne,

The contents of that file are as below;

set global max_heap_table_size=16777216*64;

call MyDB.PROC_UpdateRecords(0,'');


The UpdateRecord procedure basically picks the records from table and populate Memory tables. The purpose of this is that we always have record in memory after mysql restarts.

I hope it clarifies the issue. So please let me know if I am doing anything wrong?

Thanking you in Advance
 
Old 03-09-2010, 02:15 PM   #11
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 70
Did you run the script as suggested?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem changing mysql uid,gid: mysql start fails gjatute Linux - Newbie 7 02-25-2010 01:38 AM
yum install php-mysql fails with mysql 5.1 - "Error: mysql conflicts with MySQL" rebelde Linux - Software 2 03-13-2009 10:32 AM
MySQL ODBC driver fails when trying to add a DSN to MySQL banjoman Linux - Software 0 01-24-2005 09:59 AM
MySQL Installation Fails Transition Slackware 3 09-09-2004 10:36 AM
MySQL connection over TCP/IP fails Rukawa Linux - Software 4 11-29-2003 11:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration