Linux Getting Started (quad) Linux run environment MySQL detailed operation

Source: Internet
Author: User
Tags install php

1.1 Install MySQL (in the middle you need to set the database password)

sudo apt-get install Mysql-server
sudo apt-get install php5-mysql #安装php5-mysql is to connect PHP with MySQL, install PHP before installation.

1.2 Confirm the MySQL installation information according to the installation directory, this command is different from the teaching video

Cat/etc/php5/mods-available/mysql.ini     //php5.0

1.3 appears cat:/etc/php5/conf.d/mysql.ini:no such file or directory description is not loaded properly, you need to execute the following command.

[Email protected]:~$ sudo apt-get install Php-mysql

2.1 MySQL Related commands

sudo service MySQL restart  #重启mysqlsudo start mysql #手动的话这样启动sudo stop MySQL #手动停止
Pgrep mysqld #如果mysql已经开启, the MySQL run ID will be returned
Mysql-u root-p #登陆mysql, you need to enter a password

Linux Getting Started (quad) Linux run environment MySQL detailed operation

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.