Welcome, Guest. Please login or register.

Author Topic: NeDi 1.0.4: Bug in nedi.pl -i ?  (Read 8106 times)

gumba

  • Guest
NeDi 1.0.4: Bug in nedi.pl -i ?
« on: April 15, 2009, 01:33:11 PM »
Reinitializing the database for NeDi 1.0.4, it seems NeDi fails connecting to the database because the script is messing up the user name and password entered. First when I started reinitialization using simply nedi.pl -i, it did not prompt for admin user and pass but just started connecting with empty credentials. I fixed this by changing line 108 in nedi.pl from
Code: [Select]
if ($#ARGV){
to
Code: [Select]
if ($#ARGV && $#ARGV>0){

Now, admin user and pass where prompted, but NeDi always stuck when connecting to the database, failing with
Code: [Select]
DBI connect('mysql:localhost','',...) failed: Access denied for user 'myusername'@'localhost' (using password: NO) at ./inc/libdb-msq.pl line 21
Seems like nedi.pl fails to pass the user name and password to the connect function. I fixed this by removing the keyword 'my' from the assignments in line 116 and 118.

I'm running NeDi 1.0.4 on an Ubuntu 8.04 (Kernel 2.6.24) with Perl 5.8.8. Maybe this problem is just specific to the Perl version or anything.

MacBest

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: NeDi 1.0.4: Bug in nedi.pl -i ?
« Reply #1 on: April 15, 2009, 02:08:41 PM »
Hi there,

same stuff here. I just solved it by using the following syntax (as Remo mentioned)

nedi -i <dbadminuser> <dbadminpassword>

The old way gave me the same errors as mentioned earlier

Jürgen

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2632
    • View Profile
    • NeDi
Re: NeDi 1.0.4: Bug in nedi.pl -i ?
« Reply #2 on: April 15, 2009, 04:40:08 PM »
That's a contribution I've added to enable novum's System GUI-modules. they're not activated in the config, as they where written for 1.0. I just adjusted the icons, but I'm hoping novum will take care of the rest...
« Last Edit: April 15, 2009, 04:41:47 PM by rickli »
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

gumba

  • Guest
Re: NeDi 1.0.4: Bug in nedi.pl -i ?
« Reply #3 on: April 15, 2009, 04:59:45 PM »
Contribution? GUI-modules? Not activated? What icons? Confused... ???

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2632
    • View Profile
    • NeDi
Re: NeDi 1.0.4: Bug in nedi.pl -i ?
« Reply #4 on: April 15, 2009, 05:09:27 PM »
 :) I'm referring to this post: http://forum.nedi.ch/index.php?topic=438.0. Uncomment the "System" menu entries and you'll see. But as mentioned they where written for 1.0 and won't work properly with the current release. But since I want to gear the project more towards an appliance I like this idea particularly. I'm even thinking about some additional features...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

mrsilva

  • Guest
Re: NeDi 1.0.4: Bug in nedi.pl -i ?
« Reply #5 on: May 20, 2009, 05:48:22 PM »
I just upgraded to 1.04 and seem to have the same problem (my PERL is also 5.8.8 ):

[nedi]$ ./nedi.pl -i

NeDi 1.0.4 - 4.Apr 2009
DBI connect('mysql:localhost','',...) failed: Access denied for user 'nedi'@'localhost' (using password: NO) at ./inc/libdb-msq.pl line 21


If I enter the username and password the results are the same:

[nedi]$ ./nedi.pl -i nedi dbpa55

NeDi 1.0.4 - 4.Apr 2009
DBI connect('mysql:localhost','nedi',...) failed: Access denied for user 'nedi'@'localhost' to database 'mysql' at ./inc/libdb-msq.pl line 21


If I just enter the username it will prompt for the password, but it seems to be connecting to a different database ('mysql'):

[nedi]$ ./nedi.pl -i nedi

NeDi 1.0.4 - 4.Apr 2009

DB will be dropped and re-initialized, bail out if don't want this!
-------------------------------------------------------------------------
MySQL admin user: nedi
MySQL admin pass: dbpa55
DBI connect('mysql:localhost','',...) failed: Access denied for user 'nedi'@'localhost' (using password: NO) at ./inc/libdb-msq.pl line 21


I tried replacing the database name to 'nedi' at line 21 of ./inc/libdb-msq.pl and I got:

[nedi]$ ./nedi.pl -i nedi dbpa55

NeDi 1.0.4 - 4.Apr 2009
MySQL Version   : 5.0.45
----------------------------------------------------------------------
Old DB nedi dropped!
Creating nedi DBD::mysql::db do failed: Access denied for user 'nedi'@'localhost' to database 'nedi' at ./inc/libdb-msq.pl line 35.
DBD::mysql::db do failed: Access denied for user 'nedi'@'localhost' to database 'nedi' at ./inc/libdb-msq.pl line 35.


To solve this I ran the script as  root and it worked!

It seems line 21 has to be corrected in the release.




rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2632
    • View Profile
    • NeDi
Re: NeDi 1.0.4: Bug in nedi.pl -i ?
« Reply #6 on: August 25, 2009, 11:43:50 PM »
I finally got around looking at this. Thanks Gumba and others for pointing it out! A rainy day on my long awaited vacation helps too  ;)
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

oxo

  • Guest
nedi.pl -i ok on Ubuntu 9.10 - hope the rest works
« Reply #7 on: November 05, 2009, 06:22:18 PM »
the syntax is:
./nedi.pl -i <root> <password>

I tried starting it with old style -i then tried  -i <root>/<password> as in:
-i (u/pw)initialize database and start all over

I like that NediO is back :)