Cable Forum

Cable Forum (https://www.cableforum.uk/board/index.php)
-   General IT Discussion (https://www.cableforum.uk/board/forumdisplay.php?f=19)
-   -   any PHP,Phpmyadmin and mysql experts here? (https://www.cableforum.uk/board/showthread.php?t=33645609)

funkyCable 10-02-2009 19:33

any PHP,Phpmyadmin and mysql experts here?
 
Hi,

I'm used to using ORACLE and just trying out MYSQL, PHP and phpmyadmin.

I went for one of the all-in-one options wamp1.7.4.
I can access mysql and my database if I use the mysql console.

I'm now trying to configure phpmyadmin to use mysql but getting error messages.

I open http://localhost/phpmyadmin/scripts/setupphp and enter in mysql root username and password and then create the config file. I then place the config file into the root directory. I then open http://localhost/phpmyadmin/index.php.

I then get the following error message

Mysql says:
#1045 - Access denied for user 'root'@'localhost' (using password: NO)

I'm using win xp with sp2.

Hopefully someone can help me.

Many Thanks.

Kymmy 10-02-2009 19:46

Re: any PHP,Phpmyadmin and mysql experts here?
 
The MYSQL password is different than the Root password.. Which method are you using for phpmyadmin's authentication..as the latest ones have lots...

AbyssUnderground 10-02-2009 19:50

Re: any PHP,Phpmyadmin and mysql experts here?
 
Have a look at www.abyssunderground.co.uk for some tutorials (if on Windows). It may not be for your web server but the installation is the same.

funkyCable 10-02-2009 20:31

Re: any PHP,Phpmyadmin and mysql experts here?
 
Quote:

Originally Posted by Kymmy (Post 34731266)
The MYSQL password is different than the Root password.. Which method are you using for phpmyadmin's authentication..as the latest ones have lots...

Hi Kymmy

I'm using "Config" as the Authentication type


I'm using phpmyadmin 2.11.2.1

punky 10-02-2009 20:34

Re: any PHP,Phpmyadmin and mysql experts here?
 
Quote:

Mysql says:
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
You aren't specifying the password. You need to put it in the command with the -p switch. (I know that because of the "using password: no" bit)

Like this:

>mysql -u root -p

And then it will prompt you for the password.

funkyCable 10-02-2009 20:36

Re: any PHP,Phpmyadmin and mysql experts here?
 
The only thing I typed after I clicked Add server was the password. I then clicked Add and the nsave to create the config file.

punky 10-02-2009 20:37

Re: any PHP,Phpmyadmin and mysql experts here?
 
Try logging out and logging back in with the command I put in above.

funkyCable 10-02-2009 20:40

Re: any PHP,Phpmyadmin and mysql experts here?
 
Quote:

Originally Posted by punky (Post 34731317)
You aren't specifying the password. You need to put it in the command with the -p switch. (I know that because of the "using password: no" bit)

Like this:

>mysql -u root -p

And then it will prompt you for the password.

I figured that it was not using a password. I don't understand as I have placed the password when setting up the server in phpmyadmin

---------- Post added at 19:40 ---------- Previous post was at 19:37 ----------

Quote:

Originally Posted by punky (Post 34731321)
Try logging out and logging back in with the command I put in above.

Could you explain. sorry I am a newbie at this. Only ever used ORACLE products.

can I run that from cmd.exe?

AbyssUnderground 10-02-2009 20:42

Re: any PHP,Phpmyadmin and mysql experts here?
 
Avoid using config as your auth type, its insecure. All it takes is someone to know your phpmyadmin URL and they have access to your database. Use cookie authentication as that way you have to enter the password each time you access the it.

punky 10-02-2009 20:43

Re: any PHP,Phpmyadmin and mysql experts here?
 
It depends on what you are trying to do and where you are trying to do it. I don't know exactly where you are in the installation.

If you type this into the DOS window.

mysql -u root -p

It will prompt you for the MySQL root password and then log you in to the MySQL console (which is just like the Oracle one AFAICR)

Kymmy 10-02-2009 20:43

Re: any PHP,Phpmyadmin and mysql experts here?
 
Quote:

Originally Posted by AbyssUnderground (Post 34731326)
Avoid using config as your auth type, its insecure. All it takes is someone to know your phpmyadmin URL and they have access to your database. Use cookie authentication as that way you have to enter the password each time you access the it.

That's what I use "cookie auth"

Post your config.inc.php (obviously editing out your username/password and blowfish if you have one set)

punky 10-02-2009 20:47

Re: any PHP,Phpmyadmin and mysql experts here?
 
Edit: Just re-reading your first post, you're getting it through the browser. You must have missed a step where you needed to put your password somewhere.

funkyCable 10-02-2009 20:48

Re: any PHP,Phpmyadmin and mysql experts here?
 
I Abyss I changed it to Cookie but I'm still getting the same message.

when I clicked on Add after input the password and before clicking save I got the following meesages at the top:
You didn't set phpMyAdmin database, so you can not use all phpMyAdmin features.
New server added
Blowfish secret generated
You did not have configured blowfish secret and you want to use cookie authentication so I generated blowfish secret for you. It is used to encrypt cookies.

Kymmy 10-02-2009 20:52

Re: any PHP,Phpmyadmin and mysql experts here?
 
Your config file for cookie auth should look like this (obviously I've editted out my password/username/blowfish

Code:

<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * phpMyAdmin sample configuration, you can use it as base for
 * manual configuration. For easier setup you can use scripts/setup.php
 *
 * All directives are explained in Documentation.html and on phpMyAdmin
 * wiki <http://wiki.cihar.com>.
 *
 * @version $Id: config.sample.inc.php 10142 2007-03-20 10:32:13Z cybot_tm $
 */

/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = 'XXXXXXXXXXXXXXXXXXXXXX'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

/*
 * Servers configuration
 */
$i = 0;

/*
 * First server
 */
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
/* User for advanced features */
// $cfg['Servers'][$i]['controluser'] = 'XXXXXXXX';
// $cfg['Servers'][$i]['controlpass'] = 'XXXXXXXX';
/* Advanced phpMyAdmin features */
// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
// $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
// $cfg['Servers'][$i]['relation'] = 'pma_relation';
// $cfg['Servers'][$i]['table_info'] = 'pma_table_info';
// $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
// $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
// $cfg['Servers'][$i]['column_info'] = 'pma_column_info';
// $cfg['Servers'][$i]['history'] = 'pma_history';
// $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';

/*
 * End of servers configuration
 */

/*
 * Directories for saving/loading files from server
 */
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

?>


funkyCable 10-02-2009 22:19

Re: any PHP,Phpmyadmin and mysql experts here?
 
Quote:

Originally Posted by punky (Post 34731328)
It depends on what you are trying to do and where you are trying to do it. I don't know exactly where you are in the installation.

If you type this into the DOS window.

mysql -u root -p

It will prompt you for the MySQL root password and then log you in to the MySQL console (which is just like the Oracle one AFAICR)

I types that in DOS but it did not reconginse the mysql command. I was not in wamp directory though does that make a difference?

I have logged into mysql and created a database and table. I also ran some insert,select,update statements from the mysql console which is an opion on the wamp menu.

---------- Post added at 19:55 ---------- Previous post was at 19:53 ----------

this is my config file I edited the blowfish part.
Code:

<?php
/*
 * Generated configuration file
 * Generated by: phpMyAdmin 2.11.2.1 setup script by Michal Čihař <michal@cihar.com>
 * Version: $Id: setup.php 10748 2007-10-10 07:30:59Z cybot_tm $
 * Date: Tue, 10 Feb 2009 19:44:55 GMT
 */
/* Servers configuration */
$i = 0;
/* Server localhost (cookie) [1] */
$i++;
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* End of servers configuration */
$cfg['blowfish_secret'] = '##############';
?>

---------- Post added at 21:19 ---------- Previous post was at 19:55 ----------

I followed Abysses How-to

http://www.abyssunderground.co.uk/in...phpmyadmin.php

and change the config as described in the walk through but it still not working.

I copied and the default config file in the Libraries folder to the /phpadmin/ folder as per the How-To. I then changed the following lines

Code:

$cfg['PmaAbsoluteUri'] = 'http://localhost/phpmyadmin/';
 
$cfg['blowfish_secret'] = 'XXXXXXX';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'XXXXXX';

I'm still getting the same error message


All times are GMT +1. The time now is 12:06.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum