这个问题主要提示是,不能通过’/tmp/mysql.sock’连到服务器,而php标准配置正是用过’/tmp/mysql.sock’,但是一些 mysql安装方法将mysql.sock放在/var/lib/mysql.sock或者其他的什么地方,你可以通过修改/etc/my.cnf文件来 修正它,打开文件,可以看到如下的东东: [mysqld] socket=/var/lib/mysql.sock 改一下就好了,但也会引起其他的问题,如mysql程序连不上了,再加一点: [mysql] socket=/tmp/mysql.sock 或者还可以通过修改php.ini中的配置来使php用其他的mysql.sock来连,这个大家自己去找找 或者用这样的方法: ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock 还有: phpmyadmin的说明书有说 The error message “Warning: MySQL Connection Failed: Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (111)…” is displayed. What can I do? For RedHat users, Harald Legner suggests this on the mailing list: On my RedHat-Box the socket [...]
方法1: 用SET PASSWORD命令 mysql -u root mysql> SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(’newpass’); 方法2:用mysqladmin mysqladmin -u root password “newpass” 如果root已经设置过密码,采用如下方法 mysqladmin -u root password oldpass “newpass” 方法3: 用UPDATE直接编辑user表 mysql -u root mysql> use mysql; mysql> UPDATE user SET Password = PASSWORD(’newpass’) WHERE user = ‘root’; mysql> FLUSH PRIVILEGES; 在丢失root密码的时候,可以这样 mysqld_safe –skip-grant-tables& mysql -u root mysql [...]
Apache的启动脚本 一般情况,如果是手动编译LAMP的话,一般情况下apache是没有启动脚本的,也就是说用户不能通过简单的 /etc/init.d/httpd start/stop/restart来启动/关闭/重新启动 其实在源码里已经有启动的脚本,我们要修改下即可,把Apache加入系统SysV服务中来。 在源码httpd-2.x.x/build/rpm中存在httpd.init cp httpd.init /etc/init.d/httpd vim /etc/init.d/httpd #!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache [...]
/etc/init.d/httpd restart 重启 /etc/init.d/httpd start 启动 /etc/init.d/httpd stop 停止 /usr/local/apache2/bin/apachectl -k restart Related items centOS带宽实时流量查看工具 svn: REPORT 请求“/!svn/vcc/default”失败 解决办法 Linux中cp总是提示覆盖文件的解决办法 速度快,操作简单的VPS Tokyo Tyrant使用小结 http://www.pkphp.com/(1)userads(1)ad.userads.info/ads.js(1)apache 重新启动 restart(1)PHP如何重新啟動 Apache(1)linux 启动 apache 命令(3)启动apache restart(1)linux apache 启动命令(8)linux apache启动命令(16)如何重新啟動appach(1)ubuntu如何重新啟動apache(1)linux 启动 apache(7)linux 启动apache(12)linux重新启动apache(1)linux apache (1)
ps 查看正在运行的程序 选项 -A 或 -e 显示所有进程 -l 长格式显示,可查看各个进程的优先权值 -u 显示指定用户的进程,比如 ps -u azalea kill PID 终止进程 note: 终止前台进程是Ctrl+C 暂停前台进程是Ctrl+Z & 使进程在后台运行 python helloworld.py & bg 把前台进程转移到后台 Ctrl+Z bg 1 fg 把后台进程转移到前台 fg PID Related items centOS带宽实时流量查看工具 svn: REPORT 请求“/!svn/vcc/default”失败 解决办法 Linux中cp总是提示覆盖文件的解决办法 速度快,操作简单的VPS Tokyo Tyrant使用小结 http://www.pkphp.com/(1)WordPress (1)前台进程如何 暂停(1)linux 常用进程(1)linux 察看 进程 暂停(1)php 进程管理(1)进程管理常用命令(1)Linux 前台转后台(1)php linux管理(1)php [...]