Ubuntun Download and install MySQL

Source: Internet
Author: User

1, download MySQL

sudo apt-get update
sudo apt-get Install Mysql-server
Enter the password for root during the download process

2. Turn off MySQL and open MySQL

sudo service MySQL statussudo service MySQL stopsudo service MySQL start

3, after the installation of the operation:

Database directory:/var/lib/mysql/ configuration file:/usr/share/mysql (Command and configuration file),/etc/MySQL (e.g. my.cnf) related commands:/usr/ Bin (mysqladmin mysqldump and other commands) and/usr/sbin startup script:/etc/init.d/mysql (startup script file mysql directory)

#服务启动后端口查询sudo NETSTAT-ANP | grep MySQL
#连接数据库mysql-H 127.0.0.1-p 3306-uroot-p123456#-h is the port number for the remote ip,-p,-U is the user name,-p is the password

4, uninstall

#首先使用以下命令删除MySQL服务器: sudo apt-get Remove mysql-server then, remove any additional software that is automatically installed with the MySQL server: sudo apt-get  Autoremove Uninstalling other components: sudo apt-get Remove <<package-name>>-L | grep MySQL | grep II

Ubuntun Download and install MySQL

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.