1. 程式人生 > 其它 >mysql 5.1.69 安裝部署

mysql 5.1.69 安裝部署

mysql 5.1.69 安裝部署

IP
10.3.238.193
#下載安裝 參考https://www.cnblogs.com/cnbp/p/12620825.html
wget https://downloads.mysql.com/archives/get/p/23/file/mysql-5.1.69-linux-x86_64-glibc23.tar.gz
md5sum mysql-5.1.69-linux-x86_64-glibc23.tar.gz

tar -zxvf mysql-5.1.69-linux-x86_64-glibc23.tar.gz 
mv mysql-5.1.69-linux-x86_64-glibc23 /usr/local/mysql5169

groupadd mysql
useradd -g mysql mysql


#初始化
scripts/mysql_install_db --user=mysql --datadir=/data/mysql_3306_bi/var
#啟動
bin/mysqld_safe --defaults-file=/data/mysql_3306_bi/my.cnf --user=mysql &


/bin/sh ./bin/mysqld_safe --defaults-file=/data/mysql_3306_bi/my.cnf --user=mysql
mysql     57195  56963  6  2021 ?        19-11:16:19 /usr/local/mysql5169/libexec/mysqld --defaults-file=/data/mysql_3306_bi/my.cnf --basedir=/usr/local/mysql5169 --datadir=/data/mysql_3306_bi/var --user=mysql --log-error=/data/mysql_3306_bi/var/srv413-m5.err --pid-file=/data/mysql_3306_bi/var/srv413-m5.pid --socket=/data/mysql_3306_bi/var/mysql-3306.sock --port=3306

#更新密碼

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('Hu0fcSpMnWq');

SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('Hu0fcSpMnWq'); #配置使用者密碼

GRANT ALL ON *.* TO root@'%' IDENTIFIED BY 'Hu0fcSpMnWq' WITH GRANT OPTION;


FLUSH PRIVILEGES;