Jump to content

Archived

This topic is now archived and is closed to further replies.

msaz87

Trying to install phpMyAdmin 2.8.2 .. but not working

Recommended Posts

Hey,

I'm setting up a server... and installed Apache 2.2, PHP5 and mySQL 5.0. I know the Apache and PHP parts i got right... by the mySQL portion is where i'm running into trouble.

I tried to install phpMyAdmin 2.8.2.. but i can't seem to connect to mySQL when i get to the step where i run http://localhost/phpMyAdmin-2.8.2/index.php

The error reads as follows:
[quote]phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in config.inc.php and make sure that they correspond to the information given by the administrator of the MySQL server.
Error

MySQL said: Documentation
#1045 - Access denied for user 'root'@'localhost' (using password: NO) [/quote]

It also displays a large amount of php code above that message. I tried to configure config.inc.php .. but obviously did it wrong.

I was editing this portion of the code:

[code]show_config_form(array(
            array('Server hostname', '----', 'Hostname where MySQL server is running'),
            array('Server port', '3306', 'Port on which MySQL server is listening, leave empty if don\'t know'),
            array('Server socket', 'socket', 'Socket on which MySQL server is listening, leave empty if don\'t know'),
            array('Connection type', 'tcp', 'How to connect to server, keep tcp if don\'t know', array('tcp', 'socket')),
            array('PHP extension to use', 'mysql', 'What PHP extension to use, use mysqli if supported', array('mysql', 'mysqli')),
            array('Compress connection', 'compress', 'Whether to compress connection to MySQL server', FALSE),
            array('Authentication type', 'config', 'Authentication method to use', array('cookie', 'http', 'config')),
            array('User for config auth', 'root', 'Leave empty if not using config auth'),
            array('Password for config auth', '----', 'Leave empty if not using config auth', 'rosebud'),
            array('Only database to show', 'only_db', 'Limit listing of databases in left frame to this one'),
            array('Verbose name of this server', 'verbose', 'Name to display in server selection'),
            array('phpMyAdmin control user', 'controluser', 'User which phpMyAdmin can use for various actions'),
            array('phpMyAdmin control user password', 'controlpass', 'Password for user which phpMyAdmin can use for various actions', 'password'),
            array('phpMyAdmin database for advanced features', 'pmadb', 'phpMyAdmin will allow much more when you enable this. Table names are filled in automatically.'),
            ),
            'Configure server',
            ($number === FALSE) ? 'Enter new server connection parameters.' : 'Editing server ' . get_server_name($defaults, $number),
            $defaults, $number === FALSE ? 'Add' : '', 'Servers_');[/code]

(the dashed lines were filled in with my server info/user info

Does anyone have any ideas of what i'm doing wrong?

I'm fairly positive mySQL is fine.. because i was able to create a database in there and all that... i just haven't had any success connecting to it (i also tried to install a php search called Sphider).

Share this post


Link to post
Share on other sites
This line needs changed
[code]array('Server hostname', '----', 'Hostname where MySQL server is running'),[/code]
to
[code]array('Server hostname', 'localhost', 'Hostname where MySQL server is running'),[/code]
unless you have changed the root password then
[code]array('Password for config auth', '----', 'Leave empty if not using config auth', 'rosebud'),[/code]
needs to be
[code]array('Password for config auth', '', 'Leave empty if not using config auth', 'rosebud'),[/code]

Share this post


Link to post
Share on other sites
You appear to be editing the wrong file! The file you want to edit is called [b]config.defualt.php[/b]. You'll find this file within the [b]libraries[/b] folder. You'll want to copy this file, dont move but copy it, to the root of the phpMyAdmin folder. Now rename this file to [b]config.inc.php[/b]
Open this file within your PHP editor or any text editor, suhc as wordpad.

The lines you'll want to change are lines 71, 72, and 73 within config.inc.php. In order to configure phpMyAdmin. Lines 71, 72 and 73 is the following code:
[code=php:0]$cfg['Servers'][$i]['auth_type']    = 'config';    // 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)][/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.