首页 > 代码库 > linux mysql

linux mysql

 

file /usr/share/man/man1/mysqlshow.1.gz from install of MySQL-client-4.1.16-1.glibc23 conflicts with file from package mysql-3.23.54a-11
--------------------------------------------------------------
解决方案:卸载软件
原因有包冲突。解决冲突:
 
yum -y remove mysql-libs-*

yum -y remove mysql-libs-5.1.61*        -y的意思就是不用询问是否remove

卸载完成之后,再安装MySQL成功了,呵呵

 

--------------------------------------------------------

 Can‘t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘ (2)
解决方案:

chown -R mysql:mysql /var/lib/mysql



/etc/init.d/mysql stop

查看一下这个目录cd /etc/rc.d/init.d/

 

查看mysql启动状态/etc/rc.d/init.d/mysql status

 

-----------------------------------------------------

linux第一次登录mysql

由于没有密码

输入mysql
ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: NO)

-------------------------------------------------------

解决方案:

 

cd /root

ls -la

在这个目录下找密码/root/.mysql_secret

cat .mysql_secret

mysql -uroot -p 登录即可

重新设置密码即可

set password=password(‘admin‘);