Davut Topcan wrote:
Hi Deepan,
are you sure running mysql on server?
can you try those; (of course if your OS is linux then)
# ps -aux | grep mysql
yes mysql server is running.
root 18506 0.0 0.0 4652 416 ? S Mar04 0:00 /bin/sh
/usr/bin/mysqld_safe --datadir=/var/lib/mysql
--socket=/var/lib/mysql/mysql.sock --log-error=/var/log/mysqld.log
--pid-file=/var/run/mysqld/mysqld.pid
mysql 18566 0.0 0.9 122468 5112 ? Sl Mar04 3:46
/usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql
--pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking
--socket=/var/lib/mysql/mysql.sock
deepan 22357 0.0 0.1 4044 672 pts/4 D+ Apr02 0:00 grep mysql
I am able to connect via mysql client and run queries. This is the
line where the php code breaks
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error
connecting to mysql');
please note that it breaks only when you try to run it via browser.
you were connecting mysql server with command line when you can select
each database.. and you run each sql , example; select * from each table.
Everthing is ok then I must see your php connect code..
see you...
Davut.
2008/4/11, Deepan <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>>:
Hi All,
I am able to connect to Mysql via command line
using mysql client. I am also able to connect to
mysql via php if I run those php programs via
command line. However when I hit those php pages
via the browser it throws the error Can't connect
to local MySQL server through socket
'/tmp/mysql.sock' (2). Please note that this is
the same socket the mysql client tries to connect
to the server.
Regards
Deepan
Sudoku Solver: http://www.sudoku-solver.net/
Sudoku Solver http://www.sudoku-solver.net/
_______________________________________________
Peterboro mailing list
[email protected]
https://mailman.lug.org.uk/mailman/listinfo/peterboro