mysql安装的相关问题

1.mysql语句执行后报错找不到mysql.sock

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

解决方法:service mysql status

                 service mysql start

2.同安装方式mysql安装后的名称

yum安装后的myql 是mysqld

rpm安装后的mysql是 mysql

3.mysql随机密码位置

rpm安装后在/root/.mysql_secret

4.mysql跳过密码验证

/etc/my.cnf,在 [mysqld] 小节下添加一行:skip-grant-tables=1

5.mysql开启远程登录

任意节点远程登录

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY 'password' WITH GRANT OPTION

flush privileges

6.包冲突:

mysql-libs-5.1 conflicts with file from package MySQL-server-5.5

解决方法:安装相应版本的MySQL-shared-compat的rpm包。

你可能感兴趣的:(mysql安装的相关问题)