When installing phpMyAdmin to manage your MySQL database there are a couple of things you need to completed. You may receive some of the following errors if you do not complete all of the necessary prerequisites but all are easy to resolve.

The first error you will probably run into is the below error.

ERROR: The configuration file now needs a secret passphrase (blowfish_secret)

This can be resolved by copying the sample configuration file to the correct name and making a small modification to it. From the phpMyAdmin directory do the following.

Copy Samlple Configuration File To Real Configuration File:

cp -p config.sample.inc.php config.inc.php

You will then need to edit the file with your favorite editor (mine being vi) and add a blowfish_secret phrase to line 16 like the below example. Use our online blowfish_secret variable generator located here. Our online generator will randomly output between 36 and 46 characters that include lowercase letters, uppercase letters, numbers, and symbols. Just refresh the page if you don’t like the initial output of the random character generator.

Update Blowfish Secret In PHPMyAdmin Configuration File: Line 16

/* 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 .
*
* @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'] = 'BLOWFISH PASSWORD HERE'; /* 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'] = 'pma';
// $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';
// $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';

/*
* End of servers configuration
*/

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

?>

After you do this visit your-url/phpadmin-directory where if you don’t have mcrypt and mbstrong installed you will see two more errors. There are easy to resolve by following the directions below.

ERROR: Cannot load mcrypt extension. Please check your PHP configuration.
This is easily resolved by installing php-mcrypt using the bellow command on CentOS.

Install php-mcrypt Using Yum On CentOS Linux:

yum install php-mcrypt

ERROR: The mbstring PHP extension was not found and you seem to be using a multibyte charset. Without the mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results.
This error may not be seen until logging into phpMyAdmin but is also easily resolved by installing mbstring using the below command.

Install php-mbstring Using Yum On CentOS Linux:

yum install php-mbstring

For more information on phpMyAdmin check out the books below.


List Price: $34.99 USD
New From: $26.50 USD In Stock
Used from: $4.00 USD In Stock


List Price: $34.99 USD
New From: $5.95 USD In Stock
Used from: $4.05 USD In Stock

DeliciousStumbleUponDiggTwitterFacebookRedditLinkedInEmail
Tags: , , , , , , , , , , ,
28 Responses to “The Configuration File Now Needs A Secret Passphrase (blowfish_secret)”
  1. Todd says:

    thanks. this fixed my problem

    [Reply]

  2. alex says:

    Hello Todd. No problem. Glad we could help!

    [Reply]

  3. Sean says:

    Ah, succinct and correct! Thanks very much for publishing this one.

    [Reply]

    alex Reply:

    Hello Sean,

    No problem man. Glad it helped.

    [Reply]

  4. Jitender Tyagi says:

    Thanks a lot. This solution fix my problem also.

    [Reply]

    alex Reply:

    Great. Thanks for the feedback.

    [Reply]

  5. Elena Anaya Torruco says:

    Hi, i ‘m new in this stuff, about the server’s configuration, i follow your instruccions and everything works allright.
    Thanks.

    [Reply]

    alex Reply:

    Good to hear. We appreciate you leaving the feedback.

    [Reply]

  6. sameer says:

    Thanks a lot. this help me lot

    [Reply]

    alex Reply:

    Good to hear. Thank you for leaving feedback to let us know the article helped you.

    [Reply]

  7. yiannis says:

    i did everything but it still says that it needs a blowfish secret …

    it also says that i have no database rights even tho i believe i have all mysql access and cant fix that ..

    i m stuck , plz help !

    [Reply]

    alex Reply:

    Hello yiannis,

    Could you post the exact error regarding database rights? I would say that is probably where the initial problem is.

    Thanks.
    alex

    [Reply]

  8. yiannis says:

    below is the line i have now and it still dont work

    $cfg['blowfish_secret'] = ‘{^QP+-(3mlHy+Gd~FE3mN{gIATs^1lX+T=KVYv{ubK*U0V’; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

    [Reply]

    alex Reply:

    Hello yiannis,

    What is the error regarding database rights? If you have an error regarding the database it should be fixed regardless before proceeding with anything else.

    Thanks.
    alex

    [Reply]

  9. yiannis says:

    Create new database:
    No Privileges

    The additional features for working with linked tables have been deactivated. To find out why click here.
    The configuration file now needs a secret passphrase (blowfish_secret).

    #####################################################

    $cfg['Servers'][$i]['pmadb'] … not OK [ Documentation ]
    $cfg['Servers'][$i]['relation'] … not OK [ Documentation ]
    General relation features: Disabled

    $cfg['Servers'][$i]['table_info'] … not OK [ Documentation ]
    Display Features: Disabled

    $cfg['Servers'][$i]['table_coords'] … not OK [ Documentation ]
    $cfg['Servers'][$i]['pdf_pages'] … not OK [ Documentation ]
    Creation of PDFs: Disabled

    $cfg['Servers'][$i]['column_info'] … not OK [ Documentation ]
    Displaying Column Comments: Disabled
    Browser transformation: Disabled

    $cfg['Servers'][$i]['bookmarktable'] … not OK [ Documentation ]
    Bookmarked SQL query: Disabled

    $cfg['Servers'][$i]['history'] … not OK [ Documentation ]
    SQL history: Disabled

    $cfg['Servers'][$i]['designer_coords'] … not OK [ Documentation ]
    Designer: Disabled

    $cfg['Servers'][$i]['tracking'] … not OK [ Documentation ]
    Tracking: Disabled

    [Reply]

    alex Reply:

    Hello yiannis,

    So you are able to login but you cannot create a new database? Are you using root as the username or did you create a new username specifically for this?

    Thanks.
    alex

    PS. Please stop double posting. double posting.

    [Reply]

    yiannis Reply:

    sorry for double posting just saw your message …

    i created a new user to log in because i wasnt able to login as root

    what do i enter to log in as root ? root account has no password …

    [Reply]

    alex Reply:

    Hello yiannis,

    Have you read any documentation at all?

    You should create a password for the root account(bad practice regardless to leave this blank) and then limit phpmyadmin to only work from specific IP addresses so it is at least a little bit secure. You should also make sure that it works over HTTPS so nobody can steal the password.

    Thanks.
    alex

    [Reply]

  10. yiannis says:

    really dont know ( anymore ) what to do with mysql …

    for root i have no password but to log on to phpmyadmin it needs user and pass

    i created a user at mysql ( dont know if i still have it working ) and i get the above error messages at phpmyadmin ..

    can someone tell what to do exacly at mysql ? and why i still get blowfish secret error by the time i changed/added this ( renamed file to config.inc.php ) — >
    $cfg['blowfish_secret'] = ‘{^QP+-(3mlHy+Gd~FE3mN{gIATs^1lX+T=KVYv{ubK*U0V’; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

    [Reply]

    alex Reply:

    Hello yiannis,

    Please see message above. It sounds like you should read more about how phpmyadmin works and understand the basics first.

    Thanks.
    alex

    [Reply]

    yiannis Reply:

    well i tried to create a root password on mysql BUT i get syntax error messages !!!! all the time !!

    [Reply]

    yiannis Reply:

    i also tried to give privilege rights to new user but i get syntax errors there too !!! i did use mysql in the past for a forum PHP site … Dont know whats going on ! i m missing something

    [Reply]

    yiannis Reply:

    here is the weird thing ….

    i create user A at mysql
    i create database A at mysql
    i GRANT ALL PRIVILEGES ON circuitcity TO user A

    then i log in to phpmyadmin as user A

    and it says blowfish needed even tho i fixed the file as described above

    it also says that i have no database privileges…

    dont know what to do .

    Thank you for your help

    [Reply]

    yiannis Reply:

    correction

    I GRANT ALL PRIVILEGES ON database A TO user A

    [Reply]

    alex Reply:

    Hello yiannis,

    It sounds to me like you need to work on SQL syntax and get that correct before worrying about phpmyadmin. If you do not have users with the proper access to databases then phpmyadmin will not work properly. I would go back to the suggestion of adding a password for the root user and attempting to configure that within phpmyadmin making sure to only allow remote connections from specific address space. Also turn phpmyadmin from HTTP to HTTPS to make sure the passwords when logging in are sent ecrypted to the server for authorization.

    Thanks.
    alex

    [Reply]

  11. vien says:

    thanks

    [Reply]

    alex Reply:

    Hello vien,

    No problem. Thanks for taking the time to leave feedback.

    Thanks.
    alex

    [Reply]

  12.  
Leave a Reply

*Type the letter/number combination in the abvoe field before clicking submit.

*