我现在遇到了问题,因为当我通过mysql -u=root使用命令行登录mysql时,它会给我一个类似以下ERROR 2002 (HY000): Can't connect to local MySQLserver through socket '/var/run/mysqld/mysqld.sock' (2)的错误
但是,当我尝试使用sudo mysql -u=root时,我设法转到mysql
在用一个更大更快的mysql替换了我的磁盘之后,我正在尝试安装MySQL。在ubuntu上安装mysql-server后,运行select user,host,authentication_string from user where user='root';时,authentication_string我设置了密码,但登录到root的唯一方法是使用sudo运行MySQL命令,如果我试图输入密码,如果我运行mysql -u