.12-1.el6.x86_64.rpm-bundle.tar解壓
tar -xf mysql-5.7
.12-1.el6.x86_64.rpm-bundle.tar
解壓完成後由這麼幾個檔案:
mysql-community-client-5.7.12-1.el6.x86_64.rpm
mysql-community-common-5.7.12-1.el6.x86_64.rpm
mysql-community-devel-5.7.12-1.el6.x86_64.rpm
mysql-community-embedded-5.7.12-1.el6.x86_64.rpm
mysql-community-embedded-devel-5.7.12-1.el6.x86_64.rpm
mysql-community-libs-5.7.12-1.el6.x86_64.rpm
mysql-community-libs-compat-5.7.12-1.el6.x86_64.rpm
mysql-community-server-5.7.12-1.el6.x86_64.rpm
mysql-community-test-5.7.12-1.el6.x86_64.rpm
依次執行安裝:
rpm -ivh mysql-community
-common
-5.7
.12-
1.el6.x86_64.rpm
rpm -ivh mysql-community
-server
-5.7
.12-
1.el6.x86_64.rpm
......
啟動mysql:
/etc/init.d/mysqld start
檢視mysql目錄:
ps aux|grep mysql
出現如下:
root 5688
0.00.0
113224
3080 pts/0
s 09:350
:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib
/mysql --socket=/var
/lib/mysql
/mysql.sock --pid-file=/var
/run/mysqld
/mysqld.pid --basedir=/usr --user=mysql
mysql 5886
0.02.3
1932112
181040 pts/0
sl 09:350
:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var
/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log
/mysqld.log --pid-file=/var
/run/mysqld
/mysqld.pid --socket=/var
/lib/mysql
/mysql.sock
進入mysql安裝目錄:
cd /var/lib/mysql
檢視mysql預設密碼:
grep
"password" /var/log/mysqld.log
查詢如下語句:a temporary password is generated for root@localhost: fqk2wwh&yrct
最末尾就是預設初始密碼
登入mysql:
/var/lib/mysql/mysql -u root -p
重設密碼:
set password = password('123456');
set
global validate_password_policy=0; //設定安全級別
setglobal validate_password_length=6; //預設密碼長度為8,可以設定為其它值,最小4位
設定新密碼:
set password = password('123456');
賦所有許可權:
grant
allprivileges
on *.* to
'root' identified by
'123456'
with
grant
option;
flush privileges;
ok,可以訪問了! Linux 下 Mysql 5 7 的安裝
mysql 5.7 的安裝 原始碼安裝mysql 安裝cmake 3.2.1.tar.gz ncurses 5.9.tar.gz bison 3.0.4.tar.gz 這三個依賴包 download cd boost 1 59 0 bootstrap.sh b2 install rm f cmake...
Linux下Mysql5 7的安裝
wget2 將mysql安裝到 usr local mysql下 解壓 tar xvf mysql 5.7.22 linux glibc2.12 x86 64.tar.gz 移動 mv mysql 5.7.22 linux glibc2.12 x86 64 usr local 重新命名 mv usr...
linux系統下 安裝mysql57
1.安裝mwget wget tar jxvf mwget 0.1.0.orig.tar.bz2 yum install bzip2 bzip2 d mwget 0.1.0.orig.tar.bz2 然後再使用 tar jxvf mwget 0.1.0.orig.tar.bz2就能順利解壓 2.執行...