centosmysql命令安装
<code>我是在VMware 上装的centos,然后安装mysql 命令:yum install wgetwget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpmrpm -ivh mysql-community-release-el7-5.noarch.rpmyum install mysql-server这样就安装完成mysql了,我们可以用命令查看一下是否安装成功了命令是:rpm -qa | grep mysql显示:mysql-community-release-el7-5.noarch</code>
mysql-community-libs-5.6.23-3.el7.x86_64
mysql-community-server-5.6.23-3.el7.x86_64
mysql-community-common-5.6.23-3.el7.x86_64
mysql-community-client-5.6.23-3.el7.x86_64
<code>刚刚安装好的时候是能进去的 直接 mysql 改了下密码,用的是这个命令:# mysql -uroot mysql> set password for ‘root’@‘localhost’ = password('我的密码'); mysql> exit 然后就进不去了 然后我就重装 重装时,我也注意到需要将上个mysql卸载干净,这样卸载的: yum remove mysql mysql-server mysql-libs mysql-client;find / -name mysql 将找到的相关东西删掉; rm -rf 目录 -删除目录 rpm -qa|grep mysql(查询出来的东东yum remove掉) 然后安装完后,输入:mysql 提示: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 咋回事呢 新人没币打赏啊 静待好心人解答 </code>