Minimalist Create MySQL Database

Source: Internet
Author: User

#以下这条命令是解决云模板中的MariaDB与MySQL相关软件包冲突问题

Yum Remove mariadb*-y

#安装启动MySQL数据库服务器

Yum Install Mysql-server-y

#如果使用的是MariaDB, the following command changed to service MySQL start

Service MySQLd start

#设置数据库管理员初始密码为password

MySQLadmin -u root password ' password '

#开启防火墙数据库相关端口

Iptables-i input-p TCP--dport 3306-j ACCEPT

Service Iptables Save

#如果使用的是MariaDB, the following command changes to Chkconfig MySQL on

Chkconfig mysqld on

Connection failed using MySQL tool:

1130-host isn't allowed to connect to this MySQL server

Remote connection is not turned on  

Solution:

#使用root登录mysqlmysql-uroot-ppassword>use MySQL; #更改user表 >update user Set host = '% ' where user = ' root '; #验证结果 >sel ECT host, user from user;+-----------+------+| Host      | user |+-----------+------+|%         | root | | 127.0.0.1 | root | | centos |      | | centos | root | | localhost |
   |+-----------+------+5 rows in Set (0.00 sec)

  

Minimalist Create MySQL Database

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.