PhpMyadmin unable to create database

If you ever run into a problem where you have phpMyadmin open and cannot find where to create a database, because it is simply not there, ssh into your server and from the command line run;


vim /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php

look for the following lines in the file; (may be towards the bottom)

// cpanel: cases 36079, 36080, 36144
$cfg['ShowChgPassword'] = false;
$cfg['ShowCreateDb'] = false;
$cfg['AllowUserDropDatabase'] = false;

and change it to

// cpanel: cases 36079, 36080, 36144
$cfg['ShowChgPassword'] = false;
$cfg['ShowCreateDb'] = true;
$cfg['AllowUserDropDatabase'] = false;

This will now allow phpMyadmin to show the “Create database” option located directly under the “MySQL connection collation:” option.
Here is the default file if you need a reference.


< ?php /* 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'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

/*
* Servers configuration
*/
$i = 0;

/*
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
/* 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'] = '';

?>

As a workaround, use the cpanel function “Mysql Databases” >> “Create New Database” to create a database for a user account as this allows for the creation of a database outside of phpmyadmin.

g33kadmin

I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.