Install MySQL under CentOS, unfortunately the version is only 5.1

Source: Internet
Author: User

Section1Step,YuminstallationMySQL
[Email protected] ~]# yum-y install Mysql-server
Installation Result:
Installed:
Mysql-server.x86_64 0:5.1.73-3.el6_5
Dependency installed:
mysql.x86_64 0:5.1.73-3.el6_5 perl-dbd-mysql.x86_64 0:4.013-3.el6 Perl-dbi.x86_64 0:1.609-4.el6

Section2step, set boot boot
[Email protected] ~]# chkconfig mysqld on

Section3step, startMYSQLService
[[Email protected] ~]# service mysqld start

Section4Steps, SettingsMySQLof theRootUser Set Password
[Email protected] ~]# mysql-u root
Welcome to the MySQL Monitor. Commands End With; or \g.
...... Some lines are omitted
Mysql> select User,host,password from Mysql.user;
To query the user's password, all empty, set the root password to root with the following command
mysql> Set password for [email protected]=password (' root ');
Mysql> exit

Section5step, login with the new password
[Email protected] ~]# mysql-u root-p

Section6steps, basic commands
show databases; To view a database that already exists on the system
Use Databasesname; Select the database you want to use
Drop database databasename; Delete the selected database
Exit//Disconnect from database
Create Database test01; To create a database named Test
Show tables; List the tables under the current database
Other basic additions and deletions using standard SQL

Section 7 Step, open telnet permission

GRANT all privileges on*.* to ' root ' @ '% ' identified by ' root ' with GRANT OPTION;
FLUSH privileges;
Firewall 3306 port is not enabled by default, to remote access, you need to open this port

Open/etc/sysconfig/iptables

Install MySQL under CentOS, unfortunately the version is only 5.1

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.