战芳 wrote: >Hi! gerald_clark, >But when I call mysql_pconnect("localhost:3306","root","root_password"),it >return the same error. How can I get the permission to open >/var/mysql/lib/mysql.sock? > Fang > > > what do you get when you do ls -l /var/mysql/lib/mysql.sock? Permissions should be srwxrwxrwx
> > > >>fool.ben wrote: >> >> >> >>>Hi everybody! >>>I've install a mysql server on my computer. The operating system is Redhat >>>fedora core 4. The version of the mysql server is 4.1.3 Beta. I wanna >>>connect to the server using the following statement: >>>$db_connection=mysql_pconnect("localhost","root",""); >>>The server returned the error 2002: >>>2002 Can't connect to local MySQL server through socket >>>'/var/mysql/lib/mysql.sock(13)' >>> >>> >>> >>> >>The user running the php connection does not have permissions to open >>/var/mysql/lib/mysql.sock. >> >> >> >>>I was suggested that the server may not running, or the sockect is wrong. >>>But when I run the following statement, there was no error occured: >>>localhost#/usr/local/mysql/bin/mysql -uroot& -S/var/mysql/lib/mysql.sock >>> >>> >>> >>> >>Here you are root, so you have permissions. >> >> >> >>>Can anyone help me? >>> >>> >>> >>> >>Fix your permissions or move your socket to a directory that is world >>searchable. >> >> >> >>> Fang >>> >>> >>> >>> >>-- >>MySQL General Mailing List >>For list archives: http://lists.mysql.com/mysql >>To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] >> >> > > > > > > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]