[56K WARN] Need help starting phpmyadmin (Acces Denied)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
whizzkid-000
Forum Newbie
Posts: 8
Joined: Mon Jul 09, 2007 5:36 pm

[56K WARN] Need help starting phpmyadmin (Acces Denied)

Post by whizzkid-000 »

Hello i would just like to introduce myself. To and to be honest do not have a great knowledge of php or any programing i know a little java but that about it. I want to create a website using drupal and for that i need a working database! thats all very well but it has taken me 6 days to get this far....

I have downloaded php5, apache 2.10.2, mysql, and php my admin everything seems to go fine until i try to load phpmyadmin by pointing my browser to http://localhost/phpmyadmin to start creating tables i get this error :s ........ '#1045 - Access denied for user 'root'@'localhost' (using password: NO)'
Can somebody please help me with this problem as i really want to get on and start creating my website
Many thanks, Corie Deroche
Last edited by whizzkid-000 on Mon Mar 30, 2009 3:15 pm, edited 1 time in total.
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Post by aceconcepts »

Have you connected to any database?

http://uk.php.net/manual/en/function.mysql-connect.php
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

When you installed mysql did you also create an user account ? (If I remember correctly the installer offers that option).
And did you follow the documentation about installing and configuring phpmyadmin, http://www.phpmyadmin.net/documentation/#setup ?
whizzkid-000
Forum Newbie
Posts: 8
Joined: Mon Jul 09, 2007 5:36 pm

Post by whizzkid-000 »

Hey thanks for the replys.

Erm know i dont actualy have a database set up yet. I thought id create one when i log onto phpmyadmin?

And no i have not used mysql to create a user acount. But i did create one after i had everything installed i used mysql administrator to create a user acount.

I have bee told to delete all installs and just use XAMPP? would that be a lot easier do you recon?
whizzkid-000
Forum Newbie
Posts: 8
Joined: Mon Jul 09, 2007 5:36 pm

Post by whizzkid-000 »

Image i have just installed xampp and i stil get the same problem when going to phpmyadmin. Could it have anything to do with the mysql deafault having no password?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

You have to edit the configuration file to use the username and password you set up with mysqladmin ;)
whizzkid-000
Forum Newbie
Posts: 8
Joined: Mon Jul 09, 2007 5:36 pm

Post by whizzkid-000 »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Code: Select all

$i++;
$cfg['Servers'][$i]['host']          = 'localhost'; // MySQL hostname or IP address
$cfg['Servers'][$i]['port']          = '';          // MySQL port - leave blank for default port
$cfg['Servers'][$i]['socket']        = '';          // Path to the socket - leave blank for default socket
$cfg['Servers'][$i]['connect_type']  = 'tcp';       // How to connect to MySQL server ('tcp' or 'socket')
$cfg['Servers'][$i]['extension']     = 'mysql';     // The php MySQL extension to use ('mysql' or 'mysqli')
$cfg['Servers'][$i]['compress']      = FALSE;       // Use compressed protocol for the MySQL connection
                                                    // (requires PHP >= 4.3.0)
$cfg['Servers'][$i]['controluser']   = 'pma';          // MySQL control user settings
                                                    // (this user must have read-only
$cfg['Servers'][$i]['controlpass']   = '';          // access to the "mysql/user"
                                                    // and "mysql/db" tables).
                                                    // The controluser is also
                                                    // used for all relational
                                                    // features (pmadb)
$cfg['Servers'][$i]['auth_type']     = 'http';      // Authentication method (config, http or cookie based)
$cfg['Servers'][$i]['user']          = 'root';      // MySQL user
$cfg['Servers'][$i]['password']      = '';          // MySQL password (only needed
                                                    // with 'config' auth_type)
$cfg['Servers'][$i]['only_db']       = '';          // If set to a db-name, only
                                                    // this db is displayed in left frame
                                                    // It may also be an array of db-names, where sorting order is relevant.
$cfg['Servers'][$i]['verbose']       = '';          // Verbose name for this host - leave blank to show the hostname

$cfg['Servers'][$i]['pmadb']         = 'phpmyadmin';          // Database used for Relation, Bookmark and PDF Features
                                                    // (see scripts/create_tables.sql)
                                                    //   - leave blank for no support
                                                    //     DEFAULT: 'phpmyadmin'

Is this the part of the code which needs to be changed? where it says 'user' and 'password'? this is from the phpmyadmin config.


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

You said you used mysql administrator. Can you connect to your mysql server with that?
Post Reply