Liunx under MySQL installation using

Source: Internet
Author: User

#1. Stop the MySQL database
/etc/init.d/mysqld stop
#2. Execute the following command
Mysqld_safe--user=mysql--skip-grant-tables--skip-networking &
#3. Log in to the MySQL database using root
Mysql-u Root MySQL
#4. Update the root password
mysql> UPDATE user SET Password=password (' NewPassword ') where user= ' root ';
#5. Refresh Permissions
mysql> FLUSH privileges;
#6. Quit MySQL
Mysql> quit
#7. Restart MySQL
/etc/init.d/mysqld restart
#8. Log back in to MySQL with the root user
Mysql-uroot-p
Enter Password: < Enter the newly set password newpassword>


MySQL Installation
Installation
RPM-IVH mysql-community-common-5.7.10-1.el6.x86_64.rpm--force--nodeps
RPM-IVH mysql-community-libs-5.7.10-1.el6.x86_64.rpm--force--nodeps
RPM-IVH mysql-community-client-5.7.10-1.el6.x86_64.rpm--force--nodeps
RPM-IVH mysql-community-server-5.7.10-1.el6.x86_64.rpm--force--nodeps

Start
Service mysqld Start
Stop it
Service Mysqld Stop

Start with Safe mode
Mysqld_safe--user=mysql--skip-grant-tables--skip-networking&
MySQL/** into MySQL interactive window *
UPDATE mysql.user SET authentication_string=password (' root ') where user= ' root ';
There is no password field in the Version user table after/*5.7 */
Flush privileges;
Exit
Exit Safe Mode:
Service Mysqld Stop

Modify the MySQL encoding while changing the password security level:
Vi/etc/my.cnf

# Reset Pass Level
Validate_password_policy = 0
Validate_password_length = 1
Validate_password_mixed_case_count = 0
Validate_password_number_count = 0
Validate_password_special_char_count = 0

Character_set_server=utf8
Default-storage-engine=innodb
Collation-server=utf8_general_ci

[Client]
Default-character-set=utf8


Start
Service mysqld Start
Join boot Start
Chkconfig mysqld on
Mysql-uroot-p

Execute SQL command
SET PASSWORD = PASSWORD (' root ');
Flush privileges;

Use MySQL;
Delete from user;
Authorized
GRANT all privileges on * * to ' root ' @ ' localhost ' identified by ' root ' with GRANT OPTION; local
GRANT all privileges on * * to ' root ' @ '% ' identified by ' root ' with GRANT OPTION;
Remote
Refresh Permissions
Flush privileges;

To create a hive connection user:
Mysql-uroot-proot
Create DATABASE hive DEFAULT CHARSET UTF8 COLLATE utf8_general_ci;
Authorizing local connections:
GRANT all privileges the hive.* to ' hive ' @ ' localhost ' identified by ' hive ' with GRANT OPTION;
Authorizing remote connections:
GRANT all privileges the hive.* to ' hive ' @ ' percent ' identified by ' hive ' with GRANT OPTION;
Submit:
FLUSH privileges;

Liunx under MySQL installation using

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.