i got this error msg in online... how to solve this
problem... i couldnot find out as soon as possible send me
answer or idea
COULD NOT ABLE TO CONNECT DATABASE .
Can't connect to local MySQL server through socket
'/usr/local/mysql-5.0/data/mysql.sock' (2)
Answer Posted / ritu
First you have to make a database connection. coding is below mention:
first u have to create a connection to server like:
mysql_connect("localhost","root","");
then select the database like:
mysql_select_db("database_name");
localhost is default server name.
root is default user name.
"" is default password. it means password is blank.
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
How do we get the current session id?
Is php an object or array?
Is numeric in php?
What is get and post method in php?
Where do we use get and post?
How to find a specific value in an array?
write a note on Testing the web site
How to get a total number of elements used in the array?
Tell me what the difference between the 'bitwise and' operator and the 'logical and' operator?
What is the meaning of xdebug?
Why php is widely used?
Why many companies are switching their current business language to php?
In php, objects are they passed by value or by reference?
What is slim framework?
What are the difference between overloading and overriding in oops?