September 28th in Uncategorized by .

how to create new user for phpmyadmin login

 

PHPMyAdmin and MySQL server complement each other very well. In most situations you have installed mysql server and phpmyadmin.

By default the mysql root password is blank and this is a big security issue and you have change the mysql password as soon as possible. If that is not done anybody could login with phpmyadmin with username root and password blank. You also must avoid to login phpmyadmin with mysql root password. Instead you must create a new user (to phpmyadmin) with same privileges as mysql root.

First change the mysql root password

mysql > update user set password=password('XXXXX') where user='root';
Query OK, 3 rows affected (0.00 sec)
Rows matched: 3 Changed: 3 Warnings: 0
mysql > FLUSH PRIVILEGES;

Thats all! you have changed your mysql root password. All you have to do is login to phpmyadmin with username as root and password as new password.

Create a new phpmyadmin user

Now we will create a new administrator login (say sysadmin) for phpmyadmin which will have same privileges as mysql root.
Its just one line command;

mysql> GRANT ALL ON *.* TO 'sysadmin'@'localhost' IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)

then

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

Now you can login to phpmyadmin as new administrator and avoid using root logins. You can create databases, change or insert or edit tables or do whatever you want!

Similar Posts:

13 Comments

  • Tamesis Lucien
    November 18, 2008
  • amir
    May 22, 2009
  • Fenix
    October 14, 2009
  • Domi
    April 28, 2010
  • kevinbeckett
    December 17, 2010
  • azdrian
    April 25, 2011
  • Jesus
    July 19, 2011
  • Rakesh
    February 15, 2012
  • Ashish garg
    June 14, 2012
  • samir khan
    January 25, 2013
  • samir khan
    January 25, 2013
  • Mehere Jan
    January 25, 2013
    • pbu
      January 28, 2013

Leave A Comment.






8 − = two

Please wrap all source codes with [code][/code] tags. Powered by