Not able to run mysql as admin in xampp - mysql

I am unable to run mysql as admin.
In the xampp command window, I tried login in as root it was successful but not able to run MySQL as admin.
Even in the control panel, there are no such errors displayed everything seemed perfect but while running MySQL as admin it is showing invalid settings

Did you install and run phpmyadmin ? (if you can run phpmyadmin, then login as root and your password and you can do all administrative works such as creating user / database, etc.)
In my understanding XAMPP comes with phpmyadmin by default. you may use the following standard link:
http://localhost/phpmyadmin

my config.inc.php was
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'cookie';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true;
I changed it to
$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;
And this resolves my issue

Related

Cannot log in to the MySQL server (XAMPP)

I am having an issue with logging into phpMyAdmin, specifically when I log in with the root user and the correct password it gives me this error:
Cannot log in to the MySQL server
When I log in using the 'pma' user without password it works, but it doesn't have the permissions I need to use obviously. I'm pretty sure this is the 1045 error.
Here are my settings in config.inc.php:
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'sutdenlol';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';
If you need more information please tell me instead of down voting.
Edit:
PHP scripts can access the server with root with the correct password.
Try to change
$cfg['Servers'][$i]['host'] = 'localhost';
to
$cfg['Servers'][$i]['host'] = '127.0.0.1';
and check do you have installed MySql Server on your machine. You can download it here - https://dev.mysql.com/downloads/

PHP my admin to connect with Amazon RDS

hello I am trying to connect phpMyAdmin to Amazon RDS. I am successfully connecting the mysql through terminal like this
mysql -h xxxxxxxxxxxxxxxxxxx.rds.amazonaws.com -u myusername -p
and for phpmyadmin I am doing this in config.inc.php file
$i++;
$cfg['Servers'][$i]['host'] = 'xxxxxxxxxxxxxxxxxxx.rds.amazonaws.com';
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['compress'] = FALSE;
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'myusername';
$cfg['Servers'][$i]['password'] = 'mypassword';
The problem I am having is If I do this and access the phpmyadmin, My phpmyadmin shows like this
It doesn't show tables columns or anything on the left side. But If I remove this code then everything is back to normal meaning I can see tables

How to change root password of phpmyadmin in WAMP?

I opened mysql console and wrote the following :
SET PASSWORD FOR root#localhost = PASSWORD('temppass') ;
Now when I open phpmyadmin, it says "Access denied for user 'root'#'localhost' (using password: NO)"
I was trying to set a password for root and I read it somewhere that we change root password from console itself, unlike previous versions where we had to alter the config files.
Any detailed tutorial on changing root password to secure a database?
I'm new to all this. Thank you.
Once you have changed the root password you need to tell phpMyAdmin what the new password is as by default the root password is held in the c:\wamp\apps\phpmyadmin4.1.14\phpmyadmin.conf file.
/*
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['verbose'] = 'mysql wampserver';
//$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'YOUR_NEW_PASSWORD'; <--change
/* Server parameters */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
//$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Servers'][$i]['AllowNoPassword'] = false; <--change
A better solution in my opinion is to change this file so that phpMyAdmin throws a login screen so you can enter/test new accounts as well as just root
So I would change c:\wamp\apps\phpmyadmin4.1.14\phpmyadmin.conf to
/*
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['verbose'] = 'mysql wampserver';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
//$cfg['Servers'][$i]['auth_type'] = 'config';
//$cfg['Servers'][$i]['user'] = 'root';
//$cfg['Servers'][$i]['password'] = '';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
Now you will get a login screen like this
To change the default mysql root password on xampp, type the following on mysql console:
UPDATE mysql.user SET Password=PASSWORD('som3P#Ss') WHERE User='root';
FLUSH PRIVILEGES;
then open [XAMPP Installation Path] /phpmyadmin/config.inc.php
and modify it to:
$cfg['Servers'][$i]['password'] = 'som3P#Ss';
$cfg['Servers'][$i]['AllowNoPassword'] = false;

moodle phpmyadmin cannot log in

After installing moodle, cannot og in as root in phpmyadmin, i tried everything i found in google, but i just can log in with other user called "admin" who only have acces to 1 DB.
my authentication zone in config.inc.php look like this:
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
can someone help me to log in with root?
I had the same experience.It was resolved by Opening command Prompt as Admin.. It should work

PhpMyAdmin login screen

I didn't have this problem before but when I installed WAMP on a fresh copy of windows and when I wanted to open phpmyadmin, this screen appeared: click me
Why? Why didn't I have this before? Is this new version or something? How can I login?
EDIT: Thanks for all the help and thanks for confirming this comes with the latest version! Though I do receive two messages on the bottom of the phpmyadmin screen now when I log in:
"Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole by setting a password for user 'root'."
and "The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. To find out why click here."
Go to WAMP folder. And search config.inc.php file. When you open that file, the file will have something like this:
<?php
/* Servers configuration */
$i = 0;
/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
/* End of servers configuration */
$cfg['DefaultLang'] = 'en-utf-8';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
?>
Search for this line:
$cfg['Servers'][$i]['auth_type'] = 'cookie';
And change the ‘config’ into ‘cookie’:
$cfg['Servers'][$i]['auth_type'] = 'config';
Save that, then open up phpmyadmin, and it will work great.
Answer for the updated question:
Its just a warning to show that there is no password for the default user root. If you want to set password for root.
GO tp phpmyadmin interface->Previlages->select user root>edit Previlages->change password
it is added in new version of wamp server. Just type username as "root" and password as blank and click go.You can set password after login.