在linux中装了mysql,启动错误提示找不到pid file,
看到网上些方法没用啊。linux不熟悉说的那些目录都把我弄晕了!!ERROR2002(HY000):Can'tconnecttolocalMySQLserverthrou...
看到网上些方法没用啊。linux不熟悉说的那些目录都把我弄晕了!!
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@localhost ~]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@localhost ~]# service mysql start
Starting MySQL.Manager of pid-file quit without updating fi[失败]
[root@localhost ~]# 展开
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@localhost ~]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@localhost ~]# service mysql start
Starting MySQL.Manager of pid-file quit without updating fi[失败]
[root@localhost ~]# 展开
2个回答
展开全部
建立运行账户了吗?
这是我自己用的 RH系列一直没有问题 你对比下然后试试
#groupadd mysql
#useradd –g mysql mysql
#tar zxvf mysql*.tar.gz
#cd mysql*/
# ./configure \
--prefix=/usr/local/mysql --with-charset=utf8 \
--with-collation=utf8_general_ci \
--with-extra-charsets=all \
--with-mysqld-ldflags=-all-static
make
make install
#cp support-files/my-medium.cnf /etc/my.cnf //拷贝my-medium.cnf文件
#cd /usr/local/mysql //进入mysql目录
#bin/mysql_install_db --user=mysql /需要重启服务
#chown -R root . .//将文件的所有属性改为root用户
#chown -R mysql /usr/local/mysql/var //将数据目录的所有属性改为mysql用户
#chgrp -R mysql .//将组属性改为mysql组
#bin/mysqld_safe --user=mysql & //启动mysql
这是我自己用的 RH系列一直没有问题 你对比下然后试试
#groupadd mysql
#useradd –g mysql mysql
#tar zxvf mysql*.tar.gz
#cd mysql*/
# ./configure \
--prefix=/usr/local/mysql --with-charset=utf8 \
--with-collation=utf8_general_ci \
--with-extra-charsets=all \
--with-mysqld-ldflags=-all-static
make
make install
#cp support-files/my-medium.cnf /etc/my.cnf //拷贝my-medium.cnf文件
#cd /usr/local/mysql //进入mysql目录
#bin/mysql_install_db --user=mysql /需要重启服务
#chown -R root . .//将文件的所有属性改为root用户
#chown -R mysql /usr/local/mysql/var //将数据目录的所有属性改为mysql用户
#chgrp -R mysql .//将组属性改为mysql组
#bin/mysqld_safe --user=mysql & //启动mysql
参考资料: http://zhidao.baidu.com/question/125441849.html?si=1
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询