Zentyal Forum, Linux Small Business Server

Zentyal Server => Installation and Upgrades => Topic started by: nordge1 on September 06, 2010, 06:54:17 pm

Title: MYSQL password for Zentyal 2.0
Post by: nordge1 on September 06, 2010, 06:54:17 pm
It looks like mysql comes pre-installed on 2.0. When I try and install phpmyadmin, it asks me for the administrative password. I entered my Zentyal password thinking they might be synced but no luck. Is there a default password that Zentyal is using when it installs?
Help
Thanks
Title: Re: MYSQL password for Zentyal 2.0
Post by: J. A. Calvo on September 06, 2010, 08:43:08 pm
mysql is only installed as a dependency of the zarafa module, the password is stored in the following file:

/var/lib/ebox/conf/ebox-zarafa.passwd
Title: Re: MYSQL password for Zentyal 2.0
Post by: nordge1 on September 07, 2010, 12:02:01 am
Thanks for the quick response.
Can I change it? Maybe by updating the file you mentioned and mysql?
Title: Re: MYSQL password for Zentyal 2.0
Post by: J. A. Calvo on September 07, 2010, 12:40:41 am
Yes, I think there is no problem if you change it in both places.
Title: Re: MYSQL password for Zentyal 2.0
Post by: nordge1 on September 17, 2010, 03:58:17 am
Solved:

1.Change the default password in the config file for Zentyal
Code: [Select]
sudo nano /var/lib/ebox/conf/ebox-zarafa.passwd2. Copy and paste the password to a text file for root login later. Comment out the password in the file and list your new password for mysql. Then press ctrl 'x' then 'y'
3. Stop the MySQL Server.
Code: [Select]
sudo /etc/init.d/mysql stop4. Start the mysqld configuration
Code: [Select]
sudo mysqld --skip-grant-tables &5. Login to MySQL as root. EDIT: Use original password in "ebox-zarafa.passwd", the one you commented out in step 2
Code: [Select]
mysql -u root mysql6. Replace YOURNEWPASSWORD with your new password!
Code: [Select]
UPDATE user SET Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit;
You can then install phpmyadmin and gain access for root





Title: Re: MYSQL password for Zentyal 2.0
Post by: thorsten on September 26, 2010, 12:09:05 pm
Hi

1.Change the default password in the config file for Zentyal
Code: [Select]
sudo nano /var/lib/ebox/conf/ebox-zarafa.passwd2. Copy and paste the password to a text file for root login later. Comment out the password in the file and list your new password for mysql. Then press ctrl 'x' then 'y'

I am sorry, I am real newbie ... can you point out these two steps:

1) I made the password ("some cryptic text") to #"some cryptic text"
and added "test" in a new line

2) 
Code: [Select]
sudo cp /var/lib/ebox/conf/ebox-zarafa.passwd /var/lib/ebox/conf/ebox-zarafa.passwd.bak
was that OK?

It seems that it does not work: I can not access Zarafa and I am locked out from MySQL at all... a dpkg reconfigure and / or uninstall / install of the respective zentyal modules (zarafa, mail) does not help...

Any ideas, thanks
Thorsten
Title: Re: MYSQL password for Zentyal 2.0
Post by: nordge1 on October 03, 2010, 03:50:05 am
Those both seem fine.
Did you do the rest of the steps to change the password in MySQL (steps 3-6) ? Did you receive any errors during those steps?
Title: Re: MYSQL password for Zentyal 2.0
Post by: nordge1 on October 03, 2010, 03:53:37 am
Did you use the original password when you logged into mysql to change the password? See edit above
Title: Re: MYSQL password for Zentyal 2.0
Post by: nordge1 on October 03, 2010, 03:58:23 am
J. A. Calvo
I am having real trouble getting Zafara working on this edit. Is there somewhere I need to change the password for Zafara to access mysql? It's a very odd problem because I can't even get the web interface for Zafara to come up on my virtual host.

If I go to "http://DomainName" I get roundcube interface and if I go to "http://DomainName/webaccess" I get "Not Found".

Any ideas what's up?
Thanks
Title: Re: MYSQL password for Zentyal 2.0
Post by: cougarmaster on October 03, 2010, 07:20:51 am
J.A. Calvo,
      Shouldn't Zentyal change from mysql to postgresql or opensource versions? Since oracle will take it away anytime they want and we as users will be stuck inbetween. Oracle is really going to stamp out all opensource in their hands.

Tks in Advance
Eric
Title: Re: MYSQL password for Zentyal 2.0
Post by: J. A. Calvo on October 03, 2010, 12:14:22 pm
J.A. Calvo,
      Shouldn't Zentyal change from mysql to postgresql or opensource versions? Since oracle will take it away anytime they want and we as users will be stuck inbetween. Oracle is really going to stamp out all opensource in their hands.

Zentyal uses PostgreSQL  since the beginning. It's Zarafa what depends on MySQL...
Title: Re: MYSQL password for Zentyal 2.0
Post by: thorsten on October 11, 2010, 09:57:11 pm
Hi

Those both seem fine.
Did you do the rest of the steps to change the password in MySQL (steps 3-6) ? Did you receive any errors during those steps?

yes, of course

Did you use the original password when you logged into mysql to change the password? See edit above

OK - first error

J. A. Calvo
I am having real trouble getting Zafara working on this edit. Is there somewhere I need to change the password for Zafara to access mysql? It's a very odd problem because I can't even get the web interface for Zafara to come up on my virtual host.

If I go to "http://DomainName" I get roundcube interface and if I go to "http://DomainName/webaccess" I get "Not Found".

Any ideas what's up?
Thanks

Thats my problem at the moment, too - Zarafa does not move anymore. No uninstall / reinstall / reconfigure works for me so far (sorry, did not document all my trails ...)

I hope you can help, I would like to run MYSQL and Zarafa again....

THX
Thorsten
Title: Re: MYSQL password for Zentyal 2.0
Post by: FutureTechSys on October 11, 2010, 11:51:49 pm
I had fun with /webaccess as well

Couple of pointers:

-You need port 80 and 25 open and forwarded to the INTERNAL ip of your zentyal server
-You need to configure the firewall properly to allow access to the /webaccess
-With webmail, its user@email.com to login, with Zarafa, its just the part before the "@" sign
-Run all the system and component updates

Hope something in here helps.
Title: Re: MYSQL password for Zentyal 2.0
Post by: nordge1 on October 12, 2010, 07:58:35 am
I have found that my install, reinstall are ineffective as well. I actually reverted to the old password and changed it in Mysql as well. No joy!!!
I have found that my Zafara server never actually starts now from the log at "/var/log/zarafa/server.log".

"Mon Oct 11 12:26:16 2010: Unable to connect to database: Access denied for user 'zarafa'@'localhost' (using password: YES)"

Looks like maybe a user/password issue with Mysql. This is little outside of my expertise. Anyone know what's going on here?
Title: Re: MYSQL password for Zentyal 2.0
Post by: FutureTechSys on October 12, 2010, 06:27:28 pm
I don't know how to do it, but someone here might.  The uninstall/reinstall seems to just be the GUI plugin portion.  You'll probably have to google for ubuntu rather than Zentyal, and maybe search for "ubuntu reinstall mysql" and manually recreate the thing.

I could be talking out of my rearend, but that's what I would try.  I love MySQL when it works, but I really hate messing with it.
Title: Re: MYSQL password for Zentyal 2.0
Post by: jsalamero on October 17, 2010, 12:23:22 pm
Purge mysql, zarafa and ebox-zarafa. Delete the /var/lib/ebox/conf/ebox-zarafa.passwd file and start again, you probably messed up something there... :)
Title: Re: MYSQL password for Zentyal 2.0
Post by: thorsten on November 03, 2010, 11:27:54 pm
Hi,

Ok, purged those three packages via
Code: [Select]
sudo apt-get remove --purge mysql*
sudo apt-get remove --purge ebox-zarafa
sudo apt-get remove --purge zarafa
sudo apt-get autoclean
sudo apt-get autoremove

Manually deleted the password file and backups
Reinstalled Zarafa an E-Mail from Web-Front-End - Zarafa does still not work:
Changes are not stored within Zarafa, Zarafa servers seems not to be running, however, webaccess can be reached - login was not possibel, can not connect to server.

So I removed everything again. When browsing throught the directories I found some directores containing several files, e.g. .conf or similar:

/etc/mysql
/var/lib/mysql
/var/lib/zarafa
/var/lib/zarafa-webaccess
/var/lib/fetchmail
/etc/zarafa

Can I manually delete that stuff ?
I would like to purge everything before I do the next trail.
Are there any other files I might have missed in order to completely remove those packages?

Thank you
Thorsten


but: there are still files left

Title: Re: MYSQL password for Zentyal 2.0
Post by: hadrich on November 05, 2010, 05:18:26 pm
mysql is only installed as a dependency of the zarafa module, the password is stored in the following file:

/var/lib/ebox/conf/ebox-zarafa.passwd

I try that password to connect to mysql but not working :
Code: [Select]
$ mysql -uroot -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Title: Re: MYSQL password for Zentyal 2.0
Post by: hadrich on November 08, 2010, 09:40:34 am
Any idea please, i can't install avantfax depend of MYSQL.
Title: Re: MYSQL password for Zentyal 2.0
Post by: hadrich on November 08, 2010, 02:49:19 pm
My problem was resolved :
user = 'root'   ==> password = '' (empty)
user = 'zarafa'  ==> password = '</var/lib/ebox/conf/ebox-zarafa.passwd>'
Title: Re: MYSQL password for Zentyal 2.0
Post by: Narcis Garcia on August 20, 2012, 12:26:40 pm
My workaround before reinstall/reconfigure:

Code: [Select]
cat /etc/zentyal/logs.conf | grep -ie "_db"
echo $(sudo cat /var/lib/*/conf/*-mysql.passwd)
mysql -u root -p
CREATE DATABASE dbname;
GRANT ALL ON dbname.* TO dbuser@localhost IDENTIFIED BY "dbpasswd";
FLUSH PRIVILEGES;
QUIT;
Title: Re: MYSQL password for Zentyal 2.0
Post by: immortal on November 22, 2012, 10:07:20 pm
My problem was resolved :
user = 'root'   ==> password = '' (empty)
user = 'zarafa'  ==> password = '</var/lib/ebox/conf/ebox-zarafa.passwd>'

in what place do it? write more
Title: Re: MYSQL password for Zentyal 2.0
Post by: dior on December 16, 2013, 11:54:12 pm
I don't know how to do it, but someone here might.  The uninstall/reinstall seems to just be the GUI plugin portion.  You'll probably have to google for ubuntu rather than Zentyal, and maybe search for "ubuntu reinstall mysql" and manually recreate the thing.

I could be talking out of my rearend, but that's what I would try.  I love MySQL when it works, but I really hate messing with it.

text editors add a line break after the password, therefore, better to use the echo command:

sudo echo -n '123456' > /var/lib/ebox/conf/ebox-zarafa.passwd

for details http://integrator.adior.ru/index.php/sql-mysql/259-kak-uznat-parol-polzovatelya-zentyal-bazy-dannykh-mysql (http://integrator.adior.ru/index.php/sql-mysql/259-kak-uznat-parol-polzovatelya-zentyal-bazy-dannykh-mysql)