Update Source list
The shortcut key "Ctrl+alt+t" opens "Terminal terminal Window", enter "sudo apt-get update" and "Enter the root user's password"--return, you can.
As shown:
If you do not run the command and install MySQL directly, a "few packages cannot be downloaded, you can run the Apt-get update------" error message, causing the installation to fail.
As shown:
Install MySQL
Input "sudo apt-get install mysql-server mysql-client"-Enter
Wait until "Do you want to continue", enter "Y"--and return
Enter the database MySQL root "root" user's password (Administrator password) in the "Package Configuration" dialog box and return
Confirm password in the re-enter password once, enter, the installation is complete.
After the installation is complete, use the command "sudo service mysql restart" To verify that the installation is successful and the following output is successful
---------------------------------------------------------------------------Split Line------------------------------------------- ---------------------------
Let Apache support MySQL
First enter "sudo stop MySQL" to stop MySQL running, and then
Enter "sudo apt-get install Libapache2-mod-auth-mysql"-----the installation is successful and Apache will support MySQL after installing this module.
--------------------------------------------------------------------------------------------------------------- ---------------------------------------------
Some simple management of MySQL:
Start MySQL service: sudo start MySQL
Stop MySQL service: sudo stop MySQL
Modify the administrator password for MySQL: sudo mysqladmin-u root password newpassword
Set up remote access (normally, the 3306 port that MySQL occupies is only listening on IP 127.0.0.1, denying access to other IPs (Netstat can see it). Cancel the local supervisor
Listen to the need to modify the My.cnf file:):
sudo vi/etc/mysql/my.cnf
Bind-address = 127.0.0.1//Find this content and comment
MySQL post-installation directory structure analysis (this structure is only for use of Apt-get Install on-line installation):
Database storage directory:/var/lib/mysql/
Related configuration file directory:/usr/share/mysql
Related Command Storage directory:/usr/bin (mysqladmin mysqldump, etc.)
Startup footstep Storage directory:/etc/rc.d/init.d/
Installing and configuring MySQL in VMware virtual machine Ubuntu14.04