You are here: Re: Mysql can connect, but PHP can't? « PHP Programming Language « IT news, forums, messages
Re: Mysql can connect, but PHP can't?

Posted by Gordon Burditt on 05/09/05 23:44

>I'm trying to migrate mysql database form one server to another server.
>So I copied the data from /var/lib/mysql to the other one.. and use
>INSERT INTO from the old database to the new one..so the Top level
>'mysql' database has all the correct users and password and priviledge.
>
>however, when one of the php website trying to load..it'll say
>
>Unable to login to the MySQL database 'tikiwiki' on 'localhost' as user
>'user1'
>Go here to begin the installation process, if you haven't done so
>already.
>
>Can't connect to local MySQL server through socket
>'/var/lib/mysql/mysql.sock' (13)

perror 13
Permission denied

It's a UNIX permission problem on the socket.

>However, when i do it on shell.

Try it again, on a shell RUNNING AS THE USER PHP (Apache) RUNS AS.
My guess is that this user doesn't have permissions on
/var/lib/mysql or /var/lib/mysql.sock . Or it might be permissions
on /var/lib or /var, but that's less likely.

Gordon L. Burditt

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация