Reputation: 101
So, today for the first time i installed XAMPP/LAMPP on Ubuntu 15.10. Apache server is working fine, but when i try to go to 'localhost/phpmyadmin' I get the following error:
And believe me i searched through whole internet, stack overflow, apache friends, etc. and none of given solutions worked for me... So this is my config.inc.php file:
<?php
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
/* Server parameters */
//$cfg['Servers'][$i]['host'] = 'localhost';
//$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true;
/**
* phpMyAdmin configuration storage settings.
*/
/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controlport'] = '';
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';
/* Storage database and tables */
$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]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
// $cfg['Servers'][$i]['favorite'] = 'pma__favorite';
// $cfg['Servers'][$i]['users'] = 'pma__users';
// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
/* Contrib / Swekey authentication */
// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';
So you can see that my user = root and password is empty. But it simply doesn't work, i tried to change user/pass, tried to change controluser and controlpass, but nothing seems to work. Do you have any idea on how i can fix this problem?
Upvotes: 7
Views: 96368
Reputation: 8997
Start by commenting out the controluser and controlpass lines in config.inc.php. Then you'll be able to log in with root, and use the Privileges or User accounts menu to add this pma user. It's explained in the documentation.
Upvotes: 3
Reputation: 343
I had a similar issue. I was able to do fix by following the video tutorial https://www.youtube.com/watch?v=NSX-ib2aMDQ
i just added skip-grant-tables to my.ini file. Below is a sample portion of my.ini file.
# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# You can copy this file to
# C:/xampp/mysql/bin/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is C:/xampp/mysql/data) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.
# The following options will be passed to all MySQL clients
[client]
# password = your_password
port=3306
socket="C:/xampp/mysql/mysql.sock"
# Here follows entries for some specific programs
# The MySQL server
default-character-set=utf8mb4
[mysqld]
skip-grant-tables
port=3306
socket="C:/xampp/mysql/mysql.sock"
basedir="C:/xampp/mysql"
tmpdir="C:/xampp/tmp"
datadir="C:/xampp/mysql/data"
pid_file="mysql.pid"
# enable-named-pipe
key_buffer=16M
max_allowed_packet=1M
sort_buffer_size=512K
net_buffer_length=8K
read_buffer_size=256K
read_rnd_buffer_size=512K
myisam_sort_buffer_size=8M
log_error="mysql_error.log"
Upvotes: 2
Reputation: 1659
sudo reboot
then start mysql if not auto start
sudo service mysql start
Upvotes: 1
Reputation: 21
Hey pal no need to change any file.. Its basically because your mysqli isnt running .. Check control panel for "action" column . You should see "Start" meaning its off, Your php can't speak to a sleeping database gate's locked.. That's why
To Solve it... Open the folder you installed the xampp app into, then click on xammp start and then accept all necessary approvals..
Upvotes: 1
Reputation: 1782
It happened the same to me. But here's how I fixed it. Just reboot your browser whenever it gives you that error and log into the phpMyAdmin again. No code required, no configurations manipulation required
Upvotes: 1
Reputation: 93
According to the config.inc.php
you've posted, your root user password is 1234 (as I see in the line $cfg['Servers'][$i]['password'] ='1234'
;), but later in the file when you're defining the controluser, you use a blank password.
I suggest setting up an actual controluser with fewer permissions than root has, but the quick fix would be to edit and make this
change: $cfg['Servers'][$i]['controlpass'] = '1234';
To create a controluser account, use an SQL command similar to this:
GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass';
substituting the name of your phpMyAdmin configuration storage database (probably 'phpmyadmin') for <pma_db>
and a custom password for pmapass.
Upvotes: 7
Reputation: 320
Purging the phpmyadmin and install again worked for me.
Purge phpmyadmin using this command:
sudo apt-get purge --auto-remove phpmyadmin
and install again:
sudo apt-get install phpmyadmin
Upvotes: -2
Reputation: 311
reinstall phpmyadmin and try
Code:
sudo dpkg-reconfigure phpmyadmin
if that doesn't work then try Code:
sudo apt-get --purge remove phpmyadmin
then reinstall, if that doesn't work I'm willing to bet it doesn't matter and do Code:
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
and restart apache Code:
##sudo /etc/init.d/apache reload
sudo service apache2 reload
Upvotes: 20
Reputation: 21
Find the file config.default.php
and replace
$cfg['Servers'][$i]['host'] = 'localhost';
with
$cfg['Servers'][$i]['host'] = '127.0.0.1';
then log in.
Upvotes: 2
Reputation: 1120
Uncomment: ...
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost'; //<--UNCOMMENT THIS
$cfg['Servers'][$i]['connect_type'] = 'tcp'; //<--UNCOMMENT THIS
...
Since you need this to connect via localhost.
Upvotes: 3