everyone. I'm a student and very inexperience newbie with PHP . Before you mark this as irrelevant or duplicate or anything. Hear me out please, I need to connect to my school host to test out my codes, I have installed XAMPP, phpmyadmin 4.0.4.1 using notepad++ text editor, PHP5.4.19 and FTP WinSCP a program similar to filezilla
- uploaded all the files to the server side public html and tried to run the file in browser by using: my_school_link/my_username/
and I have this error
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /my_full_filepath..../connect.php on line 3 and this is my connect.php file.
<?php
mysql_connect('host_name', 'user_name', 'password');
mysql_select_db('my_database_name');
?>
I cannot locate my /tmp/mysql.sock, * i have tmp folder in xampp folder but inside i cant find mysql.sock*
and I have tried the following
- view nearly every post on this matter (i don't understand what is being said, thou i did try out some of the suggestions and answers)
- have entered the correct hostname, username and password
- run as admin
- checked if mysql is running ( it is so is Apache)
- MySQL socket specified in php.ini was never edited so it is in default mode
- cant locate mysql config file, or my.cnf, or etc folder
What could the problem be? Please if anyone could help me, please tell me what's wrong.
Please provide a step-by-step guide. and file extensions if need to save files....
Is there any additional things i can add to help anyone understand my problem better? if yes, please let me know...this is my last resort so Thank you so very much in advance for any help.