sudo password create a new root password:
1, open the terminal with the current login user, in the terminal input command sudo passwd, enter the current user's password and then return
2, will be prompted to enter a new password, enter the completion of the return (http://www.linuxidc.com/Linux/2014-04/100489.htm)
3. Then prompt to enter a new password again to confirm, then enter, set the success
1 [email protected]:~$ sudo passwd234 passwd: Successfully updated password 5 [email protected]:~$ su67
Note: This new password is the root password, which can be different from the current user's password.
Enter SU root in the terminal and enter the root password to verify the success of the switch to the root user. After the root user has finished the operation, the Exit command can be used to exit the root user and return the current logged-on user.
Install MySQL under ubuntu (https://www.2cto.com/database/201401/273423.html)
1) First check if MySQL is installed in the system
input sudo netstat-tap in terminal | grep mysql
If not reflected, the installed results are not displayed and are not installed. If shown below, you have installed
2) If it is not installed, install MySQL.
In terminal input sudo apt-get install mysql-server mysql-client
The results of the operation are as follows:
During this installation, you will be asked to enter the password for the root user (managing MySQL database user, non-linux system user), as required. As shown below:
3) test whether the installation was successful:
In terminal input sudo netstat-tap | grep MySQL
The installation succeeds if the following result is present:
4) You can also log in to MySQL test
in the terminal input Mysql-uroot-p next will prompt you to enter the password, enter the correct password, you can enter. As shown below:
5) 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). To cancel the local listener, modify the My.cnf file:):
sudo vi/etc/mysql/my.cnf
Bind-address = 127.0.0.1//Find this content and comment
6) MySQL post-installation directory structure analysis (this structure is only for the use of Apt-get install online 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/
7) MySQL graphical management software
Generally used there are two better, an open source, a commercial charge:
Open Source: MySQL Workbench (Specific usage introduction as I use, I will slowly summarize)
Business: Navicat (chargeable, 30 days experience, then I believe that everyone will have a way)
At this point, the installation and configuration of MYQL under Linux (Ubuntu) is complete.
Thank for reading!
Ubuntu under root and install MySQL