简体   繁体   English

访问 mysql 数据库时访问被拒绝

[英]Access denied when accessing mysql database

I have attempted to install a mysql powered dating app known as Youdate ( https://youdate.website/demo ) on my test server after setting up an empty database.在设置一个空数据库后,我试图在我的测试服务器上安装一个 mysql 驱动的约会应用程序,称为 Youdate ( https://youdate.website/demo )。 I added an admin account using the MySql wizard on my server's cpanel.我在服务器的 cpanel 上使用 MySql 向导添加了一个管理员帐户。 However, when I try to access the database through SSH I am presented with the following error:但是,当我尝试通过 SSH 访问数据库时,出现以下错误:

mysql -u testadmin -p ****

ERROR 1045 (28000): Access denied for user 'testadmin'@'localhost' (using password: YES)

I have changed the password using the cpanel and phpmyadmin to no avail.我已经使用 cpanel 和 phpmyadmin 更改了密码,但无济于事。

Does anyone know where I am going wrong?有谁知道我哪里出错了? Thanks谢谢

you should check your table form mysql.user for user testadmin;您应该检查您的表格 mysql.user 以获取用户 testadmin;
Do you have permission to log in to localhost?您是否有权登录本地主机? It is recommended to use the ip address, or' testadmin'@'%', so that this user can log in at any other ip address.推荐使用ip地址,或者'testadmin'@'%',这样这个用户就可以在其他任何ip地址登录。 At the same time, check whether this user has any permission to database.同时检查该用户是否有数据库权限。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM