Page 1 of 1
[SOLVED] MySQL - phpMyAdmin config file
Posted: Fri Aug 04, 2006 7:23 am
by maxpax
I am new to this MySQL and phpMyAdmin and I am trying to create the config file so that I can access phpMyAdmin to sort out my database.
The MySQL server is on the same machine as phpMyAdmin and I can't get the graphical set up to work. I created the folder name config but when I click 'add' to add a server nothing happens.
So I have resorted to trying to create the config file myself which for a newb like me is not easy. phpMyAdmin still won't accept the database user name and password, this is my config file:
Code: Select all
<?php
$i=0;
$i++;
$cfg['Servers'][$i]'root';
$cfg['Servers'][$i]'password goes here';
?>
Anyone got any ideas on how to sort this out. Thanks

Posted: Fri Aug 04, 2006 7:59 am
by volka
Did you try the install wizard?
It explained in Documentation.html (comes with the phpmyadmin archive)
phpMyAdmin-2.8.2.1/Documentation.html wrote:Now you must configure your installation. There are two methods that can be used. Traditionally, users have hand-edited a copy of config.inc.php, but now a wizard-style setup script is provided for those who prefer a graphical installation.
Posted: Fri Aug 04, 2006 9:35 am
by maxpax
Yeah it isn't really a wizard. It is a webapge with buttons on that take you to different pages to input things like usernames and passwords. But whenever I click on any of the buttons nothing happens.
Posted: Fri Aug 04, 2006 10:27 am
by RobertGonzalez
Are you just tryig to set up PMA? For the first time? You shouldn't have to do anything more than edit three lines in the config file that is already there.
Posted: Fri Aug 04, 2006 11:17 am
by maxpax
That's what I am doing. I leave everything how it is and just add in my password. But it says access denied.
I take it the root password is the one which you put in when you set up MySQL.
Posted: Fri Aug 04, 2006 11:58 am
by RobertGonzalez
Access denied could be for a number of reasons. The first is that you are logging in as a user that has no permissions. Which user are you using as the logged in user? For my development machine, I set the user to 'root' (the MySQL SuperUser with all rights) and the password to that of my 'root' superuser. You can use any user in the MySQL database, so long as that user has the appropriate permissions to do what needs to be done in the database.
The next, more common issue that leads to this error, is that your MySQL Client API version is older than what is expected by your current version of MySQL. This is most commonly associated with using a MySQL version of 4.1+ but with a MySQL API of 3.23 or lower. You can easily modify the MySQL configuration file (my.conf) to modify the password algorithm used by MySQL. You can search these boards for 'MySQL old-password' and you should get something.
Posted: Fri Aug 04, 2006 2:01 pm
by maxpax
Ok, my Client API Version is 3.23.49, so that is probably the problem. Is there any way to upgrade the client API?
If not the old password thing that you talked about. I found this code while searching the forum, is this the kind of thing I need to execute.
Code: Select all
GRANT ALL PRIVILEGES ON root TO root@localhost IDENTIFIED BY 'your_password';
UPDATE mysql.user SET PASSWORD = OLD_PASSWORD('your_password') WHERE user = 'root';
FLUSH PRIVILEGES;
Am I close, or have I got it tootally wrong. Which is quite possible as I am new to this.
Thanks for the help by the way.

Posted: Fri Aug 04, 2006 2:13 pm
by RobertGonzalez
That is the first step. The second step is editing your my.conf file, in the [mysqld] section and adding in the setting '-old-passwords'. Restart MySQL and you should be golden.
Posted: Fri Aug 04, 2006 3:34 pm
by maxpax
Silly question time!
Where is this file or do you mean the config file that I have created?
Posted: Fri Aug 04, 2006 4:47 pm
by RobertGonzalez
On Windows, it should be in c:\Program Files\MySQL Server {VERSION}\. The name of the file is actually my.ini. Scroll through it for about 40 lines or so (depending on your set up) until you find the line that says:
Somewhere after that add
Posted: Sat Aug 05, 2006 9:19 am
by maxpax
It is still not working for me at the moment. So here is my config.inc.php (with password replaced):
Code: Select all
<?php
$i=0;
$i++;
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'password';
?>
And this is where I have put old_password in the my.ini file:
Code: Select all
# SERVER SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this
# file.
#
[mysqld]
# The TCP/IP Port the MySQL Server will listen on
port=3306
old_passwords
#Path to installation directory. All paths are usually resolved relative to this.
basedir="D:/Program Files/MySQL/MySQL Server 4.1/"
I think I have probably put the old_password code in the wrong place in the file, but being new to this really I have no idea!
Any ideas?
Posted: Sat Aug 05, 2006 11:26 am
by RobertGonzalez
Posted: Sat Aug 05, 2006 12:01 pm
by maxpax
Yes, thanks for the help

. I have got it working now.
