Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
MySQL server doesn't run and hangs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
sasq
Apprentice
Apprentice


Joined: 09 Sep 2005
Posts: 234
Location: Poland

PostPosted: Thu Mar 28, 2013 7:28 pm    Post subject: MySQL server doesn't run and hangs Reply with quote

I've just emerged dev-db/mysql-5.1.67. Compiled successfully.
Then I ran emerge --config =dev-db/mysql-5.1.67, as suggested by the emerge messages.
I typed in my new admin password (twice), and the config tool hanged at this point:

Code:
Configuring pkg...

 * Please provide a password for the mysql 'root' user now, in the
 * MYSQL_ROOT_PASSWORD env var or through the /root/.my.cnf file.
 * Avoid ["'\_%] characters in the password
    >
 * Retype the password
    >
 * Command: '/usr/bin/mysql_install_db' '--basedir=/usr' --log-warnings=0 --user=mysql


After several minutes without any apparent action, I killed it and tried again. This time the message was:

Code:
Configuring pkg...

 * You have already a MySQL database in place.
 * (///var/lib/mysql/*)
 * Please rename or delete it if you wish to replace it.
 * ERROR: dev-db/mysql-5.1.67 failed (config phase):
 *   MySQL database already exists!
 *
 * Call stack:
 *     ebuild.sh, line   93:  Called pkg_config
 *   environment, line 4030:  Called mysql-v2_pkg_config
 *   environment, line 3636:  Called die
 * The specific snippet of code:
 *           die "MySQL database already exists!";
 *
 * If you need support, post the output of `emerge --info '=dev-db/mysql-5.1.67'`,
 * the complete build log and the output of `emerge -pqv '=dev-db/mysql-5.1.67'`.
 * This ebuild is from an overlay named 'gentoo': '/var/db/pkg/'
 * The complete build log is located at '/var/tmp/portage/dev-db/mysql-5.1.67/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-db/mysql-5.1.67/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-db/mysql-5.1.67'
 * S: '/var/tmp/portage/dev-db/mysql-5.1.67/work/mysql-5.1.67'


so I assumed that the configuration has been done. Then I tried to run the server by /etc/init.d/mysql start, but it just hangs again:

Code:
* Caching service dependencies ...    [ ok ]
 * Starting mysql ...


I killed it and tried to run the mysqld daemon manually. But the result is the same: it just hangs, without any error messages.

I checked the logs, they were all empty.

What is wrong and how to repair it?
I've never had any such problems with MySQL in the past.
_________________
SasQ
Back to top
View user's profile Send private message
honp
Guru
Guru


Joined: 25 Sep 2006
Posts: 355
Location: Good old Prague, Czech rep.

PostPosted: Tue Apr 02, 2013 9:09 am    Post subject: Reply with quote

Which logs did you check?
Back to top
View user's profile Send private message
sasq
Apprentice
Apprentice


Joined: 09 Sep 2005
Posts: 234
Location: Poland

PostPosted: Tue Apr 02, 2013 6:46 pm    Post subject: Reply with quote

Every single one in /var/log/mysql/: mysqld.err, mysql.err, mysql.log. Every one was empty.

Strangely enough, after I killed that hanged process, deleted the installation and configured it once more, now everything works again :-P

So I don't have that problem any more, but it might be some bug in the installation, and others might have it too, so it's worth investigating.
_________________
SasQ
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum