1. 程式人生 > >安裝MYSQL資料庫

安裝MYSQL資料庫

MYsql linux apache java php Sql sever windows IIS C#.net ASP asp.net 1.準備 安裝檔案:mysql57-community-release-el7-9.noarch.rpm 下載地址:wget http://repo.mysql.com/mysql57-community-release-el7-9.noarch.rpm 安裝源:rpm -ivh mysql57-community-release-el7-9.noarch.rpm yum makecache [[email protected]

:~]#rpm -qa|grep mariadb mariadb-libs-5.5.52-1.el7.x86_64 ( 複製) mariadb-5.5.52-1.el7.x86_64 mariadb-server-5.5.52-1.el7.x86_64 解除安裝舊資料庫 [[email protected]:~]#rpm -e –nodeps mariadb-libs-5.5.52-1.el7.x86_64(貼上) [[email protected]:~]#rpm -e –nodeps mariadb-5.5.52-1.el7.x86_64 [[email protected]
:~]#rpm -e –nodeps mariadb-server-5.5.52-1.el7.x86_64 [[email protected]:~]#rpm -qa|grep mariadb 2.安裝mysql5.7 [[email protected]:~]#yum install mysql-server Mysql-server-comminity-70w mysql-community-server x86_64 5.7.21-1.el7 mysql-community-client x86_64 5.7.21-1.el7 mysql-community-common x86_64 5.7.21-1.el7 mysql-community-libs x86_64 5.7.21-1.el7 3.啟動配置mysql5.7 [
[email protected]
:~]#rpm -qa|grep mysql [[email protected]:~]#systemctl start mysqld [[email protected]:~]#systemctl status mysqld VI /etc/my.cnf 尾加入 skip-grant-tables (無密碼登入) [[email protected]:~]#systemctl restart mysqld [[email protected]:~]#mysql –u root –p Enter password : 回車(空密碼) Mysql> use mysql (SQL指令:開啟資料庫MYSQL)