Linux system installed in mysql Hi, and remote method invocation connectivity solutions mysql is not on.

step:

1) Check CentOS comes with mysql

Enter the rpm -qa | grep mysql

2) The built-in uninstall mysql

3) Upload Mysql installation package to linux

4) mounted reliance mysql (but not necessary)

yum -y install libaio.so.1 libgcc_s.so.1 libstdc++.so.6

yum  update libstdc++-4.4.7-4.el6.x86_64

5) unzip to Mysql / usr / local / mysql directory under (mysql directory needs to be created manually) within

cd /usr/local

mkdir mysql

tar -xvf MySQL-5.6.22-1.el6.i686.rpm-bundle.tar -C /usr/local/mysql

6) is mounted mysql in / usr / local / mysql

Installation server: rpm -ivh MySQL-server-5.6.22-1.el6.i686.rpm

Install the client: rpm -ivh MySQL-client-5.6.22-1.el6.i686.rpm

7) Start mysql

service mysql start

8) The mysql service to the system and set boot

Added to the system service: chkconfig --add mysql

Automatic start: chkconfig mysql on

9) Log mysql

After mysql installed will generate a random password temporary storage location in /root/.mysql_secret run command after finding temporary password

msyql –u root -p

10) Modify the mysql password

set password = password ( 'root'); brackets is the password that you want to set.

 

Remote access solutions can not.

The reason: By default mysql For safety reasons, do not support remote login mysql, you need to set permissions to open a remote login mysql

After logging in mysql enter the following command:

grant all privileges on *.* to 'root' @'%' identified by 'root';

flush privileges;

The reason: there is no open port 3306

/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT

/etc/rc.d/init.d/iptables save --- will be permanently saved to modify firewall

Guess you like

Origin www.cnblogs.com/hnwxp/p/11372065.html