i just compiled MySQL 5.1 on SunOS 5.11 (i think xD) and now i have some problems. I am able to start the server via

./bin/mysqld_safe &

and i can run the mysql* tool in /bin via Putty, however i am not able to connect to the server via PHP. Currently i am getting the following error

Can't connect to local MySQL server through socket '/tmp/mysql.sock'

using the simple command

mysql_connect("localhost", "root", "password") or die("n00b!");

Please keep in mind, i am logged in on a system without administrative priviledges and therefore i can not edit too much system files...

Can you please help me, find out how to reconfigure the server so that it can be used via local php scripts and phpMyAdmin?


  • Be more clear, thinking that you're on sunOS 5.11 isn't really helping us... Also, you should get administrative priviledges to install or config anything – HTDutchy Apr 7 '11 at 18:50
  • It is SunOS 5.11. Just checked it! This is the server of the university -> i am allowed to run mysql as long as it is done without these priviledges. I would use my own running xampp on Windows, however the server is much better than my local pc :D – Christian Ivicevic Apr 7 '11 at 18:51

Have you tried connecting through TCP/IP? i.e. use instead of localhost.


  • Yop. Same error. However, when i use rayhalle2 (the hostname) the script loads and loads and loads and ... nothing. – Christian Ivicevic Apr 7 '11 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.