Linux Yum Command Reload MySQL

Source: Internet
Author: User

If the RPM installation, you can use RPM-E mysql-server

If Yum is installed, you can remove the MySQL installation folder with Yum Remove mysql*

Then use yum to install MySQL:

1. See what installation packages are available for MySQL: Yum list mysql* 2, installing MySQL client: Yum install MySQL 3, installing MySQL server side: Yum Install Mysql-server Yum Install Mysql-devel Start && Stop  Database Character Set settings:          MYSQL configuration file/etc/my.cnf add default-character-set=utf8  Start the MySQL service:          service mysqld start or/etc/init.d/mysqld start  boot up:    & nbsp     Chkconfig-add mysqld to see if boot boot settings are successful chkconfig--list | grep mysql*           mysqld             0: Close    1: Off Closed    2: Enable    3: Enable    4: Enable    5: Enable    6: Off   stop:      & nbsp   Service mysqld stop  Create root admin:          mysqladmin-u root password 123456  login: &n Bsp         mysql-u root-p Enter your password to   forget your password:          service mysqld stop & nbsp         Mysqld_safe--user=root--skip-grant-tables           Mysql-u R oot           use mysql          Update user set Password=password ("New_pass") where user= "root";         &NB Sp Flush privileges;  Remote AccessOpen firewall port number MySQL Add permission: The user table in the MySQL library adds a record of host "%" and user as "root". several important directories for Linux MySQL1. Startup script:/etc/init.d/mysqld2, config file:/etc/my.cnf boot failed, error:Fatal Error:can ' t open and Lock Privilege tables:table ' mysql.host ' doesn ' t exist

View logs: Less/var/log/mysqld.log < Log paths can be viewed in/etc/my.cnf >

Fatal Error:can ' t open and Lock Privilege tables:table ' mysql.host ' doesn ' t exist

The reason for the error is that the data catalog inconsistency caused by the reload:

/usr/bin/mysql_install_db--user=mysql--datadir=/var/lib/mysql #在mysql的安装目录下, mine is/usr/bin/.

And then start again, ok!.

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.