LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-10-2006, 04:37 AM   #1
booga
LQ Newbie
 
Registered: Jul 2003
Distribution: slack
Posts: 15

Rep: Reputation: 0
MYSQL does not load


I enter the command to run MYSQL, and it hangs

Code:
mysql# Starting mysqld daemon with databases from /usr/mysql/mysql/data
STOPPING server from pid file /usr/mysql/mysql/data/workx.pid
060510 01:10:49  mysqld ended
it hangs at the above line. CTRL C ends with the following lines.
Code:
[1]+  Done                    /usr/mysql/mysql/bin/mysqld_safe –user=mysql
It seems to be a problem with the data folder. I'm new to MYSQL (this is obvious from the way I have the folders structured), and i'm not sure about the user and group permissions of the folders. Is it normal to have it 8972:8972? If not normal, what should it be?

Code:
mysql# ls -al
total 55
drwxr-xr-x  14  8972 8972   512 2006-04-27 08:57 .
drwxr-xr-x   4  test root   216 2006-05-10 00:40 ..
-rw-r--r--   1  8972 8972 19071 2006-04-26 18:31 COPYING
-rw-r--r--   1  8972 8972  5712 2006-04-27 08:40 EXCEPTIONS-CLIENT
-rw-r--r--   1  8972 8972  7747 2006-04-27 08:40 INSTALL-BINARY
-rw-r--r--   1  8972 8972  1380 2006-04-26 18:30 README
drwxr-xr-x   2  8972 8972  1768 2006-04-27 08:57 bin
-rwxr-xr-x   1  8972 8972   801 2006-04-27 08:57 configure
drwxr-x---   4 mysql 8972   128 2006-05-10 00:44 data
drwxr-xr-x   2  8972 8972   112 2006-04-27 08:57 docs
drwxr-xr-x   2  8972 8972  1880 2006-04-27 08:57 include
drwxr-xr-x   2  8972 8972   304 2006-04-27 08:57 lib
drwxr-xr-x   3  8972 8972    72 2006-04-27 08:57 man
drwxr-xr-x   7  8972 8972   368 2006-04-27 08:57 mysql-test
drwxr-xr-x   2  8972 8972    80 2006-04-27 08:57 scripts
drwxr-xr-x   3  8972 8972   160 2006-04-27 08:57 share
drwxr-xr-x   5  8972 8972   944 2006-04-27 08:57 sql-bench
drwxr-xr-x   2  8972 8972   456 2006-04-27 08:57 support-files
drwxr-xr-x   2  8972 8972   680 2006-04-27 08:57 tests

Last edited by booga; 05-10-2006 at 04:46 AM.
 
Old 05-10-2006, 09:34 PM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Did you change ownership of /usr/local/mysql/data to the mysql user before starting mysql for the first time e.g.
Code:
#chown mysql:mysql /user/local/mysql/data
The error log in /usr/local/mysql/data will give you more clues.

Last edited by reddazz; 05-10-2006 at 09:36 PM.
 
Old 05-10-2006, 11:44 PM   #3
booga
LQ Newbie
 
Registered: Jul 2003
Distribution: slack
Posts: 15

Original Poster
Rep: Reputation: 0
Thank you!

I now get a password prompt, which is a good sign. I don't remember seeing the instruction to chown the DATA folder in any of the manuals I tried to follow.

However I get an error message after I enter all possible passwords that it could be.

The error:
Code:
$ mysql -u root -p
Enter password: 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)
I'm sure that this is simple, but at this point of trying to resolve it, my eyes feel like my brain is trying to kick it out of the sockets. :-)

Thank you again for your help!

.
 
Old 05-11-2006, 03:50 AM   #4
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Have you looked at the error logs in /usr/local/mysql/data ? Also what were the commands you use to compile it.

Last edited by reddazz; 05-11-2006 at 09:04 AM.
 
Old 05-11-2006, 01:24 PM   #5
booga
LQ Newbie
 
Registered: Jul 2003
Distribution: slack
Posts: 15

Original Poster
Rep: Reputation: 0
this is all the contents of the file in /usr/local/mysql/data/workx.err
This includes some logged errors from other attempts.
From the last half, it appears to be running, I'm not sure what the log is telling me.

Linux is fairly new to me, MYSQL is beyond that. :-)


Code:
060509 04:39:05  mysqld started
060509  4:39:05  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
060509 04:39:05  mysqld ended

060510 00:47:45  mysqld started
/usr/mysql/mysql/bin/mysqld: Too many arguments (first extra is '.user=mysql').
Use --help to get a list of available options
060510 00:47:45  mysqld ended

060510 00:50:50  mysqld started
/usr/mysql/mysql/bin/mysqld: Too many arguments (first extra is '.user=mysql').
Use --help to get a list of available options
060510 00:50:50  mysqld ended

060510 00:54:11  mysqld started
/usr/mysql/mysql/bin/mysqld: Too many arguments (first extra is '.user=mysql').
Use --help to get a list of available options
060510 00:54:11  mysqld ended

060510 00:54:24  mysqld started
/usr/mysql/mysql/bin/mysqld: Too many arguments (first extra is '.user=mysql').
Use --help to get a list of available options
060510 00:54:24  mysqld ended

060510 01:10:22  mysqld started
/usr/mysql/mysql/bin/mysqld: Too many arguments (first extra is '.user=mysql').
Use --help to get a list of available options
060510 01:10:22  mysqld ended

060510 01:10:49  mysqld started
/usr/mysql/mysql/bin/mysqld: Too many arguments (first extra is '.user=mysql').
Use --help to get a list of available options
060510 01:10:49  mysqld ended

060510 13:18:53  mysqld started
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
060510 13:18:54  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
060510 13:18:58  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
060510 13:19:00  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MBStatus information:

Current dir: /usr/mysql/mysql/data/
Running threads: 0  Stack size: 196608
Current locks:
lock: 0x8a7b774:

lock: 0x8a763dc:

lock: 0x8a71be4:

lock: 0x8a6487c:

lock: 0x8a61914:

lock: 0x8a5cb9c:


Key caches:
default
Buffer_size:       8388600
Block_size:           1024
Division_limit:        100
Age_limit:             300
blocks used:             0
not flushed:             0
w_requests:              0
writes:                  0
r_requests:              0
reads:                   0


handler status:
read_key:            0
read_next:           0
read_rnd             0
read_first:          3
write:               0
delete               0
update:              0

Table status:
Opened tables:         12
Open tables:            6
Open files:            12
Open streams:           0

Alarm status:
Active alarms:   0
Max used alarms: 0
Next alarm time: 0
A mysqld process already exists at  Wed May 10 20:21:42 UTC 2006
A mysqld process already exists at  Wed May 10 20:22:35 UTC 2006
A mysqld process already exists at  Thu May 11 10:13:01 UTC 2006
As I am digging around, I find a post suggestingto make sure that MYSQLD is started.

Code:
$ /usr/local/mysql/bin/mysqld      
060511 14:43:46 [Warning] Can't create test file /usr/local/mysql-standard-5.0.21-linux-i686-glibc23/data/workx.lower-test
/usr/local/mysql/bin/mysqld: Can't change dir to '/usr/local/mysql-standard-5.0.21-linux-i686-glibc23/data/' (Errcode: 13)
060511 14:43:46 [ERROR] Aborting

060511 14:43:46 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
It appears to be some kind of issue with permissions. But I'm not sure what file or folder. And what permissions to set.

I checked the following folder for permissions
/var/lib/mysql drwxr-x--- 4 mysql mysql 248 2006-05-10 01:44

Last edited by booga; 05-11-2006 at 05:54 PM.
 
Old 05-12-2006, 01:44 AM   #6
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
change the premissons for you mysql data directory so that its owned by the mysql user and mysql group e.g.
Code:
#chown -R mysql:mysql /usr/local/mysql/data
 
Old 05-12-2006, 02:32 AM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,349

Rep: Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750
Incidentally, if you get numerics where you expect a user or group name in and ls -l listing, this means there is no entry for that user ( or group) in the /etc/passwd (/etc/group) files.
IOW, under the hood, everything is done with numbers (like DNS/bind). It only shows names where it can find a match in the relevant file.
 
  


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
mysql - load data warning prabhatsoni Linux - Software 0 06-16-2005 06:08 AM
Can someone walk me through this? can't load mysql.so dave4545 Linux - Newbie 3 03-26-2005 03:16 PM
php cannot load mysql extension no_names_left Linux - Software 4 03-02-2005 07:31 PM
MySQL Won't Load AFI_Flame Slackware 3 06-29-2004 10:00 PM
high mysql load hardigunawan Linux - General 0 03-04-2003 01:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:42 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