Bugfree configuration: Working with MySQL

Source: Internet
Author: User

Here the mysql version is selected as the mysql-5.1.41-win32.msi, installed in the C: \ mysql directory.

The following is the configuration of mysqll:
Open the c: \ windows \ PHP. ini file;
Search; Extension = php_mysql.dll, remove ';
Search; Extension = php_gd2.dll, remove ';'
Search; Extension = php_mbstring.dll, remove ';'
Search; Extension = php_dba.dll, remove ';'

Search; Extension = php_dbase.dll, remove ';'

Search; Extension = php_imap.dll.dll, remove ';'

Query; Session. save_path = "/Temp", remove ";", change "/Temp" to "C: \ WINDOWS \ Temp", and change libmysql in the bin directory under the MySQL installation directory. DLL copied to the "C: \ WINDOWS \ System32" Directory

Create a new testdb. php file under c: \ apache2.2 \ htdocs

<?
$ Link = mysql_connect ("localhost", "root", "123456"); // change 123 to your MySQL password.
If (! $ Link)
Echo "fail to connect to MySQL! ";
Else echo "Success connect to MySQL! ";
Mysql_close ();
?>

Restart Apache server and enter http: // 127.0.0.1/testdb. php In the browser. If "Success connect to MySQL!" appears !", It proves that MySQL is successfully installed.

Other configurations:

 

Under data handling, locate post_max_size = 8 m. This is the maximum size of post data that PHP will accept and can be changed to 20 m.

Under paths and directories, find extension_dir = where the PHP search extension library is located, set its path to the location of the extensions folder, that is, change it to: extension_dir = "C: \ PHP \ Ext"

Under file uploads, find upload_max_filesize = 2 m. The maximum file size that can be uploaded can be changed to 20 m.

Dynamic extensions is part of PHP extension settings. All extensions supported by PHP are listed. A semicolon comment is added before, indicating that the current PHP configuration does not support extension, we can remove the semicolon to allow PHP to support this extension.

Enter test. php In the c: \ apache2.2 \ htdocs directory <? PHP phpinfo ();?> Restart Apache. Enter http: // 127.0.0.1/test. php In the browser and view the PHP version information, which proves that the PHP configuration is complete.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.