标签:iba bsp word mariadb 访问 his bin string table
官方文档地址:https://dev.mysql.com/doc/refman/5.7/en/binary-installation.html
# cd /usr/local/src # wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz
# yum search libaio # yum install libaio
# groupadd mysql # useradd -r -g mysql -s /bin/false mysql
# tar xf mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz # mv mysql-5.7.19-linux-glibc2.12-x86_64 /usr/local/mysql-5.7.19 # ln -s /usr/local/mysql-5.7.19/ /usr/local/mysql
# export PATH=$PATH:/usr/local/mysql/bin # echo "export PATH=$PATH:/usr/local/mysql/bin" >>/etc/profile # source /etc/profile
# cd /usr/local/mysql # mkdir mysql-files # chown -R mysql.mysql mysql-files/ # chmod 750 mysql-files/ # ./bin/mysqld --initialize --user=mysql # ./bin/mysql_ssl_rsa_setup
# mkdir /var/log/mariadb/ # touch /var/log/mariadb/mariadb.log # chown -R mysql.mysql /var/log/mariadb/mariadb.log # mkdir /var/run/mariadb/ -p # touch /var/run/mariadb/mariadb.pid # chown -R mysql.mysql /var/run/mariadb/
# cp support-files/mysql.server /etc/init.d/mysqld # chmod +x /etc/init.d/mysqld
# /etc/init.d/mysqld start
[root@db01-36 ~]# head /etc/my.cnf [mysqld] skip-grant-tables #在my.cnf配置键的[mysqld]下添加skip-grant-tables
/etc/init.d/mysqld restart
mysql -S/var/lib/mysql/mysql.sock
update mysql.user set authentication_string=password(‘新密码‘) where user=‘root‘ and Host = ‘localhost‘;
[root@db01-36 ~]# head /etc/my.cnf [mysqld] #skip-grant-tables #删除或者用#号注释都可以
mysql -uroot -p新密码 -S/var/lib/mysql/mysql.sock
mysql> show databases; ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. #查看数据库时报错
mysql> set password for ‘root‘@‘localhost‘=password(‘新密码‘); #新密码和前面设置的新密码要一致
mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | +--------------------+ 发现已经可以正常访问了!!!
再往后根据自身的需求作下数据库的优化就可以使用了!!!
标签:iba bsp word mariadb 访问 his bin string table
原文地址:https://www.cnblogs.com/hei-ma/p/9505509.html