Ubuntu install MySQL

Source: Internet
Author: User

If MySQL was installed before the machine, it is best to uninstall the previous content before reinstalling MySQL, otherwise unforeseen problems may occur.

/* * * @author Jenkihuang * @email [email protected] * @version 20150402 *//delete existing MySQL, clean up residual data sudo apt-get autoremove- Purge Mysql-server-5.0sudo apt-get Remove Mysql-serversudo apt-get autoremove mysql-server//This one is important. sudo apt-get remove mysql-common//installing Mysqlsudo apt-get Install mysql-server//login mysqlmysql-uroot-p//Restart mysqlsudo service MySQL restart

After executing the above command, you can log in to the MySQL database locally. However, if the project group is developed by many people, there will be many people connected to the database, so you must modify the database configuration file.

//remote connection to MySQLsudo VI/etc/mysql/my.cnf//Find bind-address = 127.0.0.1//comment out this line, such as: #bind-address = 127.0.0.1//or instead: bind-address = 0.0.0.0//allow any IP access, or specify an IP address yourself. //To restart MySQL:sudo/etc/init.d/MySQL Restart//authorized users can connect remotelyGrant all privileges on *. * to Root@"%"Identified by"123456"with grant option;//Refresh permissions information, set to take effect immediatelyFlush privileges;

Reprint: http://www.jenkihuang.com/experience/2015/04/ubuntu-install-mysql.html

Ubuntu install MySQL

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.