connect mysql database to command line or php script I've got a basic php script that runs perfect in a browser. I want to run this same php script at the shell command line (Freebsd 8.0), but I'm having troubles when the script tries to connect to the database using "mysql_query"....the rest of the script runs fine, but the connection to the database just doesn't happen. I've got a basic php script that runs perfect in a browser. I want to run this same php script at the shell command line (Freebsd 8.0), but I'm having troubles when the script tries to connect to the database using "mysql_query"....the rest of the script runs fine, but the connection to the database just doesn't happen. the great challenge of radio finding the way to the digital revolution You can disconnect from the MySQL database any time using the exit command at mysql> prompt. mysql> exit Bye MySQL Connection Using PHP Script. PHP provides mysql_connect() function ...