To verify my settings, I just created and a test php page to test if I can connect to my newly create WordPress database. I was not able to connect and got some more details about no connection. I got following wraning
ErrorException [ Warning ]: mysql_connect() [function.mysql-connect]:
[2002] No such file or directory (trying to connect via
unix:///var/mysql/mysql.sock)
Obviously when I checked /var/mysql/mysql.sock, I could not find it. So next step was to find where is my missing mysql.sock and found it under /tmp. After googling a lot, I could not find any concrete solution to resolve this. Niether there is anything which I can change for MySQL configuration nor for the PHP configuration. So my last resort and the easy solution was creating a symbolic link. I just created a symbolic link on /var/mysql to point to /tmp (sudo ln -s /tmp /var/mysql) and hit the refresh on WordPress installation page and everything was just smooth. Happy blogging :-)Cheers !!!
- Jay


"So my last resort and the easy solution was creating a symbolic link. I just created a symbolic link on /var/mysql to point to /tmp (sudo ln -s /tmp /var/mysql) and hit the refresh on WordPress installation page and everything was just smooth."
ReplyDeleteThanks for the post. I am a newbie and I don't have a clue as to how to create the symbolic link that you mention. Can you please elaborate on how to do this? Thanks.
Command to create symbolic link is ln and the one I used is mentioned in post - sudo ln -s /tmp /var/mysql
ReplyDeletePlease let me know if you're looking for a author for your weblog. You have some really good articles and I believe I would be a good asset. If you ever want to take some of the load off, I'd absolutely love to write some material for your blog in exchange for a link
ReplyDeleteback to mine. Please send me an e-mail if interested.
Many thanks!
Also see my webpage - SEO North Wales
Thanks for your offer. I'll let you know if required.
Delete