?
Solved

How to run/check MySql?

Posted on 2007-10-15
8
Medium Priority
?
1,470 Views
Last Modified: 2013-12-15
Hello group,

This is the first time I am using MySql so I will appreciate it if you advise me on this quesiton.

I'm connectiong to a linux server from a machine. I'm told tht MySql is installed. However, when I check /var/lib/  there is no sign of MySQL. but when I run:

        rpm -qa | grep mysql

it responds fine.
1) How can I find where msql has been installed?
2) How can I run mysql?


Thanks,
ak
0
Comment
Question by:akohan
  • 3
  • 3
  • 2
8 Comments
 
LVL 6

Expert Comment

by:msklizmantas
ID: 20080990
hi,

rpm -qa | grep mysql

only list software (if it is installed). please provide us the output from

rpm -qa | grep -i mysql

so we can check what it is installed. after it you will get smth like:

mysql-server-4.1.20-2.RHEL4.1

try to list contents with:

rpm -ql mysql-server-4.1.20-2.RHEL4.1

also you can check if /etc/init.d/mysql exists.

regards,

m

0
 
LVL 48

Expert Comment

by:hernst42
ID: 20081036
Try to start the mysql-server with:

/etc/init.d/mysql start

if there is no /etc/init.d/mysql then there might be no mysql-server installed. Whats the output of
rpm -qa | grep -i mysql
0
 

Author Comment

by:akohan
ID: 20081075


Thanks!

I ran the first command and I got:
         
               mysql-5.0.22-2.1

However, when I get to /etc/init.d/  mysql doesn't exist there.

I also ran the following command but got error and have no idea how to fix or what to do about it. Any suggestions?


[root@omega bin]# /usr/bin/mysqladmin version
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!

[root@omega bin]# /usr/bin/mysqladmin variables
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!

Regards,
ak


0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 6

Accepted Solution

by:
msklizmantas earned 500 total points
ID: 20081103
hi,

you do not have mysql server installed. you can install it with yum:

yum install mysql-server

or you can download rpms from www.mysql.com and install using rpm -Uhv

regards,

m
0
 
LVL 48

Assisted Solution

by:hernst42
hernst42 earned 500 total points
ID: 20081162
In this case no mysql-server-package is installed. Use the package-management system of your distribution (which distro are you using) to install the missing server component. Sure ther is a search-function where you can search for mysql and check the server package.
0
 

Author Comment

by:akohan
ID: 20081776

Thanks all. it is working now.

I truly appreciate your help.

Regards,
ak
0
 

Author Comment

by:akohan
ID: 20081783

Do you suggest I read a book  (then what book?) or is there any online guide to learn MySQL? (what is the address?)

Thanks.
0
 
LVL 6

Expert Comment

by:msklizmantas
ID: 20082019
of course there are many guides and tutorials online, you can easily find them using google. but i would suggest to get good book, such as:

The Definitive Guide to MySQL 5 # By Michael Kofler
# ISBN10: 1-59059-535-1
# ISBN13: 978-1-59059-535-0


and afterwards:

Pro MySQL # By Michael Kruckenberg, Jay Pipes
# ISBN10: 1-59059-505-X
# ISBN13: 978-1-59059-505-3

regards,

m
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month17 days, 4 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question