Can't connect to local MySQL server
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) in /usr/local/apache/htdocs/qgweb/include/class_mysql.php on line 22
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
运行过install_db什么什么的一个脚本了吗?
以下是mysql-5.0.19的安装过程
1. Add a login user and group for `mysqld' to run as:
shell> groupadd mysql
shell> useradd -g mysql mysql
2.Unpack the distribution into the current directory:
shell> tar zxvf /PATH/TO/MYSQL-VERSION-OS.tar.gz
3.进入解压后的目录
cd mysql-5.0.19
./configure --prefix=/usr/local/mysql
make
make install
4.cp support-files/my-medium.cnf /etc/my.cnf
5.cd /usr/local/mysql/bin
执行mysql_install_db --user=mysql
6.回到目录/usr/local/mysql执行以下命令(注意有.的地方不能省去这个.)
chown -R root .
chown -R mysql var
chgrp -R mysql .
7.启动mysql
shell> /usr/local/mysql/bin/mysqld_safe --user=mysql &