Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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).
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.
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.
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.
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
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..
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..
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
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, ...
$ 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
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.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.