使用ubuntu问题

2023-12-27 15:54:01

?ubuntu忘记用户密码看这里,真的不错,一文重置密码

VMware Ubuntu虚拟机忘记密码-CSDN博客https://blog.csdn.net/Super_Jadroid/article/details/135092514?spm=1001.2014.3001.5502

在虚拟机ubuntu上安装ssh

sudo apt-get install ssh openssh-server

出现以下错误

Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/

您看到此错误是因为其他程序正在尝试更新 Ubuntu。当命令或应用程序更新系统或安装新软件时,它会锁定?文件,所以需要等更新完成之后才能继续。

设置权限也报错。。。。

mysql> GRANT ALL PRIVILEGES ON *.* 'root'@'%' IDENTIFIED BY 'Eastcom@123' WITH GRANT OPTION;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''root'@'%' IDENTIFIED BY 'Eastcom@123' WITH GRANT OPTION' at line 1
解决办法:

这条语句适用于MySQL8.0之前的,而MySQL8.0及之后的,设置远程连接权限要用下面的语句才可以:
create user root@'%' identified by '123456';
grant all privileges on *.* to root@'%' with grant option;

文章来源:https://blog.csdn.net/Super_Jadroid/article/details/135092913
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。