Linux Mysql command installation allows remote connection installation setup method _mysql

Source: Internet
Author: User
Tags chmod install php zts mysql command line
And these things, is the novice very confused place. Here is my installation note, which was successfully installed on the CentOS virtual machine. Chinese reference: http://xieyu.blog.51cto.com/213338/59749 English reference to Install MySQL 5.0 on Linux,how to Install PHP 5 on Linux, how T o Install Apache 2 on Linux

Linux mysqlapache PHP installation process. Copy Apache, MySQL, php tar.gz files to the/home/tmp directory. Then execute the following command

Linux MySQL Installation

cd/home/tmp groupadd mysql mysql useradd-g mysql tar-zxvf mysql-5.1.33.tar.gz cd mysql-5.1.33./configure--prefix=/usr /local/mysql make make install cd/usr/local/mysql chown-r root. Bin/mysql-u root-p chgrp-r MySQL. (Note that there is a.) cd/home/tmp CD mysql-5.1.33 ln-s/usr/local/mysql//usr/local/mysql CP Supp ORT-FILES/MY-SMALL.CNF/ETC/MY.CNF Modify MY.CNF Add 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 on/usr/local/mysql/bin/mysql_install_db--user=mysql/usr/local/mysql/bin/mysql-u Root (if you can enter the MySQL command line, the 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, please go to the/home/tmp directory (cd/home/tmp) tar-zxvf httpd-2.2.13.tar.gz CD httpd-2.2.13./configure Apache2--enable-so--enable-rewrite--enable-auth-digest=shared--enable-ssl--enable-deflate make history 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-ap XS2=/USR/LOCAL/APACHE2/BIN/APXS \--with-mysql=/usr/local/mysql \--with-pdo-mysql \--with-zlib \--with-libxml-dir \- -with-xsl \--enable-mbstring \--enable-zend-multibyte \--enable-sockets \--enable-soap \--enable-zip
Linux MySQL

Make install modifies the Apache httpd.conf (apache/conf/httpd.conf) to add the following: LoadModule php5_module modules/libphp5.so 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: Linux mysql allows remote connections

/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; Note that you must enter ";" under the MySQL command line form. V after configure, you can make it.
Linux MySQL
Make install note the full path of the Pdo_mysql, and mine is:
/usr/local/php/lib/php/extensions/debug-non-zts-20060613/pdo_mysql.so
And then in/usr/local/lib/php.ini
Add a sentence:
Extension=/usr/local/php/lib/php/extensions/debug-non-zts-20060613/pdo_mysql.so
Restart Apache to see that the Pdo_mysql has been loaded successfully.



MySQL installation in ubuntu7.10, the default is only local access, you need to open user rights and MySQL native binding
1, open the user right under the command line: Grant all privileges on drupal.* to user@192.168.1.80 identified by ' User-password ';
In the Administrator interface, you can add access rights through the user admin Add Host->any host (the root user can only access this computer by default, and the newly added user can be remote)
2. Cancel MySQL Native binding:
Edit/ETC/MYSQL/MY.CNF
# Instead of skip-networking The default is now to listen only
# localhost which are more compatible and are not less secure.
Bind-address = 127.0.0.1
Add the "bind-address = 127.0.0.1" annotation
Sudo/etc/init.d/mysql Restart restart for remote access
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.