LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 12-01-2011, 09:26 AM   #1
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,012

Rep: Reputation: 30
cannot start mysql / unrecognised?


Any ideas why it is not recognised?

Code:
[root@server myscripts]# yum install mysqld
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
No package mysqld available.
Error: Nothing to do
[root@server myscripts]# yum install mysql
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
Package mysql-5.1.52-1.el6_0.1.i686 already installed and latest version
Nothing to do
[root@server myscripts]# service mysqld start
mysqld: unrecognized service
[root@server myscripts]# service mysql start
mysql: unrecognized service
 
Old 12-01-2011, 09:44 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,713
Blog Entries: 14

Rep: Reputation: 1038Reputation: 1038Reputation: 1038Reputation: 1038Reputation: 1038Reputation: 1038Reputation: 1038Reputation: 1038
The things you stop/start with "service" are in /etc/init.d (and linked to /etc/rc?.d/* for various run levels).

If you do "ls -l /etc/init.d |grep -i mysql" you probably don't have mysqld there.

mysqld is provided by the mysql-server package so you need to install that with yum.

You can figure out what packages provide given file names by running:
yum provides "*/<file>"
In this case:
yum provides "*/mysqld"

The "*/" tells it to look for the file in any path.
 
Old 12-01-2011, 10:18 AM   #3
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,012

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by MensaWater View Post
The things you stop/start with "service" are in /etc/init.d (and linked to /etc/rc?.d/* for various run levels).

If you do "ls -l /etc/init.d |grep -i mysql" you probably don't have mysqld there.

mysqld is provided by the mysql-server package so you need to install that with yum.

You can figure out what packages provide given file names by running:
yum provides "*/<file>"
In this case:
yum provides "*/mysqld"

The "*/" tells it to look for the file in any path.
just did yum install mysql-server
but even when I type service start mysql or service start mysqld it is unrecognised

[root@server myscripts]# yum provides "*/mysqld"
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
centos-burstnet/filelists_db
updates-burstnet/filelists_db
mysql-server-5.1.47-4.el6.i686 : The MySQL server and related files
Repo : centos-burstnet
Matched from:
Filename : /var/run/mysqld
Filename : /usr/libexec/mysqld
Filename : /etc/rc.d/init.d/mysqld



mysql-server-5.1.52-1.el6_0.1.i686 : The MySQL server and related files
Repo : updates-burstnet
Matched from:
Filename : /var/run/mysqld
Filename : /usr/libexec/mysqld
Filename : /etc/rc.d/init.d/mysqld



mysql-server-5.1.52-1.el6_0.1.i686 : The MySQL server and related files
Repo : installed
Matched from:
Filename : /usr/libexec/mysqld
Filename : /etc/rc.d/init.d/mysqld



[root@server myscripts]#

Last edited by qwertyjjj; 12-01-2011 at 10:19 AM.
 
Old 12-01-2011, 10:20 AM   #4
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,012

Original Poster
Rep: Reputation: 30
got it I think:

Code:
[root@server myscripts]# /etc/init.d/mysqld start
Initializing MySQL database:  Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h server.proxy.net password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

                                                           [  OK  ]
Starting mysqld:                                           [  OK  ]
[root@server myscripts]#


---------- Post added 12-01-11 at 12:21 PM ----------

but now I get this when running a PHP file:

[root@server myscripts]# ./add_users.php
PHP Fatal error: Call to undefined function mysql_connect() in /usr/local/sbin/myscripts/add_remove_squid_users.php on line 13

Seems to be a PHP error. PHP IS installed.

Last edited by qwertyjjj; 01-10-2012 at 08:37 AM.
 
  


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
After moving mysql db to NFS[netapp] unable to start mysql server throws error naveenrajn Linux - General 3 09-13-2010 02:20 AM
Problem changing mysql uid,gid: mysql start fails gjatute Linux - Newbie 7 02-25-2010 01:38 AM
Fedora 9:No mysql.sock file found. Cannot start mysql smilingbuddha Linux - Software 3 03-21-2009 03:06 AM
I have RHEL 5.0 and MySQL start problem, my MySQL server doesn't start rsatya Linux - Enterprise 4 02-03-2009 12:04 PM
MySQL - Timeout error occurred trying to start MySQL Daemon. stuartornum Linux - Software 3 02-26-2006 12:54 PM


All times are GMT -5. The time now is 09:15 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration