"Linux" installation mysql common configuration

Source: Internet
Author: User

Download MySQL Address

http://dev.mysql.com/downloads/mysql/

Select the following

To see if a MySQL installation package exists

Rpm-qa|grep-i MySQL

Remove MySQL installation package --nodeps Ignore dependencies
RPM-E--nodeps mysql-libs-5.1.61-4.el6.i686

Installing the MySQL server
RPM-IVH mysql-server-5.5.50-1.el6.i686.rpm

Installing the MySQL Client
RPM-IVH mysql-client-5.5.50-1.el6.i686.rpm

--------------------------------------------------------
Configure MySQL initial password
Mysqladmin-uroot Password root

Mysqladmin-u root-p Password 1234

If there is an error in the above configuration

Then use the following methods

[Email protected] mysql]# mysqld_safe--user=mysql--skip-grant-tables--skip-networking &

mysql> UPDATE user SET Password=password (' root ') where user= ' root ';

mysql> FLUSH privileges;

-------------------------------------------------------

Mysql
Change your password after logging in
Set Password=password (' 123 ');

Add to System Services list
Chkconfig--add MySQL

Auto Start
Chkconfig MySQL on

View the auto-start list
Chkconfig

Log in to MySQL

For example, if you want root to connect to a MySQL server from any host using the root password.
GRANT all privileges on * * to ' root ' @ '% ' identified by ' root ' with GRANT OPTION;

If you want to allow users to connect to the MySQL server from a host myuser IP 192.168.1.6 and use MyPassword as the password

GRANT all privileges on * * to ' myuser ' @ ' 192.168.1.3 ' identified by

' MyPassword ' with GRANT OPTION;

Need to refresh to take effect
FLUSH Privileges

Switch to External

Open 3306 Ports
/sbin/iptables-i input-p TCP--dport 3306-j ACCEPT
Save firewall rules
/etc/rc.d/init.d/iptables Save
Refresh Firewall Rules
Service Iptables Save
Service Iptables Restart
All of the above two.

Viewing port opening conditions

/etc/init.d/iptables status

ls | grep mysql File search

The above configuration under centos6.3, I will all the required dependencies have been installed, if there are related errors, please install the appropriate dependent LIB file

"Linux" installation mysql common configuration

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.