Page 1 of 1

mysql client doesn't see mysql database

PostPosted: 11. September 2011 09:29
by pittore44
after recent xampp installation and configuration, mysqladmin shows the msql database and its tables but when I switch to the mysql client (I use cmd in the RUN pop up to bring up the command window). I change to the c:\xampp\mysql\bin directory and enter mysql to get the mysql> (the prompt) but when I type show databases; the mysql database doesn't appear and when I type use mysql I get a 1044 error, access denied.

Why should these two interfaces to the same mysql product give such different results?

I also have the same problem regarding updating root password for mysql database using mysqladmin. If I leave user as default (root) but change the password, then CD collection stops working, unless I change the password back to empty string.

There seems to be a serious disconnect between different elements of the overall software configuration.

Re: mysql client doesn't see mysql database

PostPosted: 11. September 2011 14:01
by Altrea
If you want to use the mysql cli, you have to log in with /u /p parameter for user and password.

If you change the password for root user, change that user in the webpallications too.

Re: mysql client doesn't see mysql database

PostPosted: 11. September 2011 17:14
by pittore44
that worked, thanks!

I logged into mysql using mysql -u root -p

It prompted me for the password and I just hit enter to use the idea that there is no password for root

When I type in show databases; it now shows the mysql database

I am wondering if I should fix the security gap by changing the password from nothing to something?

If I do that, is there a way to make the CD Collections example still work? I am concerned about this, because I want to study the code for this example, because it is close to something I want to attempt.

Re: mysql client doesn't see mysql database

PostPosted: 11. September 2011 21:32
by Altrea
pittore44 wrote:I am wondering if I should fix the security gap by changing the password from nothing to something?

It is no security gap, if you use XAMPP for what it is produced: A local development environment with no connection to the internet or big networks.

pittore44 wrote:If I do that, is there a way to make the CD Collections example still work? I am concerned about this, because I want to study the code for this example, because it is close to something I want to attempt.

Sure, there is always a way.
The sourcecode for that example is in your \xampp\htdocs\xampp\cds.php file.
The place where to put the password is in lines 4 and 64 where the mysql connection is established.