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
Is polymorphism inherited?
How to create a table using php?
What is curl php?
How would you declare a function that receives one parameter name hello?
What is php dependency injection?
What is the use of ajax in php?
How many functions are there in php?
What is session and Cokkies . How it works . tell some thing about Session_id()
How do you check if a variable has not been set in php?
Tell me what is the definition of a session?
What is htaccess in php?
Explain the difference between urlencode and urldecode?
What is the scope of a variable defined outside a function?
Is php better than python?
Is php faster than javascript?