Install mysql using yum in linux

Source: Internet
Author: User
Tags mysql update


Use yum in linux to install mysql 1. Check whether the installation has been installed: yum list installed mysql * rpm-qa | grep mysql * check whether there is an installation package: yum list mysql * install the mysql client: yum install mysql server: yum install mysql-server yum install mysql-devel www.2cto.com 2. Start & stop database Character Set set mysql configuration file/etc/my. add default-character-set = utf8 to cnf to start mysql service: service mysqld start or/etc/init. d/mysqld start: chkconfig-add mysqld, check whether the startup setting is successful chkconfig -- list | grep Mysql * mysqld 0: Disable 1: Disable 2: Enable 3: Enable 4: Enable 5: Enable 6: Disable stop: service mysqld stop2, log on to create a root administrator: mysqladmin-u root password 123456 www.2cto.com login: mysql-u root-p enter the password. Forgot password: service mysqld stop mysqld_safe -- user = root -- skip-grant-tables mysql-u root use mysql update user set password = password ("new_pass ") where user = "root"; flush privileges; 3. remote access to the port number of open firewall mysql adds permissions: A New host record "%" is added to the user table in the mysql database ", the user is "root ". 4. Several important directories of Linux MySQL: www.2cto.com database directory/var/lib/mysql/configuration file/usr/share/mysql (mysql. server commands and configuration files) related commands/usr/bin (mysqladmin mysqldump and other commands) Start the script/etc/rc. d/init. d/(directory for starting the script file mysql)

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.