1)
groupadd mysql
useradd -r -g mysql -s /bin/false mysql
cd /usr/local
tar -zxvf XXXX.tar.gz
cd mysql
mkdir mysql-files
chown mysql:mysql mysql-files
chmod 750 mysql-files
bin/mysql --initialize --user=mysql
bin/mysql_ssl_rsa_setup
bin/mysqld_safe --user=mysql &
cp support-files/mysql.server /etc/init.d/mysqld
//service mysqld start
2)
/etc/my.cnf
[mysqld]
bind-address=0.0.0.0
mysql>setpasswordforroot@localhost =password('Shuqi@12345');
Query OK,0rowsaffected,1warning(0.00sec)
usemysql##创建remote用户并且设置密码,且允许远程登录grantallon*.*toremote@'%'Identifiedby'Shuqi@12345';##刷新flushprivileges;
网友评论