How do you determine the location of MySQL data directory?

The default location of MySQL data directory in windows is C:\mysql\data or C:\Program Files\MySQL\MySQL Server 5.0 \data. To determine the location of the MySQL data directory, you can use one of the following methods: Using MySQL Command Line: You can log into the MySQL command line interface and run the following SQL query: SHOW VARIABLES … Read more

What is MySQL data directory?

MySQL data directory is a place where MySQL stores its data. Each subdirectory under this data dictionary represents a MySQL database. By default, the information managed my MySQL = server mysqld is stored in the data directory. The MySQL data directory is the location on a file system where MySQL stores its databases, tables, and … Read more

What is the use of mysql_close()?

Mysql_close() cannot be used to close the persistent connection. However, it can be used to close a connection opened by mysql_connect(). In MySQL, the mysql_close() function is used to close the connection to the MySQL server that was previously opened with mysql_connect() or mysql_pconnect() functions. When you no longer need to access the database, it’s … Read more

What is the difference between mysql_connect and mysql_pconnect?

Mysql_connect() is used to open a new connection to the database, while mysql_pconnect() is used to open a persistent connection to the database. It specifies that each time the page is loaded, mysql_pconnect() does not open the database. mysql_connect and mysql_pconnect are both functions used to establish a connection to a MySQL database in PHP, … Read more

What are the differences between MySQL_fetch_array(), MySQL_fetch_object(), MySQL_fetch_row()?

Mysql_fetch_object is used to retrieve the result from the database as objects, while mysql_fetch_array returns result as an array. This will allow access to the data by the field names. For example: Using mysql_fetch_object field can be accessed as $result->name. Using mysql_fetch_array field can be accessed as $result->[name]. Using mysql_fetch_row($result) where $result is the result … Read more