Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mysql question.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
manu_leo
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2014
Posts: 119
Location: India

PostPosted: Sat Aug 16, 2014 3:38 pm    Post subject: mysql question. Reply with quote

Hi Experts, I am trying to install mysql on my new Gentoo server. I do 'emerge --ask mysql' and it does the installation. This creates a mysql directory under /var/log/mysql. Then I try 'emerge --config =dev-db/mysql-5.5.39' because its a fresh install which gives me an error message :-

emerge --config =dev-db/mysql-5.5.39


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.5.39::gentoo failed (config phase):
* MySQL database already exists!

*
* Call stack:
* ebuild.sh, line 93: Called pkg_config
* environment, line 3658: Called mysql-v2_pkg_config
* environment, line 3200: 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.5.39::gentoo'`,
* the complete build log and the output of `emerge -pqv '=dev-db/mysql-5.5.39::gentoo'`.
* The complete build log is located at '/var/tmp/portage/dev-db/mysql-5.5.39/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-db/mysql-5.5.39/temp/environment'.
* Working directory: '/usr/lib64/portage/pym'
* S: '/var/tmp/portage/dev-db/mysql-5.5.39/work/mysql-5.5.39'


Now, If I go ahead and rename /var/log/mysql to /var/log/mysql.bak and re-run 'emerge --config =dev-db/mysql-5.5.39', it works just fine.

My dout is , 'emerge mysql' creates a directory '/var/log/mysql/' . Then I run 'emerge --config =dev-db/mysql-5.5.39' because its a fresh install and it again creates a same directory . Because of this the installation fails and comes with the above error message. Why does this happens - Why does both the commands create the same directory ?
Back to top
View user's profile Send private message
brendlefly62
n00b
n00b


Joined: 19 Dec 2009
Posts: 25

PostPosted: Sun Aug 24, 2014 2:01 pm    Post subject: Reply with quote

Hi Manu_leo,
I would suggest you check out this resource:
http://wiki.gentoo.org/wiki/MySQL
in particular:
http://wiki.gentoo.org/wiki/MySQL/Startup_Guide
https://wiki.gentoo.org/wiki/MySQL/Migrate_to_5.0
This may also help:
http://www.gentoo-wiki.info/MySQL/Install

Just off the top ... If you already have a databasee, you may be able to start mysql and log in --
for openrc:
Code:
/etc/init.d/mysql start

or for systemd:
Code:
root # systemctl restart mysqld.service

set the root password since it appears that to the best of your knowledge you have not already done so:
Code:
root # /usr/bin/mysqladmin -u root -h localhost password 'new-password'

log in
Code:
user $ mysql -u root -h localhost -p
[/code]

hope some of this helps :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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