Configure phpmyadmin in Kali Linux

Install phpmyadmin

sudo apt install phpmyadmin php-mbstring php-mysql
cd /usr/share/phpmyadmin
cp config.sample.inc.php config.inc.php
cd /var/www/html
sudo ln -s /usr/share/phpmyadmin

Configure mysql

  • There are 2 ways to solve this:
    1.You can set the root user to use the mysql_native_password plugin
$ sudo mysql -u root # I had to use "sudo" since is new installation
mysql> USE mysql;
mysql> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> exit;

2.You can create a new db_user with you system_user (recommended)

$ sudo mysql -u root # I had to use "sudo" since is new installation
mysql> USE mysql;
//If you want to access from outer network using % instead of localhost
mysql> CREATE USER 'YOUR_SYSTEM_USER'@'localhost' IDENTIFIED BY 'Password';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'YOUR_SYSTEM_USER'@'localhost';
mysql> UPDATE user SET plugin='auth_socket' WHERE User='YOUR_SYSTEM_USER';
mysql> FLUSH PRIVILEGES;
mysql> exit;

Restart apache2 and mysql

/etc/init.d/apache2 restart
/etc/init.d/mysql restart
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,486评论 0 10
  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 10,030评论 0 23
  • 文/馨语 遇见,是一场宿命的邀约 有一段相识叫做很开心 有一种友情叫我仍记得你的好 有个送别叫日后照顾好自己 这种...
    海仙子阅读 240评论 0 0
  • 三毛曾说过:人之所以悲伤,是因为我们留不住岁月;而更无法面对的是有一日,青春,就这样消逝过去。 人的生命不在于长短...
    向未来挥手阅读 454评论 1 1
  • 又是一个清明节,本想陪着爸妈过个节,陪他们拉拉家常,祭奠先人,踏踏青,看看景。但却又过成了别的模样。 清明三天时间...
    撸铁pro阅读 297评论 0 1