LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-23-2009, 04:56 PM   #1
wsetchell
LQ Newbie
 
Registered: Jun 2009
Posts: 9

Rep: Reputation: 0
Memory Fault starting mysql


I'm trying to start the mysql client, but whenever I do I get this error:

$ mysql start
Memory fault

I think I'm in the correct directory (usr/bin) based on finding a mysql file when I do an ls.

Any suggestions?
 
Old 06-23-2009, 08:09 PM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
You invoke the client by running mysql, not mysql start. In the latter case it will tell the server that it wants to use a database called 'start'.

Not sure where the 'memory fault' comes from.

Which distro? Standard install or did you do something special for the installation?
 
Old 06-23-2009, 08:23 PM   #3
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
If you're trying to start the mysql server, you probably want /etc/init.d/mysql start (sometimes /etc/init.d/mysqld, /etc/init.d/mysql-server, it depends on your distribution, unfortunately).
 
Old 06-24-2009, 09:06 AM   #4
wsetchell
LQ Newbie
 
Registered: Jun 2009
Posts: 9

Original Poster
Rep: Reputation: 0
I'm using a Red Hat distro.

I tried using the command mysql and it gives me the same memory fault. I don't have anything in etc/init.d/ mysql related. All my mysql files are stored in /usr/bin.
 
Old 06-24-2009, 10:50 AM   #5
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Let start with saying that I've never seen a message like that. So I might be on the wrong track with the help below.

mysql is a client that needs to connect to a server (mysqld). That server can be on the local machine or on a remote machine but it must be running and you must tell the client where it can find the server (if it's not on the local machine).

So the first question is if you try to connect to a local or a remote server. If it's a local server, is the server running (ps -ef |grep mysqld can probably tell you that) and if not, why not? Either it is not installed or it is not started or it has crashed or ....

I'm not familiar with RedHat after version 8.0, but check the package manager (yum, rpm ?) to see if it's installed or use commands like which mysqld and / or locate mysqld (you might have to run updatedb as root first for the latter).

So let us know if it's installed and somebody with more knowledge of RH system can probably take it from there.

If you're trying to connect to a remote server, you have to specify a hostname or ipaddress with the mysql command. Check man mysql for the options and how to use them.

PS please state which RH version exactly, it might help us to help you as things might have changed over the years.
 
Old 06-24-2009, 11:18 AM   #6
wsetchell
LQ Newbie
 
Registered: Jun 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Wim Sturkenboom View Post
So the first question is if you try to connect to a local or a remote server. If it's a local server, is the server running (ps -ef |grep mysqld can probably tell you that) and if not, why not? Either it is not installed or it is not started or it has crashed or ....
I'm SSH'ing into the MYSQL server. So I guess that means its local.

$ ps -ef |grep mysqld
username 9262 10826 0 11:07 pts/3 00:00:00 grep mysqld

Quote:
Originally Posted by Wim Sturkenboom View Post
I'm not familiar with RedHat after version 8.0, but check the package manager (yum, rpm ?) to see if it's installed or use commands like which mysqld and / or locate mysqld (you might have to run updatedb as root first for the latter).
My distro info
$ cat /proc/version
Linux version 2.4.21-40.ELsmp (bhcompile@hs20-bc1-7 .build.redhat.com) (gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3- 54)) #1 SMP Thu Feb 2 22:22:39 EST 2006


mysql location info
$ locate mysqld
/usr/share/doc/mysql-3.23.58/mysqld_error.txt
/usr/share/man/man1/mysqld.1.gz
/usr/share/man/man1/mysqld_multi.1.gz
/usr/share/man/man1/mysqldump.1.gz
/usr/share/man/man1/safe_mysqld.1.gz
/usr/bin/mysqld_multi
/usr/bin/mysqldump
/usr/bin/mysqldumpslow
 
Old 06-24-2009, 11:32 AM   #7
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Quote:
Originally Posted by wsetchell View Post

$ ps -ef |grep mysqld
username 9262 10826 0 11:07 pts/3 00:00:00 grep mysqld
That does not show mysql running.. it's showing your search for the mysqld service.. if it were running it should have retunred more than one line, like my example below..
Code:
it-lenny:~$ ps -ef | grep mysqld
root      1854     1  0 12:31 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe
mysql     1893  1854  1 12:31 ?        00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
root      1894  1854  0 12:31 ?        00:00:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
luser     2750 11735  0 12:32 pts/0    00:00:00 grep mysqld

Last edited by farslayer; 06-24-2009 at 11:35 AM.
 
Old 06-24-2009, 11:42 AM   #8
wsetchell
LQ Newbie
 
Registered: Jun 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by farslayer View Post
That does not show mysql running.. it's showing your search for the mysqld service.. if it were running it should have retunred more than one line, like my example below..
Code:
it-lenny:~$ ps -ef | grep mysqld
root      1854     1  0 12:31 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe
mysql     1893  1854  1 12:31 ?        00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
root      1894  1854  0 12:31 ?        00:00:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
luser     2750 11735  0 12:32 pts/0    00:00:00 grep mysqld
OK. How do I start it then?
 
Old 06-24-2009, 02:24 PM   #9
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
for a redhat based distro it would be

service mysqld start

to check status

service mysqld status



to see if it's actually installed or not...

yum list installed mysql
 
Old 06-25-2009, 01:51 AM   #10
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Can you also do

cat /etc/redhat-release

A 2.4 series kernel is pretty old.
Also, mysqld -v (or -V ?) to show which version of mysql
 
Old 06-26-2009, 10:55 AM   #11
wsetchell
LQ Newbie
 
Registered: Jun 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Ok so I made some progress. It turns out that I forgot to install the server, I just had the client installed, I still haven't gotten it running.

Quote:
Originally Posted by farslayer View Post
That does not show mysql running.. it's showing your search for the mysqld service.. if it were running it should have retunred more than one line, ...
I now have a new output for this command
Code:
$ ps -ef|grep mysqld
root      4251     1  0 Jun25 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/chiadvlpap2714.pid
mysql     4306  4251  0 Jun25 ?        00:00:09 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var/lib/mysql/chiadvlpap2714.err --pid-file=/var/lib/mysql/chiadvlpap2714.pid
nbkvtqe   1362 26271  0 10:39 pts/0    00:00:00 grep mysqld
Quote:
Originally Posted by ?
Can you also do

cat /etc/redhat-release
Code:
$ cat /etc/redhat-release
Red Hat Enterprise Linux AS release 3 (Taroon Update 7)
Quote:
Originally Posted by FARSLAYER
service mysqld start

yum list installed mysql
Code:
$ sbin/service mysql start
ksh: Starting MySQL SUCCESS!

$ sbin/service mysql status
/etc/init.d/mysql: line 401: /var/lib/mysql/chiadvlpap2714.pid: Permission denied
 ERROR! MySQL is not running, but PID file exists

Last edited by wsetchell; 06-26-2009 at 11:09 AM.
 
Old 06-29-2009, 04:31 AM   #12
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Still issues?

If you get
Code:
$ ps -ef|grep mysqld
root      4251     1  0 Jun25 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/chiadvlpap2714.pid
mysql     4306  4251  0 Jun25 ?        00:00:09 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var/lib/mysql/chiadvlpap2714.err --pid-file=/var/lib/mysql/chiadvlpap2714.pid
nbkvtqe   1362 26271  0 10:39 pts/0    00:00:00 grep mysqld
mysqld is running. Are you running sbin/service mysql status as normal user or as root? Not sure if it makes a difference.
 
Old 06-30-2009, 09:06 AM   #13
wsetchell
LQ Newbie
 
Registered: Jun 2009
Posts: 9

Original Poster
Rep: Reputation: 0
I am still having problems getting to the mysql prompt. I'm not running any of this as root.

Since mysql is running shouldn't I be able to type "mysql" or "mysqld" into the terminal and get to the prompt? This is what happens when I try that.

Code:
$ pwd
/bin
$ mysql
ksh: mysql: not found
$ mysqld
090630  9:04:58 [Warning] Can't create test file /var/lib/mysql/chiadvlpap2714.lowe     r-test
090630  9:04:58 [Warning] Can't create test file /var/lib/mysql/chiadvlpap2714.lowe     r-test
mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
090630  9:04:58 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade      to create it.
090630  9:04:58  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: 'open'.
InnoDB: Cannot continue operation.
 
Old 06-30-2009, 12:40 PM   #14
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Where is mysql (the client)? Did you uninstall it by accident? Try which mysql or locate mysql (the latter after you have run updatedb as root user).

As the ps result in your post #11 shows, mysqld is already running. Running mysqld a second time will usually cause errors. And when you start the program without parameters, it will use (if I'm not mistaken) a default set for the configuration which might totally not match your setup.
 
Old 06-30-2009, 01:36 PM   #15
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
you never did supply the output of the following command I requested.. it should show ALL packages that are installed that begin with mysql.. the server, the client, etc... .

Quote:
Originally Posted by farslayer
to see if it's actually installed or not...

yum list installed mysql
 
  


Reply



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
Segmentation Fault, Should I try new memory M$ISBS Linux - Hardware 10 07-04-2006 04:49 PM
Segmentation fault when starting Mozilla eam Linux - Software 11 06-27-2006 01:38 PM
Segmentation Fault when starting Maya 7 Renato Cabelino Linux - Software 4 11-29-2005 03:32 PM
Memory fault russoue Programming 14 11-13-2004 01:01 PM
Segmentation fault when starting WINE :( quinnk Linux - Software 1 07-12-2004 02:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:47 AM.

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