phpmyadmin用root用户登录 MariaDB 10.1.26 (mysql 5.7) 失败

环境:Debian 9.4, MariaDB 10.1.26 或 mysql 5.7, phpmyamdin 4.8

过程:

  1. 在Debian系统里安装好 nginx + php7.0 + MariaDB 的环境,放置一份 phpmyadmin 尝试登录
  2. 用 MariaDB 的root用户和密码登录,失败,提示:
    mysql-1.png>mysqli_real_connect(): (HY000/1698): Access denied for user 'root'@'localhost'>mysqli_real_connect(): (HY000/1698): Access denied for user 'root'@'localhost'
  3. 搜索得,如 mysql 5.7 版本后,默认不允许root用户从如phpmyadmin登录
  4. 可在服务器里通过mysql,创建一个有完全权限的新用户,如果是生产环境,建议仅授权指定数据库的权限:
    mysql-4.png`CREATE USER 'idbadm'@'localhost' IDENTIFIED BY 'meizi36829';` `GRANT ALL PRIVILEGES ON *.* TO 'idbadm'@'localhost' WITH GRANT OPTION;` `FLUSH PRIVILEGES;`
  5. 用新建用户的信息(登录名idbadm,密码meizi36829),再次登录phpmyadmin,成功
    mysql-5.png

参考:

标签: phpmyadmin


2 Comments

Davidoff · 2020-11-06 at 00:24

여러버전의 php동시 설치할려면 아래와같이 입력..
/.install.php mphp

Davidoff · 2020-11-06 at 21:35

nginx 에 새로운 모듈 추가할려면 lnmp1.X다이렉트에서 lnmp.conf편집하고 ./upgrade.sh실행 -> nginx선택 -> 실행하면 됩니다..

예:nginx에 ssl_preread , realip_module 모듈 첨가시- lnmp.conf편집:
Nginx_Modules_Options='--with-stream_ssl_preread_module --with-http_realip_module'

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *