Author Topic: phpMyAdmin installtion OK but problems to access phpMyAdmin  (Read 8769 times)

knarf

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Hi

(sorry for my bad english, french and italian are better for me)

i try to explain my problems

First, I've installed phpMyAdmin with "apt-get", looking for the webmaster password (asked installing phpMyAdmin with apt-get) on file "/var/lib/zentyal/conf/zentyal-mysql.passwd" and modified  /etc/apache2/apache2.conf to add "Include /etc/phpmyadmin/apache.conf" at the bottom of the configuration file.
Second point, restart the apache server like that: "/etc/init-d/apache2 restart"

try to enter on phpMyAdmin on http://localhost/phpmyadmin and ok, it's seem to work.

Now, I've tryed all users and all passwords in my Zentyal to enter in phpMyAdmin and I have always this result "#1045 Cannot log in to the MySQL server"

I've tryed in SSH to enter on MYSql, and all users are granted to use MYSQL but not ROOT. tryed this with command "mysql -u user -p" (user like users on my system).

Now, I would like to understand why root cannot enter in mysql, why users can access in SSH on mysql and not by phpMyAdmin

Thanks a lot for the answers

P.S.: I'm trying to install Nagios, Centreon and Cacti on my Zentyal, and I need MYSQL to make a coherent communication between the packages, otherwise need to make all handmade and it is not so simple
Zentyal 6, Nagios, Centreon, Cacti, Debian

Raspberry Pi 3 jukebox, RetroPie

Curiosity tester

christian

  • Guest
Re: phpMyAdmin installtion OK but problems to access phpMyAdmin
« Reply #1 on: May 03, 2013, 07:21:22 am »
First, if you're more comfortable with French, be aware there is a French section here too, however audience will not be the same.
Second, if goal is to monitor (also) Zentyal, I would suggest not to install is on same server.

I believe, as you go for quite heavy monitoring solution, that yo already run multiple servers. Having monitoring running on one of the server you intend to monitor as a major side effect: in case of any problem on this server, you blind and do not monitor anything.
Depending on your technical scope, meaning if you have quite few servers to monitor, you can run this solution on small dedicated server or VM using SAN to provide higher availability (although this is more complex).

Which Zentyal version are you running ?

knarf

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: phpMyAdmin installtion OK but problems to access phpMyAdmin
« Reply #2 on: May 03, 2013, 07:53:31 am »
I'm working on the last issue, the 3.0-2, on a VMware (and it work pretty cool alone and with Nagios)

(I prefere english, learning it ^_^)

I try to explain more of the situation

A friend proposed to install Nagios on a Zentyal, to try if we can remove a machine on the network (have less)

And the problem is Mysql who won't to be managed with phpmyadmin, but in a Shell it's ok.

Mysql is needed to make communications between Nagios and Centreon, if not, we can't have a friendly interface, and some Network Managers don't understand how works Nagios (not stupid, but they won't try to understand numbers)

After all, if we can virtualize Nagios on Zentyal, and access on mysql in this way, why not

« Last Edit: May 03, 2013, 07:55:06 am by knarf »
Zentyal 6, Nagios, Centreon, Cacti, Debian

Raspberry Pi 3 jukebox, RetroPie

Curiosity tester

knarf

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: phpMyAdmin installtion OK but problems to access phpMyAdmin
« Reply #3 on: May 06, 2013, 10:11:24 am »
I'm always looking for a solution with PHPMYADMIN and MYSQL permissions... Somebody have a trick?

Thanks in advance
Zentyal 6, Nagios, Centreon, Cacti, Debian

Raspberry Pi 3 jukebox, RetroPie

Curiosity tester

jbahillo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1444
  • Karma: +77/-2
    • View Profile
Re: phpMyAdmin installtion OK but problems to access phpMyAdmin
« Reply #4 on: May 06, 2013, 11:42:09 am »
Hi there:

You might want to have a look on database information_schema:

mysql>USE information_schema;

and to look at table USER_PRIVILEGES:

mysql> SELECT * FROM USER_PRIVILEGES;

so you can check if the hostname field is defined or if it is wildcarded

Cheers!

knarf

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: phpMyAdmin installtion OK but problems to access phpMyAdmin
« Reply #5 on: May 06, 2013, 11:18:44 pm »
Thanks jbahillo

I've try this, and this is mysql's response

mysql> SELECT * FROM USER_PRIVILEGES;
+-------------------+-----------------------------+-----------------------------+-------------------------+
| GRANTEE    | TABLE_CATALOG | PRIVILEGE_TYPE | IS_GRANTABLE |
+-------------------+-----------------------------+-----------------------------+-------------------------+
| ''@'localhost'  | def                        | USAGE                  | NO                    |
+-------------------+-----------------------------+-----------------------------+-------------------------+


And now? somebody as an idea? I think I must add users in this database, right?
Zentyal 6, Nagios, Centreon, Cacti, Debian

Raspberry Pi 3 jukebox, RetroPie

Curiosity tester

jbahillo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1444
  • Karma: +77/-2
    • View Profile
Re: phpMyAdmin installtion OK but problems to access phpMyAdmin
« Reply #6 on: May 06, 2013, 11:24:55 pm »
Use something like this:

Code: [Select]
GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY 'password' WITH GRANT OPTION;
You should then be able to use root account from localhost (the server itself) identifying with the password password

;)

knarf

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: phpMyAdmin installtion OK but problems to access phpMyAdmin
« Reply #7 on: May 06, 2013, 11:41:46 pm »
mysql> GRANT ALL PRIVILEGES ON * . * TO root@localhost IDENTIFIED BY 'xxx' WITH GRANT OPTION;
ERROR 1045 (28000): Access denied for user ''@'localhost' (using password: NO)


why?????

a little 'résumé': can access on mysql with the user created when asked on installation of zentyal, or in ROOT like this ''mysql -u user'' but never in root directly
Zentyal 6, Nagios, Centreon, Cacti, Debian

Raspberry Pi 3 jukebox, RetroPie

Curiosity tester

knarf

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: phpMyAdmin installtion OK but problems to access phpMyAdmin
« Reply #8 on: May 07, 2013, 09:50:11 pm »
always sames problems... trying with all users, they can access on MYSQL in a shell, but can do anything...

With PHPMADMIN, same error "1045"

why can't access with root ion MySQL in a shell?why can't grant all users? (tryed with sudo, in a root shell directly, but all manipulations are denied)

Modified: if I remove MYSQL and reinstall it? Can work? Or, other SQL progs are installable on Zentyal?
« Last Edit: May 08, 2013, 12:32:17 am by knarf »
Zentyal 6, Nagios, Centreon, Cacti, Debian

Raspberry Pi 3 jukebox, RetroPie

Curiosity tester

Marcus

  • Forum Moderator
  • Zen Samurai
  • *****
  • Posts: 395
  • Karma: +12/-0
    • View Profile
    • Professional IT Service
Re: phpMyAdmin installtion OK but problems to access phpMyAdmin
« Reply #9 on: May 08, 2013, 12:49:32 am »
Hello knarf,

Your error 1045 refer to a misconfigured phpMyAdmin.

Did you modified the config.inc.php file?

If not, please check those two lines in it and make sure to set the proper root password in it:
Code: [Select]
$cfg['Servers'][$i]['password'] = 'YOUR ROOT PASSWORD';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

Just in case, restart MySQL:
Code: [Select]
/etc/init.d/mysql restart
That should fix it...

Best,

Marcus

knarf

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: phpMyAdmin installtion OK but problems to access phpMyAdmin
« Reply #10 on: May 08, 2013, 10:46:32 am »
Hi Marcus

I've tryed, but I have the same problem.

Same error on PHPMYADMIN.

I don't understand why I can't enter on MySQL on a SHELL with root
Code: [Select]
MySQL -u root -p
other users can access but they can't modify anything
Zentyal 6, Nagios, Centreon, Cacti, Debian

Raspberry Pi 3 jukebox, RetroPie

Curiosity tester

jbahillo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1444
  • Karma: +77/-2
    • View Profile
Re: phpMyAdmin installtion OK but problems to access phpMyAdmin
« Reply #11 on: May 08, 2013, 10:51:58 am »
Hello knarf:

After doing this command:

GRANT ALL PRIVILEGES ON * . * TO root@localhost IDENTIFIED BY 'xxx' WITH GRANT OPTION;


Did you get any error message? If not, after doing this, can't root login with mysql -u root -p  specifying as password that xxx password?

knarf

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: phpMyAdmin installtion OK but problems to access phpMyAdmin
« Reply #12 on: May 08, 2013, 11:09:35 am »
Hi jbahillo

tryed this, and I have this result
Code: [Select]
mysql> GRANT ALL PRIVILEGES ON * . * TO root@localhost IDENTIFIED BY 'xxx' WITH GRANT OPTION;
ERROR 1045 (28000): Access denied for user ''@'localhost' (using password: NO)


tryed to replace the XXX value with the word password, without words, all password existing on the system and I hhave always same results

Zentyal 6, Nagios, Centreon, Cacti, Debian

Raspberry Pi 3 jukebox, RetroPie

Curiosity tester

jbahillo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1444
  • Karma: +77/-2
    • View Profile
Re: phpMyAdmin installtion OK but problems to access phpMyAdmin
« Reply #13 on: May 08, 2013, 11:14:52 am »
Try doing this:

  • stop mysql
  • run mysqld --skip-grant-tables
  • mysql>use mysql;
  • INSERT INTO user VALUES('localhost', 'root', '', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', '', '', '', '', '0', '0', '0');
  • stop mysql again
  • start mysql (make sure it is not running with that --skip-grant-tables parameter



knarf

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: phpMyAdmin installtion OK but problems to access phpMyAdmin
« Reply #14 on: May 08, 2013, 11:17:36 am »
before begining this... how many 'Y' do I put???
Zentyal 6, Nagios, Centreon, Cacti, Debian

Raspberry Pi 3 jukebox, RetroPie

Curiosity tester