Configuration and use of Apache PHP MySQL under Linux

Source: Internet
Author: User

Installation Environment:

deepin:2014.3 Desktop Edition

Install with lamp Integration pack, install command: sudo apt-get install lamp^

The installation package is installed APACHE2+PHP5+MYSQL5

To install phpMyAdmin, use the command sudo apt-get install phpMyAdmin

1, about the Apache installation directory

Reference connection: http://blog.csdn.net/yusiguyuan/article/details/9566437

2, about the configuration of Apache problem

2.1: Modify the Listening port

Modify the listening port number in the etc/apache2/port.conf and reboot.

3. Some questions about MySQL

MySQL's installation directory structure

Database directory:/var/lib/mysql/

Configuration file:/usr/share/mysql (mysql.server command and configuration file)

Related commands:/usr/bin (mysqladmin, mysqldump, etc.) (*mysql a Safe Boot method:/usr/bin/mysqld_safe--user=root &)

Startup script:/etc/rc.d/init.d/

3.1 First time start

Startup directory is/usr/bin

First time access to command

Using the command/usr/bin/mysqladmin-u root password yourpassword

If the system prompts

Mysqladmin:connect to server at ' localhost ' failed
Error: ' Access denied for user ' root ' @ ' localhost ' (using Password:no) '

It means you don't have a password when you install it.

Use the command/usr/bin/mysqladmin-u root to go directly to MySQL

3.2 Changing the root password

Mysql-u root-p

Prompt for password after enter

3.3 Modifying user passwords

Mysqladmin-u username-p Old password password new password
or go to MySQL command line set PASSWORD for Root=password ("root");

3.3 New users

3.4 Stop starting MySQL

[[email protected]/] #service MySQL stop;

[[email protected]/] #service MySQL start;

Configuration and use of Apache PHP MySQL under Linux

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.