Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

Greetings!

share|improve this question
    
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

1 Answer 1

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

Cheers

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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