13.1 Settings Change root password 13.2 connection mysql13.3 MySQL common commands

Source: Internet
Author: User
Tags clear screen


13.1 Setting Change root password

See if MySQL has a boot, start it without booting

Add MySQL to the variable path, and then run MySQL uroot to execute the

If you want the variable to take effect permanently, join/etc/profile.
Vi/etc/profile

Set Password mysqladmin-uroot password ' 789159 '
Run MySQL Uroot will not be able to login, need to add-p, run MySQL uroot-p can log on

Change Password

There is a situation do not know the password, you can cancel the authorization, without the user name and password can be landed
vi/etc/my.cnf//Increase Skip-grant

Restart the service after you have finished modifying
/etc/init.d/mysqld restart
You can just log in.

Need to change a table after landing
Enter use MySQL to enter MySQL library and then go
Enter update user set Password=password (' Aminglinux ') where user= ' root '; Change Password to Aminglinux

vi/etc/my.cnf//Remove Skip-grant

Restart Service/etc/init.d/mysqld Restart
Re-Login

13.2 Connecting MySQL

13.3 MySQL Common commands


It also has a document that records the command history
In the root directory. Mysql_history
Also support ctrl+l clear screen

drop table T1 is to delete T1 tables
Show Processlist; This command is used more.

Extended
mysql5.7 Root Password Change http://www.apelearn.com/bbs/thread-7289-1-1.html
MyISAM and InnoDB engine contrast http://www.pureweber.com/article/myisam-vs-innodb/
MySQL Configuration detailed: http://blog.linuxeye.com/379.html
MySQL Tuning: http://www.aminglinux.com/bbs/thread-5758-1-1.html
Personal MySQL tuning experience shared by classmates: http://www.apelearn.com/bbs/thread-11281-1-1.html

13.1 Settings Change root password 13.2 connection mysql13.3 MySQL common commands

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.