国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
mysql -Can‘t connect to local MySQL server through socket
[root@freebsd ~]# /usr/local/etc/rc.d/mysql-server start
[root@freebsd ~]# mysql
ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘ (2)
學(xué)習(xí)Freebsd過程中的一些小技巧
作者:未知 時(shí)間:2005-09-13 22:50 出處:Blog.ChinaUnix.net 責(zé)編:My FAQ
摘要:學(xué)習(xí)Freebsd過程中的一些小技巧
mysql 起動(dòng)錯(cuò)誤解決辦法- -
Access denied for user‘‘@‘localhost‘ to database ‘mysql‘
ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘
第一次安裝運(yùn)行以下一句,產(chǎn)生數(shù)據(jù)庫(kù)文件
/usr/local/bin/mysql_install_db
chown -R mysql /var/db/mysql
啟動(dòng)mysql
/usr/local/bin/mysqld_safe &
mysql 起動(dòng)錯(cuò)誤解決辦法- -
Access denied for user‘‘@‘localhost‘ to database ‘mysql‘
ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘
第一次安裝運(yùn)行以下一句,產(chǎn)生數(shù)據(jù)庫(kù)文件
/usr/local/bin/mysql_install_db
chown -R mysql /var/db/mysql
啟動(dòng)mysql
/usr/local/bin/mysqld_safe &
=====================================
apache啟動(dòng)
# /usr/local/sbin/apachectl start
可以在任何時(shí)候使用下面的命令來(lái)停止服務(wù):
# /usr/local/sbin/apachectl stop
當(dāng)由于某種原因修改了配置文件之后, 需要重啟服務(wù)器:
# /usr/local/sbin/apachectl restart
========================================
請(qǐng)問你裝的是什么版本?如果是5.4的話,ssh默認(rèn)是不打開的。需要在/etc/rc.conf里面添加sshd_enable="YES"才行的。用SecureCRT 4.1登陸時(shí)設(shè)置Primary的時(shí)候設(shè)為keyboard就行了。5.4的驗(yàn)證方式不能用password[/img]
確認(rèn)/etc/ssh/sshd_config里面下列三行前無(wú)#
Port 22
Protocol 2
PasswordAuthentication yes
=======================================
前幾天有個(gè)帖子有說(shuō)如何不重啟動(dòng)而使網(wǎng)絡(luò)參數(shù)修改生效的方法。
/etc/netstart restart
================================================
最簡(jiǎn)單的用系統(tǒng)自帶的ftpd
vi /etc/inetd.conf
把 ftpd前的#去掉存盤退出。(ipv6你應(yīng)該用不上第二個(gè)ftpd的#你就不用去了)
如果你系統(tǒng)里原先沒有啟動(dòng)inetd的話
就用#inetd啟動(dòng)守護(hù)進(jìn)程inetd
如果你已經(jīng)啟動(dòng)過了inetd就用 #killall -HUP inetd 從啟動(dòng)inetd
給他們一個(gè)賬號(hào)就可以連上你的機(jī)器了,更具體的man ftpd。
如果要inetd在下次隨系統(tǒng)啟動(dòng)編輯/etc/rc.conf加入inetd_enable="YES"
如果你原先有了就不用再加了。
當(dāng)然ports里還提供豐富的ftpd 比如vsftpd pureftpd,配置都不麻煩。
=============================================================
如果您知道一個(gè)port的準(zhǔn)確名字, 但需要知道在哪個(gè)類別里面能找到它
例如:
# whereis lsof
lsof: /usr/ports/sysutils/lsof
還有另外的一個(gè)尋找您需要的port的方法--是用ports collecton 內(nèi)嵌的搜索機(jī)制。要使用這個(gè)搜索, 您需要先到 /usr/ports目錄下面。在那個(gè)目錄里面, 運(yùn)行make search name=program-name, program-name 就是您想尋找的程序名字。 舉個(gè)例子,如果您想找 lsof:
# cd /usr/ports
# make search name=lsof
Port:   lsof-4.56.4
Path:   /usr/ports/sysutils/lsof
Info:   Lists information about open files (similar to fstat(1))
Maint: obrien@FreeBSD.org
Index:  sysutils
B-deps:
R-deps:
================================================================
ports安裝軟件
定位到軟件ports目錄
make install clean
指定安裝目錄
# make PREFIX=/usr/home/example/local install
卸載
make deinstall
============================
查找文件
find / -name *tbz
==============================
將pkg_add -r 的下載地址改成ftp://ftp.freebsdchina.org
bash shell
#export PACKAGEROOT="
csh shell
#setenv PACKAGEROOT "
===========================
在/etc/make.conf里設(shè)置ports用的FTP服務(wù)器設(shè)置好幾個(gè)
ee /etc/make.conf
add
MASTER_SITE_OVERRIDE=ftp://ftp3.jp.freebsd.org/pub/FreeBSD/ports/distfiles/$
http://www.myfaq.com.cn/2005September/2005-09-13/202434.html
 Can‘t connect to local MySQL server through socket 問題解決
  
  
Fedora8啟動(dòng)mysql 報(bào)錯(cuò):
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
1、先查看 /etc/rc.d/init.d/mysqld status 看看m y s q l 是否已經(jīng)啟動(dòng).
另外看看是不是權(quán)限問題.
2、確定你的mysql.sock是不是在那個(gè)位置,
mysql -u 你的mysql用戶名 -p -S /var/lib/mysql/mysql.sock
3、試試:service mysqld start
4、如果是權(quán)限問題,則先改變權(quán)限 #chown -R mysql:mysql /var/lib/mysql
[root@localhost ~]# /etc/init.d/mysqld start
啟動(dòng) MySQL: [ 確定 ]
[root@localhost ~]# mysql -uroot -p
ERROR 2002 (HY000): Can‘t connect to localMySQL server through socket ‘/var/lib/mysql/mysql.sock‘ (2)
原因是,/var/lib/mysql 的訪問權(quán)限問題。
shell> chown -R mysql:mysql /var/lib/mysql
接著啟動(dòng)服務(wù)器
shell> /etc/init.d/mysql start
服務(wù)器正常啟動(dòng)后察看 /var/lib/mysql 自動(dòng)生成mysql.sock文件。
但是我的問題仍然沒有得到解決。
問題終于解決:
方法:    修改/etc/my.conf:
[mysqld]
datadir=/usr/local/mysql/data
socket=/var/lib/mysql/mysql.sock
[mysql.server]
user=mysql
basedir=/usr/local/mysql
If there is not currently a section called [client], add one at the bottom of the file and copy the socket= line under the [mysqld] section such as:
[client]
socket=/var/lib/mysql/mysql.sock
發(fā)現(xiàn)依舊如此,運(yùn)行/etc/init.d/mysql start報(bào)錯(cuò):    Starting MySQLCouldn‘t find MySQL manager or server
是mysqld服務(wù)沒啟,運(yùn)行/usr/local/mysql/bin/mysqld_safe &
問題解決。
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=2039988
2006-11-27 11:06 banyao
FB6.2rc1下MYsQL啟動(dòng)出錯(cuò)(已解決)
[code]
root@yao[/usr/ports/databases/mysql51-server]# make install
===>  mysql-server-5.1.11 cannot install: MySQL versions mismatch: mysql50-client is installed and wanted version is mysql51-client.
*** Error code 1
Stop in /usr/ports/databases/mysql51-server.
root@yao[/usr/ports/databases/mysql51-server]#
root@yao[/usr/ports/databases/mysql50-server]# make install
root@yao[/usr/ports/databases/mysql50-server]# /usr/local/etc/rc.d/mysql-server start
Starting mysql.
root@yao[/usr/ports/databases/mysql50-server]#
root@yao[/usr/local/etc]# mysql
ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘ (2)
root@yao[/usr/local/etc]# mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘ (2)
root@yao[/usr/local/etc]# find /usr -name my.cnf
root@yao[/usr/local/etc]#
[/code]
這個(gè)是在另外一臺(tái)機(jī)器上遇到的問題
[code]
phpMyAdmin - Error
phpMyAdmin是在官方網(wǎng)上下載的最新版本2.9.1.1
cp phpMyadmin /usr/local/www/apache/data
目錄下有一個(gè)config.sample.inc.php文件,找把到教程中說(shuō)的config.inc.php  而且里面的內(nèi)容也不想是config.inc.php
firefox http://localhost/phpadmin
瀏覽器中顯示:
Fatal error: Call to undefined function preg_replace() in /usr/local/www/apache22/data/phpMyAdmin/libraries/sanitizing.lib.php on line 37
[/code]
[[i] 本帖最后由 大大狗 于 2006-11-27 14:49 編輯 [/i]]
2006-11-27 11:15 大大狗
可能是mysql.sock的權(quán)限不夠
2006-11-27 11:19 大大狗
mysql.sock 它是被放在 /tmp/mysql.sock 臨時(shí)文件夾下的,所你可以重新啟動(dòng)一下系統(tǒng)就可以了
reboot     在   mysql -u root -p
2006-11-27 11:21 大大狗
第二個(gè)問題
解決方法    [code]出現(xiàn)無(wú)法識(shí)別preg_replace函數(shù)的錯(cuò)誤需要安裝pcre , 位于 /usr/ports/devel/php5-pcre
正則表達(dá)式的支持是由 PCRE(Perl Compatible Regular Expression)庫(kù)提供的,這是個(gè)開放源代碼的軟件,作者為 Philip Hazel,版權(quán)屬于英國(guó)劍橋大學(xué)。可于以下地址獲得:ftp://ftp.csx.cam.ac.uk/
[/code]
2006-11-27 13:57 banyao
謝謝,第一個(gè)問題解決拉,第二個(gè)問題,依然是不行,
是不是phpMyAdmin缺少了個(gè)config.inc.php配置問題?
php5-extensions已經(jīng)ports上去了阿
phpMyAdmin - Error
Cannot load session extension. Please check your PHP configuration.
2006-11-27 14:01 大大狗
/usr/ports/devel/[color=Blue]php5-pcre[/color]  這個(gè)已經(jīng)ports了嗎
2006-11-27 14:13 banyao
[quote]原帖由 [i]大大狗[/i] 于 2006-11-27 14:01 發(fā)表
/usr/ports/devel/[color=Blue]php5-pcre[/color]  這個(gè)已經(jīng)ports了嗎 [/quote]
已經(jīng)ports上了,
2006-11-27 14:22 banyao
重啟系統(tǒng)之后就可以了,謝謝 大大狗版主
奇怪怎么我重啟服務(wù)不行,非得要重啟系統(tǒng)才可以
http://bbs2.chinaunix.net/archiver/tid-861670.html
作者 留言
mylcx1028
半仙
注冊(cè)時(shí)間: 2007-05-17
文章: 1
發(fā)表于: Thu 2007-05-17 15:07:32    發(fā)表主題: 菜鳥求助ports安裝mysql
這兩天剛接觸FreeBSD,有問題向大家請(qǐng)教 ^_^
我想在系統(tǒng)里裝上mysql
下面是安裝步驟:
cd /usr/ports/databases/mysql51-server/
make
make install
make clean
cd work/mysql-5.1.11-beta
scripts/mysql_install_db
出現(xiàn)以下信息:
引用:
Installing all prepared tables
Fill help tables
To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/local/bin/mysqladmin -u root password ‘new-password‘
/usr/local/bin/mysqladmin -u root -h freeBSD.domain password ‘new-password‘
See the manual for more instructions.
NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/local/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!
You can start the MySQL daemon with:
cd /usr/local ; /usr/local/bin/mysqld_safe &
Please report any problems with the /usr/local/bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses athttp://shop.mysql.com
mysql
引用:
ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘ (2)
mysql服務(wù)啟動(dòng)不了. : (
引用:
/usr/local/bin/mysqld_safe &
也是和上面一樣的錯(cuò)誤
大家請(qǐng)指教.
返回頁(yè)首
RainFlying
半仙
注冊(cè)時(shí)間: 2005-11-11
文章: 14
發(fā)表于: Fri 2007-05-18 12:27:14    發(fā)表主題: Re: 菜鳥求助ports安裝mysql
mylcx1028 寫到:
這兩天剛接觸FreeBSD,有問題向大家請(qǐng)教 ^_^
我想在系統(tǒng)里裝上mysql
下面是安裝步驟:
cd /usr/ports/databases/mysql51-server/
make
make install
make clean
cd work/mysql-5.1.11-beta
scripts/mysql_install_db
出現(xiàn)以下信息:
引用:
Installing all prepared tables
Fill help tables
To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/local/bin/mysqladmin -u root password ‘new-password‘
/usr/local/bin/mysqladmin -u root -h freeBSD.domain password ‘new-password‘
See the manual for more instructions.
NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/local/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!
You can start the MySQL daemon with:
cd /usr/local ; /usr/local/bin/mysqld_safe &
Please report any problems with the /usr/local/bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses athttp://shop.mysql.com
mysql
引用:
ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘ (2)
mysql服務(wù)啟動(dòng)不了. : (
引用:
/usr/local/bin/mysqld_safe &
也是和上面一樣的錯(cuò)誤
大家請(qǐng)指教. :oops:
/usr/local/bin/mysql_install_db --user=mysql試試
_________________
如果大海能夠喚回曾經(jīng)的愛,
就讓我用一生等待;
如果深情往事你已不再留戀,
就讓他隨風(fēng)飄遠(yuǎn);
如果大海能夠帶走我的哀愁,
就像帶走每條河流,
所有受過的傷,
所有流過的淚,
我的愛,
請(qǐng)全部帶走
返回頁(yè)首
 
FindFullMoon
半仙
注冊(cè)時(shí)間: 2006-09-04
文章: 96
發(fā)表于: Mon 2007-05-21 01:40:12    發(fā)表主題: 我也是裝的這個(gè).沒出現(xiàn)這個(gè)問題
以前在LINUX下安裝MYSQL的時(shí)候 還在煩怎么設(shè)置呢.
裝好這個(gè)PORTS的時(shí)候..
我就直接在rc.conf中
mysql_enable="YES"
然后,/usr/local/etc/rc.d/mysql-server start
就直接用了.應(yīng)該是我還不懂怎么玩mysql吧.
返回頁(yè)首
wpppl.108
半仙
注冊(cè)時(shí)間: 2007-05-11
文章: 11
發(fā)表于: Thu 2007-05-24 22:40:14    發(fā)表主題:
我等待!我有同樣的問題,但是我是編譯安裝的!
_________________
FreeBSD交流群16911484!
返回頁(yè)首
kyclove
半仙
注冊(cè)時(shí)間: 2005-04-16
文章: 11
來(lái)自: 福建泉州
發(fā)表于: Thu 2007-09-06 16:59:53    發(fā)表主題:
我也是剛學(xué)的.BSD.我的能啟動(dòng)
/usr/local/bin/./mysql_install_db -u mysql
/usr/local/bin/./mysql_safe -u mysql &
/usr/local/share/mysql/./mysql.server start
試下.
_________________
Administrator
返回頁(yè)首
dog
半仙
注冊(cè)時(shí)間: 2006-10-12
文章: 48
發(fā)表于: Tue 2007-10-16 17:22:43    發(fā)表主題:
恩,樓主這個(gè)問題我也遇到過,不過當(dāng)時(shí)我是MYSQL檔的權(quán)限設(shè)置沒對(duì),所以有問題,樓主可以ls -l查看一下。
如果還是不能解決,我們?cè)儆懻摗?div style="height:15px;">
返回頁(yè)首
xport
老妖
注冊(cè)時(shí)間: 2004-05-27
文章: 1194
來(lái)自: N/A
發(fā)表于: Tue 2007-10-16 17:56:25    發(fā)表主題: Re: 菜鳥求助ports安裝mysql
mylcx1028 寫到:
cd /usr/ports/databases/mysql51-server/
make
make install
make clean
cd work/mysql-5.1.11-beta
scripts/mysql_install_db
出現(xiàn)以下信息:
你 clean 后就沒有 work 這個(gè)目錄了!
所以,你得執(zhí)行這個(gè)去建立 MySQL 的系統(tǒng)數(shù)據(jù)庫(kù):
代碼:
# /usr/local/bin/mysql_install_db
然后就可以開 MySQL 的數(shù)據(jù)庫(kù)服務(wù)了:
代碼:
# /usr/local/etc/rc.d/mysql-server onestart
Starting mysql.
_________________
http://freebsdchina.org/forum/viewtopic.php?t=36066
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
解決Can't connect to local MySQL server through socket '/tmp/mysql.sock'錯(cuò)誤
LINUX重啟MYSQL的命令
實(shí)現(xiàn) MySQL 數(shù)據(jù)庫(kù)數(shù)據(jù)的同步方法介紹
Linux下Mysql安裝以及主從同步配置【2010.08.10】
Linux下安裝MySQL
MySQL manager or server PID file could not be found!
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服