<font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2"><DIV>Did you mean you always got error <FONT face="Courier New">ERROR 1045 (28000): Access denied for user 'test'@'localhost' (using password: YES)</FONT><BR>ok ,now try not put any password...</DIV> <DIV>just Enter...</DIV><BR><BR><FONT color=#990099>-----eprints-tech-bounces@ecs.soton.ac.uk wrote: -----</FONT>  <DIV style="PADDING-LEFT: 5px"> <DIV style="BORDER-LEFT: black 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">To: "eprints-tech@ecs.soton.ac.uk" &lt;eprints-tech@ecs.soton.ac.uk&gt;<BR>From: "Berry, Rob" <ROBERT.BERRY@LIVERPOOL.AC.UK><BR>Sent by: eprints-tech-bounces@ecs.soton.ac.uk<BR>Date: 05/25/2012 07:45PM<BR>Subject: [EP-tech] Re: Connecting to generated MySQL databases &amp; searching by divisions with EPrints API<BR><BR> <DIV><FONT size=2 face="Default Monospace,Courier New,Courier,monospace">Hi Seb,<BR><BR>Tried with the database name, too - it still doesn't work.<BR><BR>Do you know how the Debian repository sets up MySQL? It looks like from the code that EPrints has set itself up with a super user, also, but I have been unable to find the details for this user within the codebase so far. Any hints would be much appreciated.<BR><BR>Best wishes, Rob<BR><BR>________________________________________<BR>From: eprints-tech-bounces@ecs.soton.ac.uk [eprints-tech-bounces@ecs.soton.ac.uk] on behalf of Sebastien Francois [sf2@ecs.soton.ac.uk]<BR>Sent: 25 May 2012 12:04<BR>To: eprints-tech@ecs.soton.ac.uk<BR>Subject: [EP-tech] Re: Connecting to generated MySQL databases &amp; searching by divisions with EPrints API<BR><BR>Hi Rob,<BR><BR>On 25/05/12 11:57, Berry, Rob wrote:<BR><BR>Hey,<BR><BR>Two quick queries:<BR><BR># Connecting to MySQL databases<BR><BR>I've been trying to connect to the one of the MySQL databases generated by EPrints, as created through the Debian repository.<BR><BR>I'm using the details from /archives/&lt;archive_name&gt;/cfg/cfg.d/database.pl. However, MySQL returns the following:<BR><BR>robert@robert-uol:~$ mysql -u test -p<BR>Enter password:<BR>ERROR 1045 (28000): Access denied for user 'test'@'localhost' (using password: YES)<BR><BR><BR>Perhaps try with the database name: mysql -u &lt;username&gt; -p &lt;db_name&gt; ?<BR><BR><BR><BR>Is there something I'm missing? The reason I wanted to actually do this is to check what data is in the database itself, as I was having another problem, detailed below.<BR><BR># Searching by divisions with the EPrints API<BR><BR>I'm writing a script at the moment to move all prints from within one division into another. I have a function that is supposed to look up all prints in a given division (which I am passing as a string): <A href="https://gist.github.com/2787296">https://gist.github.com/2787296</A><BR><BR>However, iterating through all the divisions in the subjects file, this function always returns a result set of zero prints. Is there something I'm doing wrong? Or is this something to do with the test data imported into EPrints 3? (This is why I wanted to have a look at the data on a database level.)<BR><BR><BR><BR>sub prints_for_division {<BR>&nbsp;&nbsp; &nbsp;my ($session, $division) = shift;<BR><BR>Should be<BR><BR>sub prints_for_division {<BR><BR>&nbsp;&nbsp; &nbsp;my ($session, $division) = @_;<BR><BR>Otherwise only $session will get $_[0] and $division will remain "undef". "shift" only returns the first element of an array. Seb.<BR><BR><BR>*** Options: <A href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</A><BR>*** Archive: <A href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</A><BR>*** EPrints community wiki: <A href="http://wiki.eprints.org/">http://wiki.eprints.org/</A><BR></FONT></DIV></DIV></DIV> <DIV></DIV></font>