更新时间:2021-08-04 21:22:32
这是由于您的mysql配置所致. 根据此错误,您试图以用户"root"连接到数据库名为"sgce"的数据库主机"localhost",而没有被授予访问权限.
This is due to your mysql configuration. According to this error you are trying to connect with the user 'root' to the database host 'localhost' on a database namend 'sgce' without being granted access rights.
假设您没有配置mysql实例.以root用户身份登录并登录到以下站点:
Presuming you did not configure your mysql instance. Log in as root user and to the folloing:
CREATE DATABASE sgce;
CREATE USER 'root'@'localhost' IDENTIFIED BY 'mikem';
GRANT ALL PRIVILEGES ON sgce. * TO 'root'@'localhost';
FLUSH PRIVILEGES;
还要在parameter.yml中添加您的database_port. 默认情况下,mysql侦听3306:
Also add your database_port in the parameters.yml. By default mysql listens on 3306:
database_port: 3306
MySQL错误:#1045-用户' root' @' localhost'的访问被拒绝(使用密码:是)
Laravel 5 错误 SQLSTATE[HY000] [1045] 用户 'homestead'@'localhost' 的访问被拒绝(使用密码:YES)
[PDOException]-SQLSTATE [HY000] [1045]用户'root'@'ip'的访问被拒绝(使用密码:是)
SQLSTATE [HY000] [1045]用户'homestead'@'localhost'的访问被拒绝(使用密码:是)(SQL:从“表"中选择*)
lavaral 5错误{(SQLSTATE [HY000] [1045]用户'root'@'localhost'的访问被拒绝(使用密码:是)}
警告:mysqli_connect():(HY000 / 1045):访问被拒绝用户'用户名'@'localhost'(使用密码:是)