We recommend the Linuxmysql system, which is very useful to you. For example, we want to give you an introduction to the Linuxmysql system. I hope it will be useful for you to specially configure mysqlapachephp today, although there are many examples of this on the Internet, many of them are written by the author again, so it is inevitable that there are mistakes.
I would like to recommend a Linux mysql system that is very useful to everyone, for example, to let everyone know about the Linux mysql system, and then to give a comprehensive introduction to the Linux mysql system, I hope it will be useful for you to configure mysql apache php specially today. Although there are many examples of this on the Internet, many of them are written by the author again, so it is inevitable that there are mistakes.
These things are just a bit confusing for new users. Here is my installation notes. It is successfully installed on the Centos virtual machine. For more information about How to Install MySQL 5.0 on Linux, How to Install PHP 5 on Linux, How to Install Apache 2 on Linux
Linux mysqlapache php installation process. Copy the tar.gz files of apache, mysql, and php to the/home/tmp directory. Run the following command:
Install mysql in Linux
Cd/home/tmp groupadd mysql useradd-g mysql tar-zxvf mysql-5.1.33.tar.gz cd mysql-5.1.33. /configure -- prefix =/usr/local/mysql make install cd/usr/local/mysql chown-R root. bin/mysql-u root-p chgrp-R mysql. (Note that there is .) cd/home/tmp cd mysql-5.1.33 ln-s/usr/local/mysql // usr/local/mysql cp support-files/my-small.cnf/etc/my. cnf modify my. cnf adds user = mysql under [sqld. chown root/etc/my. cnf Chgrp root/ect/my. cnf chmod 644/etc/my. cnf/usr/local/mysql/bin/mysqld_safe -- user = mysql & cp support-files/mysql. server/etc/init. d/mysql chmod 755/etc/init. d/mysql chkconfig -- add mysql chkconfig -- level 35 mysql on/usr/local/mysql/bin/mysql_install_db -- user = mysql/usr/local/mysql/bin/mysql-u root (If you can access the mysql command line, mysql configuration is successful .) Edit/etc/my. cnf
[Client] + default-character-set = utf8 [mysqld] + default-character-set = utf8 [mysql] + default-character-set = utf8
Apache installation, first go to the/home/tmp directory (cd/home/tmp) tar-zxvf httpd-2.2.13.tar.gz cd httpd-2.2.13. /configure -- prefix =/usr/local/apache2 -- enable-so -- enable-rewrite -- enable-auth-digest = shared -- enable-ssl -- enable-deflate make history make install cp /usr/local/apache2/bin/apachectl/etc/init. d chmod 755/etc/init. d/apachectl/usr/local/apache2/bin/apachectl start php installation cd/home/tmp tar-xzf php-5.3.0.tar.gz cd php-5.3.0. /configure -- prefix =/usr/local/php \ -- with-apxs2 =/usr/local/apache2/bin/apxs \ -- with-mysql =/usr/local/mysql \ -- -pdo-mysql \ -- with-zlib \ -- with-libxml-dir \ -- with-xsl \ -- enable-mbstring \ -- enable-zend-multibyte \ -- enable-sockets \-- enable-soap \ -- enable-zip
Linux mysql
Make install modify apache httpd. conf (apache/conf/httpd. conf) to add the following parts: LoadModule php5_module modules/libphp5.so AddType application/x-httpd-php. php
Cp php. ini-development/usr/local/php/lib/php. ini/usr/local/apache2/bin/apachectl start/usr/local/apache2/bin/apachectl stop/usr/local/apache2/bin/apachectl start attachment: linux mysql allows remote connection
/Usr/local/mysql/bin/mysql-u root-p (enter mysql) use mysql; SELECT 'host', 'user' FROM User; UPDATE user SET 'host' = '%' WHERE 'user' = 'root' LIMIT 1; flush privileges; Be sure to enter ";" in the mysql command line format ";". v can be made after configure.
Linux mysql
Make install note that the full path of pdo_mysql is:
/Usr/local/php/lib/php/extensions/debug-non-zts-20060613/pdo_mysql.so
Then in/usr/local/lib/php. ini
Add the following sentence:
Extension =/usr/local/php/lib/php/extensions/debug-non-zts-20060613/pdo_mysql.so
Restart apache and you will see that pdo_mysql has been loaded successfully.
Mysql is installed in ubuntu7.10. By default, only local access is allowed. You need to enable the user permission and bind it to mysql.
1. Open the user permission under the command line: grant all privileges on drupal. * to user@192.168.1.80 identified by 'user-password ';
On the administrator interface, you can add host-> any host through user management to add access permissions (by default, root users can only access the local machine, and new users can remotely)
2. Cancel the mysql local binding:
Edit/etc/mysql/my. cnf
# Instead of skip-networking the default is now to listen only on
# Localhost which is more compatible and is not less secure.
Bind-address = 127.0.0.1
Annotate "bind-address = 127.0.0.1"
Sudo/etc/init. d/mysql restart Remote Access