0

My MYSQL installaion has messed up. I tried purging the mysql using

sudo apt-get purge mysql-client mysql-client-5.0 mysql-common mysql-server mysql-server-5.0

But it got hanged in middle

I installed again from gui in ubuntu. it get installed

But when i type service mysql start using root then system got hanged again , i had to press ctrl C to exit

when i type telent 127.0.0.1 3306

it says can't connect.

what should i do

2 Answers 2

2

Since you just installed MySQL i can recommend you a few things.

  • Make sure the MySQL user and group is present id mysql if not, create them groupadd mysql; useradd mysql -g mysql -M -s /bin/false
  • Make sure the MySQL Data folder user and group are set to mysql user and group chown -R mysql.mysql /var/lib/mysql where /var/lib/mysql is the path to your MySQL data folder (ie.: /var/lib/mysql is a default place but it may be somewhere else depending on how have you installed it).
  • If you don't know where your data directory is, you can check your init mysql script that is inside /etc/init.d and look for the entry --datadir=
  • Before you can run MySQL, you must have a database. To install an initial database, do this as root: scripts/mysql_install_db
0

Seems that the mysql daemon don't start up.

Have you tried to check log of mysql in /var/log/mysql ?

for check the status of a daemon in Linux you could type this in your terminal : /etc/init.d/mysql status

but seems that your mysql server doesn't start up, therefore the status of the process should be "not running" .

1
  • the status is mysql stop/post-start, (post-start) process 699 but when i type service mysql start , then it again got hanged
    – John
    Aug 23, 2010 at 5:26

You must log in to answer this question.