Linux Enterprise Server Configuration scenario: the integration of Apache, PhP3, MySQL

Source: Internet
Author: User
Keywords Mysql linux apache Enterprise Server PHP3
Tags .gz apache code configuration create data directory enterprise

One, the required installation package

Apache_1.3.19.tar.gz
Php-4.0.4.tar.gz
Mysql-3.23.32.tar.gz
Note: All of the above are source code rather than RPM package

Second, the Software installation

1. Install MySQL

(1) Unpack the package

Cd/usr/local
TAR-ZVXF mysql-3.23.32.tar.gz

(2) Move the resulting mysql-3.23.32 directory to/usr/local/mysql

MV Mysql-3.23.32/usr/local/mysql

(3) Compiling MySQL

Cd/usr/local/http://www.aliyun.com/zixun/aggregation/33.html ">mysql
./configure--prefix=/usr/local/mysql
Make
Make install

(4) Installation of database files

/usr/local/mysql/scripts/mysql_install_db
/usr/local/mysql/bin/safe_mysqld &

(5) MySQL authorization operation

MySQL's access control technology is powerful and more flexible than postgres. MySQL uses username and password encryption algorithms that are not the same as UNIX systems, and their username can be up to 16 characters long.
First log in to MySQL as root, and then type grant all privileges in *.* to thj@localhost identified by ' thj ' with GRANT option under the MySQL prompt. This way, no matter where the user thj from to the server can use MySQL.

(6) MySQL database simple operation statement

Creating a Database
Command: Create database name;
Delete Database
Command: drop database name;
Find out what databases are in MySQL
Command: show databases;
Change the database currently in use
Command: Use Tbl_name
Create a datasheet
Command: CREATE TABLE Tbl_name (COLUMN_SPECS);
Description: Tbl_name data table name column_specs table column
Query the structure of the specified data table
Command: Describe Tbl_name;
What data tables are in the query database
Command: Show tables;
Add new record
Command: INSERT into Tbl_name (col_name1,col_name2,...) VALUES (Values1,values2,....)
Description: Insert statement is easy to use, but it also has a flaw that only one record can be inserted at a time.
Bulk load Data
Command: Load Data local infile "filename.txt" into table tbl_name;
Description: MySQL version must not be less than 3.22.15, otherwise the load data local does not work. The statement actually invokes the/usr/bin/mysqlimport.
Retrieving information
Command: Select what to select from one or more table where data must meet the conditions
Note: In MySQL, after each command is typed, at the end of the command line, enter ";", the flag is a command, or hit the go after the return, prompting the system to execute the above command; In addition, in most of the reference books on MySQL, the commands are uppercase, and in fact lowercase are also available; The use statement can be without ";", which is the only statement in all MySQL languages that you do not need to add ";"
Note: MySQL installation is over

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.