What mysql commands are commonly used in linux? The following lists some common mysql commands. If you are interested in common mysql commands, take a look.
1. commands for starting mysql in linux:
Mysqladmin start
/Ect/init. d/mysql start (the installation path of mysql is earlier)
2. Command for restarting mysql in linux:
Mysqladmin restart
/Ect/init. d/mysql restart (the installation path of mysql is earlier)
3. Run the following command to disable mysql in linux:
Mysqladmin shutdown
/Ect/init. d/mysql shutdown (the installation path of mysql is earlier)
4. Connect to mysql on the local machine:
Enter the mysql \ bin directory, type the mysql-uroot-p command, and press enter to enter the password.
Exit mysql command: exit and press Enter)
5. Modify the mysql password:
Mysqladmin-u username-p old password New password
Or enter the mysql command line set password for root = PASSWORD ("root ");
6. Add new users. Note: commands in the mysql environment are followed by a semicolon as the command Terminator)
Grant select on database. * to username @ login host identified by "password"
For example, if a user's test password is added to 123, the user can log on to any host and have the permission to query, insert, modify, and delete all databases. First, use the root user to connect to mysql, and then type the following command:
Grant select, insert, update, delete on *. * to "Identified by" 123 ";
Nine common mysql commands
How to add new fields in MYSQL
Common MySQL auto-increment Fields
Mysql character encoding method
Statement for modifying fields in mysql