New centos dedicated server - cant get mysql working

 
Thread Tools Search this Thread
Homework and Emergencies Emergency UNIX and Linux Support New centos dedicated server - cant get mysql working
# 1  
Old 12-29-2011
New centos dedicated server - cant get mysql working

Hi all,

I installed centos 5, with LAMP.
httpd is working fine, ssh, ftp all working ok.

But, when I try to use mysql its not,

when I give the command

Code:
mysql

I get
Code:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)


Last edited by lawstudent; 12-29-2011 at 10:12 AM.. Reason: code tags
# 2  
Old 12-29-2011
Is mysql running?
Code:
service mysqld status

ps fax | grep mysqld


Last edited by zaxxon; 12-29-2011 at 10:11 AM.. Reason: code tags
This User Gave Thanks to otheus For This Post:
# 3  
Old 12-29-2011
Hi, thanks for the reply..
this is the respons

Code:
[root@test /]$  mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib        h socket '/var/lib/mysql/mysql.sock' (2)service mysqld statusSQL server through
-bash: syntax error near unexpected token `('
[root@test /]$  service mysqld status
mysqld is stopped
[root@test /]$  ps fax | grep mysqld
 5636 pts/1    S+     0:00          \_ grep mysqld
[root@test /]$  service mysqld start
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL:                                            [FAILED]
[root@test /]$

Moderator's Comments:
Mod Comment Use code tags please, ty. See PM.

Last edited by zaxxon; 12-29-2011 at 10:10 AM.. Reason: code tags
# 4  
Old 12-29-2011
yum remove mysql* -y
rm -rf /var/lib/mysql

yum install mysql* -y

service mysqld restart

mysql -u root -p
password





there you go
This User Gave Thanks to sandy.bhadoriya For This Post:
# 5  
Old 12-29-2011
fantastic!

Thank you so much!
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. What is on Your Mind?

The C64 is back, this time full-sized with a working keyboard for the dedicated retro home-computer

Retro Games has announced that the C64 is back, this time full-sized with a working keyboard for the dedicated retro home-computer fan, available December 2019. See also: CNN: Iconic 80s computer The Commodore 64 to return with fully-functional keyboard YouTube: The C64 | Trailer ... (2 Replies)
Discussion started by: Neo
2 Replies

2. UNIX for Dummies Questions & Answers

Add new smtp to my dedicated server

Hi there, I have a dedicated server that sends mail with own smtp (obviously). On this server I have a web platform for music artists that allows entries for each enrollment and sends confirmation e-mails and so on ... Now I have purchased a service smtp (like those of smtp.com) because I... (3 Replies)
Discussion started by: colorsthink
3 Replies

3. Linux

ipcheck problem in my dedicated server

Dear Friends, We have a 4 dedicated servers. All are working but the thing is one server is not working. when i go to network tools and after i enter my host domain i cant able to ping. it is showing host not found. But remaining servers are working. I terminate my account and re-again create... (4 Replies)
Discussion started by: mastansaheb
4 Replies

4. UNIX for Advanced & Expert Users

How to optimize apache and mysql on my dedicated server?

Hi, Any one please suggest me the best mysql, apache settings for the given below scenario. My Server config: Intel(R) Xeon(R) CPU E5504 @ 2.00GHz 8GB RAM 300GB HDD Website: It's a famous wordpress blog Mysql DB size: 235MB Expectations: Server should be handle 600+ concurrent... (0 Replies)
Discussion started by: chandranjoy
0 Replies

5. Emergency UNIX and Linux Support

Dedicated Server - Linux Mirror

Hi guys. I am gonna buy a dedicated server and make it a public mirror for some distributions. but how much RAM, Hard Disk, Band Width, ... will suffice? It will be a mirror for CentOS and Ubuntu both. (3 Replies)
Discussion started by: majid.merkava
3 Replies

6. UNIX for Dummies Questions & Answers

Mail/ftp/web servers, on VIRTUAL!! dedicated server. Also resource usage. Centos 5.

Hi. First of all, would 4 or 5 websites, 1 ftp server (when downloading by someone or a few persons or one, concretize) and one mail server (not many emails, just to sound official and have a nice, spam-free email for myself). Websites with not that many, but some, later more visitors, quite... (0 Replies)
Discussion started by: newn
0 Replies

7. IP Networking

Dedicated Server Move

I just moved a dedicated server, which included moving to a new subnet, and new IP address. Now my server is not reconnecting - I've tried ifconfig, altering the etc/hosts file with the new ip address, with no luck. (5 Replies)
Discussion started by: esmerika
5 Replies
Login or Register to Ask a Question