Help - Search - Members - Calendar
Full Version: Trying To Make Phpmyadmin Work
BleepingComputer.com > Internet & Networking > Web Site Development
   
Wendy K. Walker
Hi Everybody,

I'm trying to get phpMyAdmin to work and I'm having a fit. First off the download seems to be missing a crucial file. I Googled till I was all blue in the face and found a sample file that was close to what I needed BUTT when I looked for --> $cfg['PmaAbsoluteUri'] <-- in the file that I found it was no where to be found.

Can I just add that line myself? If I can where do I add it?

Thanks for any help.

Wendy
lucent
Hello Wendy,
It sounds like a variable from the config.inc.php which is located in the phpmyadmin root folder (/var/www/phpmyadmin/ for *nix and I'm not sure where for windows). But there are a few files with the same name if you look in the sub dirs.........
Actually I just had a bit of a scour around and found this:

QUOTE
1. Untar or unzip the distribution (be sure to unzip the subdirectories): tar -xzvf phpMyAdmin_x.x.x.tar.gz in your webserver's document root. If you don't have direct access to your document root, put the files in a directory on your local machine, and, after step 3, transfer the directory on your web server using, for example, ftp.

2. Open the file config.inc.php in your favorite editor and change the values for host, user, password and authentication mode to fit your environment. Here, "host" means the MySQL server. Also insert the correct value for $cfg['PmaAbsoluteUri']. Have a look at Configuration section for an explanation of all values.
Here's what mine look like for local development:
$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname

$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)

$cfg['PmaAbsoluteUri'] = 'http://localhost/phpmyadmin/';

3. It is recommended that you protect the directory in which you installed phpMyAdmin (unless it's on a closed intranet, or you wish to use HTTP or cookie authentication), for example with HTTP-AUTH (in a .htaccess file). See the multi-user sub-section of the FAQ for additional information, especially FAQ 4.4.

4. Open the file <www.your-host.com>/<your-install-dir>/index.php in your browser. phpMyAdmin should now display a welcome screen and your databases, or a login dialog if using HTTP or cookie authentication mode.


The actual page is located at http://www.webmasterworld.com/forum88/4953.htm
The thread is titled Install & Test phpMyAdmin so hopefully it will be of some use. By the way what are you running this on (*nix, windows etc.)?
Hope this helps.
Cheers, Lucent.
Wendy K. Walker
Hi lucent,

OK first off I'm using Windows XP SP2 and I've been told that all of the programs that I'm trying to set up were all meant for use in Linux so nothing seems to work without a lot of effort.

I found this --> $cfg['PmaAbsoluteUri'] = ''; <-- line squirreled away in config.default.php in my phpMyAdmin folder. The install didn't generate a config.inc.php file when I had ran setup so I did the copy/paste/change name thing with the config.sample.php and the $cfg['PmaAbsoluteUri'] line isn't in it.

Now I just noticed something strange about that tile is it supposed to be "config.inc.php" as stated in the documentation or "config.ini.php" ? .inc doesn't right but that's what I used because it was stated that way in the doccumentation.

This is what my config.inc.php file looks like right now;

<?php

/* $Id: config.sample.inc.php 9675 2006-11-03 09:06:06Z nijel $ */
// vim: 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>.
*/

/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = ''; /* 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'] = 'pmausr';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';
/* 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';

/*
* End of servers configuration
*/

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

?>


OK so where would I stick the "$cfg['PmaAbsoluteUri'] = '';" line and what the heck goes between the " '' " marks?

Does anything in the above file jump out at you as something that might be problematic?

Thanks for any help.

Wendy

PS I forgot to say 'Thanks' for that link. I already had it and have been doing a lot of reading there too.
Wendy
lucent
Hello, I have to head off now, well a while ago but i just noticed your reply. I have a sample of a default install on a fresh ubuntu server. I'll be in windows next time i promise smile.gif

QUOTE
$cfg['PmaAbsoluteUri'] = '';


From memory this is the absolute path to your phpmyadmin webroot directory, so point this to where the actual directory is located on the hard drive eg, c:\somefolder\with\the\phpmyadmin\directory\here\
And that is what goes between the quote marks (one each side as in 'C:\blah\blah\')

PmaAbsoluteUri = PhpMyAdminAbsoluteUnifiedRescourceIndicator....... maybe, just off the top of my head though.

Here is the sample:

CODE
<?php
/**
* Debian local configuration file
*
* This file overrides the settings made by phpMyAdmin interactive setup
* utility.
*
* For example configuration see /usr/share/doc/phpmyadmin/examples/config.default.php.gz
*/

/**
* Server(s) configuration
*/
$i = 0;
// The $cfg['Servers'] array starts with $cfg['Servers'][1].  Do not use $cfg['Servers'][0].
// You can disable a server config entry by setting host to ''.
$i++;

// Uncomment to override the default configuration
//$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']  = 'socket';    // 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']   = '';          // 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']     = 'cookie';    // 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'
//$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';// Bookmark table
//                                                    //   - leave blank for no bookmark support
//                                                    //     DEFAULT: 'pma_bookmark'
//$cfg['Servers'][$i]['relation']      = 'pma_relation';// table to describe the relation between links (see doc)
//                                                    //   - leave blank for no relation-links support
//                                                    //     DEFAULT: 'pma_relation'
//$cfg['Servers'][$i]['table_info']    = 'pma_table_info';// table to describe the display fields
//                                                    //   - leave blank for no display fields support
//                                                    //     DEFAULT: 'pma_table_info'
//$cfg['Servers'][$i]['table_coords']  = 'pma_table_coords';// table to describe the tables position for the PDF schema
//                                                    //   - leave blank for no PDF schema support
//                                                    //     DEFAULT: 'pma_table_coords'
//$cfg['Servers'][$i]['pdf_pages']     = 'pma_pdf_pages';// table to describe pages of relationpdf
//                                                    //   - leave blank if you don't want to use this
//                                                    //     DEFAULT: 'pma_pdf_pages'
//$cfg['Servers'][$i]['column_info']   = 'pma_column_info';// table to store column information
//                                                    //   - leave blank for no column comments/mime types
//                                                    //     DEFAULT: 'pma_column_info'
//$cfg['Servers'][$i]['history']       = 'pma_history';// table to store SQL history
//                                                    //   - leave blank for no SQL query history
//                                                    //     DEFAULT: 'pma_history'
//$cfg['Servers'][$i]['verbose_check'] = TRUE;        // set to FALSE if you know that your pma_* tables
//                                                    // are up to date. This prevents compatibility
//                                                    // checks and thereby increases performance.
//$cfg['Servers'][$i]['AllowRoot']     = TRUE;        // whether to allow root login
//$cfg['Servers'][$i]['AllowDeny']['order']           // Host authentication order, leave blank to not use
//                                     = '';
//$cfg['Servers'][$i]['AllowDeny']['rules']           // Host authentication rules, leave blank for defaults
//                                     = array();

?>



This may be no help to you whatsoever, but if you cross reference this one and the one in the previous link you may be able to work something out. Also if you read pma as PhpMyAdmin it might make a bit more sense. Sorry i have to go i'm getting yelled at sad.gif
Cheers, Lucent
Wendy K. Walker
Hi lucent,

*passes extra set of ear plugs* Hope that you didn't get fussed at too much because of me Boo.

I'm pretty sure that you're right about $cfg['PmaAbsoluteUri'] = ''; needing an absolut path there but I found this in the config.default.php

* Your phpMyAdmin URL.
*
* Complete the variable below with the full url ie
* http://www.your_web.net/path_to_your_phpMyAdmin_directory/

So that puts two stumbling blocks in front of me: I don't have a web site. All I have is Apache2 setup on my PC at --> C:\Apache\Apache2\http\phpMyAdmin. I don't see anything named "directory" so where do I get the "directory" part from?

That sample that you posted looks king of like the .default.php that I've been going over too.

I've got to cut this short cause I have to catch someone when they get off of work.

Thanks for your help.

Wendy
lucent
Hello again smile.gif sorry about the wait......big weekend. Okay, so a couple of questions first.
  • 1. Do you have MySQL installed as well? This is needed for phpmyadmin to run and will allow you to create database driven sites. If you haven't you can get it here:
    http://dev.mysql.com/downloads/mysql/5.0.html#downloads
    But please read my second question first and consider WAMP5
  • 2. Are you setting this server just to learn on? If you just want to learn and play around with php and mysql you may be better off having a look at removing apache2 and php and downloading a complete self installing package such as WAMP ( Windows, Apache, MySQL and PHP ). On the other hand if you are creating a production server you will probably not want to go with this option because you will want to tweak config files and patch the individual packages for security flaws. You may also want to make sure you have the most up to date packages as well. If you are just starting out and want to start coding I would highly recommend downloading and installing WAMP for now and when you get used to things you could have a go at installing the individual components then, you can get it here:
    http://www.wampserver.com/en/download.php
    There is a nice video tutorial I just found and you might want to look at it before you download WAMP to see how easy and painless this server installation is, this can be found here:
    http://www.phpvideotutorials.com/lesson01/
QUOTE
* Your phpMyAdmin URL.
*
* Complete the variable below with the full url ie
* http://www.your_web.net/path_to_your_phpMyAdmin_directory/

So that puts two stumbling blocks in front of me: I don't have a web site. All I have is Apache2 setup on my PC at --> C:\Apache\Apache2\http\phpMyAdmin. I don't see anything named "directory" so where do I get the "directory" part from?


The directory path you need to fill in is the one you have stated above.
QUOTE
C:\Apache\Apache2\http\phpMyAdmin\

This is what you want to fill in for the $cfg['PmaAbsoluteUri'] = ''; line. So it should look like this,
CODE
$cfg['PmaAbsoluteUri'] = 'C:\Apache\Apache2\http\phpMyAdmin\';

I'm not sure but you may have to have the slashes (\) reversed so it would look like this:
CODE
$cfg['PmaAbsoluteUri'] = 'C:/Apache/Apache2/http/phpMyAdmin/';

Once again i'm a bit rusty on the Windows side of things.......
As for your website, it should reside in C:\Apache\Apache2\http\ and if you open a browser to point to http://127.0.0.1/ you should see the default install apache webpage smile.gif

I hope this covers your questions properly. Again if you just want to get coding and don't want to deal with all of the configuration details, unistall apache and php then give the WAMP5 option a go.
Cheers, Lucent.
groovicus
Does Apache have a default port that it runs on? I use Tomcat for my web apps, and by default it runs on port 8080. To access it I use: localhost:8080/sample

Have you tried on:
http://localhost/

Not that I know too much about Apache, but I already have several other servers and databases already running on my development system. I have been considering putting Apache on it and PHP, since I've never tinkered with either.
Wendy K. Walker
Hi lucent,

First to answer your second question. I wanted Apache so that I could access the .onion network. If I did it right I have it set so that Apache will only bind to localhost. It's not supposed to be accessible by everybody and their dog that goes out trolling across the Internet and is only supposed to be accessible by someone with the right address for my server like http://6sxoyfb3h2nvok2d.onion. [EDITED] That URL it "IS NOT" a URL that will get you to my server, however, it is a valid URL to an information page that is hiding somewhere out there in cyberspace.

So at first I was just setting Apache up for that but then my curiosity took over tongue.gif when I was doing some reading [Here] to learn how to set Apache up. Then I decided to give it a go so I downloaded, installed and tested PHP to make sure that it was working with Apache. [It was]

Then I downloaded and installed MySQL. Then downloaded and installed phpMyAdmin and that's where I'm at right now. I'm kind of stuck trying to figure out what all should go into the confic.ini.php file to make that thing work right though. I mean according to the documentation phpMyAdmin looks for config.default.ini.php [first] at start-up then for config.ini.php to get its self going. I don't understand 'why' it does that but it does and I have to get the config.ini.php set up so that it overrides the .default thing.

Right now I'm like kind of stuck right outside of the door to phpMyAdmin so to speak because I can't figure out what password its welcome screen is asking for when I enter http://localhost:8080/phpMyAdmin in my browser.

I keep getting --> Error #1045 - Access denied for user 'pmausr'@'localhost' (using password: YES) or Error
#1045 - Access denied for user 'pmausr'@'localhost' (using password: NO) <-- every time I try to use the

Log in
Username:
Password:

boxes. I don't understand how to get past that because I haven't set a username name or password yet. I tried using 'root' and root as usernames but that didn't work so right now I'm at a loss.

As for the URL thing --> $cfg['PmaAbsoluteUri'] = 'C:\Apache\Apache2\http\phpMyAdmin\'; seems to be right because when I tried it with '/' I got a different ERROR message about bad syntax or something to that effect. I think it might be in MySQL and Apache that I have to use the '/' or the '\\'.

Thanks for the info on WAMP5. I had given it a look and it didn't seem like it would be letting anyone get to me through the .onion network so I decided against using it. Besides I'm really trying to learn how this stuff works and how to make it all work together and a precompiled kit-n-a-can kind of defeats that. Maybe I'm just a glutton for punishment. Thanks for that video link too, I'll give it a peep.

Here's some of what my config.ini.php looks like right now. Does anything just jump out at you that might be keeping me from being able to log into phpMyAdmin? Or maybe that needs to have something added between the --> '' <-- to make it work better? I've tried adding a password to blowfish_secret but that didn't work either.

$cfg['PmaAbsoluteUri'] = 'C:\Apache\Apache2\http\phpMyAdmin';
$cfg['PmaNoRelation_DisableWarning'] = FALSE;

/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = ''; /* 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]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['compress'] = FALSE;
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pmausr';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';
/* 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';

/*
* End of servers configuration
*/


Hi groovicus,

Thanks for the reply Boo. Yeah Apache uses port 80 for its default but I set it to 8080 when I set it up. Http://localhost:8080 gets me to my Apache Index page, and that works just fine. If you're planning on tinkering with Apache and PHP you better get a big bottle of Aspirin cause this stuff can sure give you a head ache.


Thanks for any help that you guys might be able to give me with this.

Wendy
lucent
Hello smile.gif
It seems like we are on the right track. Just quickly, sorry but i don't have much time again, Sorry sad.gif, but it looks like you need to change these lines:
CODE
$cfg['Servers'][$i]['controluser'] = 'pmausr';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';

To this:
CODE
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = '';

Then depending on how MySQL has been configured you may have to reset the root password or create one. I'm not too sure how MySQL functions under windows but if it is like *nix environments it will install without a password set. So when you get to the phpmyadmin page on your browser try entering:
QUOTE
Username:root
Password:

Note: Just leave the password field blank and hit enter or click on th "Go" button.
If you still get errors you may have to manually reset the password you can see how to do this here:
http://dev.mysql.com/doc/refman/5.0/en/res...ermissions.html
If all goes well and you don't have to reset the password, please, please make sure you set one once you get in there. Also have a read of this:
http://dev.mysql.com/doc/refman/5.0/en/sec...guidelines.html
The link is also available in the first link I gave you and is quite brief but touches on a couple of things you should be aware of.
I hope you finally have success.
Cheers, Lucent.

Oh, Groovicus thanks for checking in on this post smile.gif Is there anything else that you can think of. Sadly I'm realising how badly my Windows programming has lapsed.....
groovicus
Nope. You already caught that Wendy was getting a MySql error. On Windows, it should have prompted to put in a user name and password for top level access. When you install on Linux, it uses the 'user' password.

Would I be correct to assume that PHP needs to have a database set up for it, or does the install take care of that.
lucent
Groovicus, I have always thought that because PHP by itself is not dependant on MySQL it doesn't need to to have access to a database to run. My thinking is that while the language itself is capable of making calls to databases it doesn't rely on them to function but rather relies on hard coded or on the fly variables that are written in scripts or entered into forms (still hard coded i guess, just not defined?). PhpMyAdmin on the other hand ships with it's own set of SQL scripts to create and populate it's own database and tables as well as granting default root privileges. These are run on installation. That being said, I don't know what would happen if you installed everything out of "order" or if it's even possible to do so. I guess you would be able to but you would have to do a fair bit of config file hacking to get it right and probably would have to run the SQL scripts yourself to create a working database for PhpMyAdmin to function correctly. It would be interesting to try though.....
Thanks again for your input, it is always (very much) appreciated.
Cheers, Lucent.
groovicus
Ok, so my thinking on the issue (given that I know nothing of PHP, but am very well versed in mysql) is that mysql will not allow access except to those who have been granted the necessary permissions. IMHO, it would be a huge security issue if an installed application (like PHPAdmin, or whatever) could issue itself admin permissions. I may tinker with this next week since it is something I have been wanting to do for awhile anyway.. this gives me a perfect excuse.

<me shudders>
I just remember Apache being a bear to get to work properly with Tomcat..on Linux it is a breeze (relatively speaking). On Windows it just sucks.

Sorry Wendy, didn't mean to hijack your thread. tongue.gif
Wendy K. Walker
Hi lucent,

Thanks for the reply. OK I changed these as you suggested --> $cfg['Servers'][$i]['controluser'] = 'pmausr';
$cfg['Servers'][$i]['controlpass'] = 'pmapass'; and succeded in getting a different ERROR message;

--> Error The configuration file now needs a secret passphrase (blowfish_secret). <-- So I added one and tried it again and got this -->

Log in
Username: root
Password:

So I entered the new password and got this --> Error #2003 - The server is not responding so I restarted Apache made sure that the MySQL Server was running then tried again and got this --> Error
#1045 - Access denied for user 'root'@'localhost' (using password: NO) <-- I had used the password that I had set for 'blowfish_secret' then tried it with no password, then tried it with several different passwords that I've used during previous installs of MySQL but all I keep getting is the same ERROR message.

Thanks for that link to the MySQL reference manual. I've been reading in it for several days and have already tried just about everything there and the best I can get from it is;

C:\>C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt --init-file=C:\mysql-init.txt
'C:\Program' is not recognized as an internal or external command,
operable program or batch file. <-- or some similar message depending on what I had tried to do.

Actually the only thing that I've found in that manual that works in a command console window is the commands --> NET START MySQL, NET STOP MySQL. Other than those two commands I haven't found any commands in that manual that will work as set forth.

This is killing me here! There is yet one other possible answer to my dilemma but I don't know the name of the file to look for or even exactly where to look for it.

On one of the re-installs that I did with MySQL I saw a notice saying that if I had uninstalled a previous installation of MySQL that the uninstall program DOES NOT automatically remove the old password and that I will need to edit a file in the Windows Directory manually, however, the named file was no where to be found in the Windows directory so I'm stumped.



Hi groovicus,

Hey Boo, Hi-Jack all you want cause I need all the help I can get here. I installed Apache > tested it > it worked right > then I installed PHP > tested it > it worked right > then I installed MySQL I didn't see anywhere to enter a username but there was a place to enter a 'root' password which I did > no test was called for so I don't know if it works > then I installed phpMyAdmin > when I try to test it I can't get past the the sign in screen!

I've uninstalled and reinstalled all of those programs several times over in an attempt to over come this problem but haven't gotten anywhere with it past being able to get Apache up and running and PHP doing whatever it is that it does with Apache.

Thanks for anything that you might want to toss into the mix that might help.

Wendy
lucent
G'day again smile.gif, This is again a good thing... What we need to do now is put a value in this section:
CODE
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

So make it look like this:
CODE
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = 'holla'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

This should solve your "The configuration file now needs a secret passphrase (blowfish_secret)." error. Next up, if things are still failling to work.
I'm going to paste in the instructions from http://dev.mysql.com/doc/refman/5.0/en/res...ermissions.html
for easy reference for you.

QUOTE
1. Log on to your system as Administrator.

2. Stop the MySQL server if it is running. For a server that is running as a Windows service, go to the Services manager:

Start Menu -> Control Panel -> Administrative Tools -> Services

Then find the MySQL service in the list, and stop it.

If your server is not running as a service, you may need to use the Task Manager to force it to stop.

3. Create a text file and place the following command within it on a single line:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPassword');
Save the file with any name. For this example the file will be C:\mysql-init.txt.

4. Open a console window to get to the DOS command prompt:
Start Menu -> Run -> cmd

5. We are assuming that you installed MySQL to C:\mysql. If you installed MySQL to another location, adjust the following commands accordingly.

At the DOS command prompt, execute this command:

C:\> C:\mysql\bin\mysqld-nt --init-file=C:\mysql-init.txt

The contents of the file named by the --init-file option are executed at server startup, changing the root password. After the server has started successfully, you should delete C:\mysql-init.txt.

If you install MySQL using the MySQL Installation Wizard, you may need to specify a --defaults-file option:

C:\> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt.exe"
--defaults-file="C:\Program Files\MySQL\MySQL Server 5.0\my.ini"
--init-file=C:\mysql-init.txt

The appropriate --defaults-file setting can be found using the Services Manager:

Start Menu -> Control Panel -> Administrative Tools -> Services

Find the MySQL service in the list, right-click on it, and choose the Properties option. The Path to executable field contains the --defaults-file setting.

6. Stop the MySQL server, then restart it in normal mode again. If you run the server as a service, start it from the Windows Services window. If you start the server manually, use whatever command you normally use.

7. You should be able to connect using the new password.


Okay, you need to find out first where you have mysql installed, well you need to know that and the install path. So if you don't know where it it do a search for it and take note of it's location. If the location address is the same as the one you listed in your last post,
QUOTE
C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt

Type the same thing in again but notice the quotation marks in the help reference? You will need to include these or you will have to shorten program files to something like progra~1 and MySQL Server 5.0 to something else entirely. This is because terminals usually see spaces as a seperate command line argument and will try to execute or do something with the next lot of letters thrown at it. If your location is different, just substitute your application (mysql) path here. The command you need to enter should look like this:
QUOTE
C:\> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt.exe"
--defaults-file="C:\Program Files\MySQL\MySQL Server 5.0\my.ini"
--init-file=C:\mysql-init.txt

Once again make sure you use the quotation marks(" "). Actually you should be able to copy and paste the whole command into the terminal ( minus the leading C:\>, just start with the first set of quotations ), just make sure you created the mysql-init.txt file ( or whatever you decided to call it ) at the same location. If you decided to name the file something else and put it somewhere else you will have to substute the name and/or location.
You are doing well as not to having given up, this shows a lot of promise and dedication and with that type of perseverence you are bound to be learning, Errors are bound to happen and guarentee you will have a deeper understanding of how these things work (and don't sad.gif ) Keep trying and keep posting we honestly don't mind, that is why we are here smile.gif
And Groovicus, I should have said that php has the ability to embed mysql scripts rather than make direct calls to databases. Also only root can install phpmyadmin on *nix systems but that does lead to an interesting point about windows systems as most users on XP systems will run as admin. I'm wondering if a phpmyadmin app was set up without a root password set ( if this can in fact actually happen ) could another user log on (with admin status) later and reset the root password using the above techniques? Just thought you might like to give it a try if you plan on giving it go on Windows smile.gif
Cheers, Lucent.
Wendy K. Walker
Hi lucent, G'day yourself mate. What part of the Queen's land are you in Boo?

As for those first two pieces of code, I've tried putting a password in this -->
$cfg['blowfish_secret'] = 'secretword'; and it doesn't have any effect other than stopping the error message saying that I needed to put a password there and it doesn't matter whether I use a password when trying to log on or not this is the message that I get both ways;

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

I have also followed all of those steps from 1 to 5 where I get the following -->

C:\>"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt.exe"--defaults-file="
C:\Program Files\MySQL\MySQL Server 5.0\my.ini"--init-file=C:\mysql-init.txt
'"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt.exe"--defaults-file' is
not recognized as an internal or external command,
operable program or batch file.

C:\>


That's what I meant when I said that NOTHING wants to work like it's supposed to work. I've been using that reference manual for several days with no success. The only thing that works like the manual says is these two commands --> NET START MySQL and NET STOP MySQL <-- those WILL start and stop the MySQL server.

There's supposed to be a file lurking about some where in the Windows directory that I might have to edit manually to remove the old password from previously installed versions of MySQL but I have no idea what the name of the file is. I was told to look for that password in my.cnf but my little search dog says that that file isn't on my PC so I'm kind of a loss sad.gif .

I guess I'll give uninstalling MySQL and phpMyAdmin and try reinstalling them a go [yet again] and see if I might be missing something.

If you can think of anything else let me know. Thanks again for your help.

Wendy
Walkman
What you need to do is:

no#1. Make sure you have Administration rights to the computer.. I assume you do.
no#2. You need to have a password set for your computer. If not.. your problems will begin when trying to setup/run those services.
no#3. You need to make sure your server is up and running before trying to install any other services, including phpmyadmin.
no#4. There is a Unix version and a Windows version. If you have the Windows version, it'll work. If you have the Unix version, it won't work, since you're on Windows.
no#5. When installing your Apache, you need not modify anything to get it to work. Allow it to install with the default information. You can always change it later, after it's up and running.

You need to test your server by going to either of the 2 addresses below:
http://localhost
http://127.0.0.1
.. as a matter of fact,, clicking on any of the 2 links should bring up your Apache default page.

If you can't get to your Apache default page using either of the 2 addresses above, then your server isn't setup correctly, and your server won't work, but your database would.

If you do get the Apache default page once you've set it up, but still having problems installing the phpmyadmin, then chances are that you don't have your PHP configured correctly, and (or) you don't have your php.ini file in it's correct location and configured correctly.

Tools I suggest you get, because you're going to need them anyway, plus they will help you with your servers and the configurations....

MySQL Administrator <------------------(you should have)
MySQL System Tray Monitor <----------(you should have)
MyODBC <--------------------------------(you should have)
MySQL Query Browser <-----------------(useful for working with MySQL queries and databases)
MySQL Migration Toolkit <---------------(useful for converting databases into MySQL format)

You can get all of the above at:
http://mysql.org/


but....... if you want to use a tool, in my opinion that is much better and easier to use than phpmyadmin, then you will want to download this FREE tool:

DBManager Freeware/Standard Edition
http://www.dbtools.com.br/

The program will install, and all you have to do is run it. There is nothing to configure, except the database name, username, password. You can run this AND phpmyadmin at the same time. But this one is easier, and more straight forward. phpmyadmin requires you to configure it in order for it to work, plus phpmyadmin is browser based, whereas this one is a GUI.. no browser needed. I've been using it for 3 years now, and I use it more than phpmyadmin.

Once you install it, and if you still can't connect to your database, then you have not setup your server correctly.

Also.... make sure you have your listening port set to port 80 in your Apache httpd.conf file. Using the MySQL Administrator, your port should be set to port 3306 on localhost

Keep in mind:.. the initial thing is to get everything working as they should... at first.. but you can always make the changes later on, and phpmyadmin doesn't seem to be what the problem is.

I may be missing something, but the above is very important to setting up your server, and getting it ready to use along with Privoxy, Vadalia, Tor services.
Wendy K. Walker
Hi Walkman, Thanks for the reply.

#1 [check] I do, #2 [check] it does, #3 [check] it is, #4 [check] that's a no brainer [unless you're blond], #5 [check] that's what I did.

Getting Apache up and running wasn't problem. I let it set its self up like it wanted to but put it at C:\Apache as opposed to its chosen default of C:\Program Files then went through the httpd.conf file and made a few changes.

When I got happy with the changes that I'd made I did the testing thing that you mentioned it it had worked so I was pretty sure that Apache was working right.

That was all I had actually wanted to do but then while I was running around on the www trying to learn something about Apache I ran into a couple of different articles that mentioned using PHP, MySQL and phpMyAdmin in connection with Apache.

So I followed some instructions and installed PHP and tested it with Apache. I guess the test was successful because I got a mile long page of facts about PHP just like the instructions had said I would.

That said; I have got to say that I haven't got the slightest idea what PHP is supposed to do with Apache [but I'm trying to learn].

OK so those two things had seemed to be working right together so I went the next step and installed the MySQL Server. There wasn't any type of test laid out for MySQL so I took the next step and installed phpMyAdmin and that's where my troubles started.

I have uninstalled MySQL, deleted phpMyAdmin and defragged my hard drive [since I started this thread] and reinstalled MySQL in an attempt to isolate my problem.

When I reinstalled MySQL this time I didn't put in a root password and now I am able to access the MySQL Server and I've been able to get a couple of the commands listed in the reference manual to work so I'm thinking I did something right this time. Now I've got to figure out how to get into MySQL and put in a user name and set a root password.

Thanks for the list of tool and the link to get to them. I'll be checking them out later but right now I want to get that password thing done and make sure that the MySQL Server is working right before I install phpMyAdmin again or do anything else.

Why do you say --> make sure you have your listening port set to port 80 <--

I have got to agree with this too --> Keep in mind:.. the initial thing is to get everything working as they should... at first.. but you can always make the changes later on, and phpmyadmin doesn't seem to be what the problem is. <-- That's why I backed up a couple of steps here and am testing MySQL to be sure that it works and that I have a username and password in it that I can actually use.

I'm now fairly sure that the bulk of my misery has been coming from MySQL and not from phpMyAdmin.

Thanks for your time and help on this.

Wendy
lucent
Hello Wendy, Sorry i haven't been about lately (satellite problems sad.gif) did you manage to get this problem resolved? Hopefully you did, but if you didn't let me know and we can continue. Oh and by the way I'm in South Australia smile.gif My humble apologies again..
Cheers, Lucent.
Walkman
I'm still here too if you need further assistance.

[Added info]
You may already know this by now, but since MySQL is a database server, and phpMyadmin is a database manipulator, you must have MySQL up and running 1st, because phpMyadmin needs to access the MySQL server in order to do anything. That's why I said I believed the phpMyadmin wasn't the problem.
Wendy K. Walker
Hi lucent,

Thanks for the reply. Glad to hear that you are traveling down under, hope all is well there. No I haven't gotten any farther than I had been. I've had other things keeping me busy and I haven't had time to do any more studying on the matter so I just pushed it aside for now. I'll get back to it in the future though. Thanks for checking in.

Hi walkman,

Thanks for the offer of help. When I get back to it I'll let you guys know. Hey whats with you being in the Banned group?

♥ Wendy
gray_ie
Hi All,

Have to say that i am in the middle of getting MyPHPAdmin to work.

This maybe a bit late for Wendy but just thought i would share what knowledge i have learnt from trying to implement this myself.

If and only if you need to reinstall MYSQL i found the following sequence to work:
  • remove the instance running using "MySQL Server Instance Configuration Wizard 1.0.8".
  • then remove MySQL from the control panel (add/remove s/w)
  • then VERY VERY carefully remove all instances of its existence on your "c" drive and from the Registry using regedit. (AGAIN I REPEAT very careful to remove things which are only related to the installation)
  • i also removed any dlls which i had copied into windows directory (again be careful).

Then i rebooted my system and reinstalled MYSQL and asked for a "new" root password for the database.

I am still struggling with the same error:

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

and trying to configure config.inc.php file.

Things i am confused about are:
  • how to set MyPHPAdmin to ask me for the root password (but i think from the discussion posts i can work it out)
  • what this blowfish and cookie password is all about
  • creating and naming the database, as i dont think there is a default one created (but going to work on getting passed access denied first!)

other than that, I have to say thee discussion on this board about the subject has been excellent.

Even though i can feel the frustration at not getting things to work as they seem to be documented.

Gray

Wendy K. Walker
Hi gray_ie, Thanks for the reply.

I hope that you have had more success with all of that than I have. I finally gave up and uninstalled\deleted everything. I'll give it another go in a few month, maybe it'll work for me then.

Wendy
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.