INST 327 Lecture Notes - Lecture 7: Mysql
Document Summary
Inst327 lecture 7: mysql connection using mysql binary. You can establish the mysql database using the mysql binary at the command prompt. Here is a simple example to connect to the mysql server from the command prompt . This will give you the mysql> command prompt where you will be able to execute any sql command. Following is the result of above command . The following code block shows the result of above code . In the above example, we have used root as a user but you can use any other user as well. Any user will be able to perform all the sql operations, which are allowed to that user. You can disconnect from the mysql database any time using the exit command at mysql> prompt. Php provides mysql_connect() function to open a database connection. This function takes five parameters and returns a mysql link identifier on success or false on failure.