真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

mysql-community社區(qū)版安裝

  • 1.安裝MySQL
    rpm -ivh mysql-community-common-8.0.13-1.el7.x86_64.rpm
    rpm -ivh mysql-community-libs-8.0.13-1.el7.x86_64.rpm 
    rpm -ivh mysql-community-client-8.0.13-1.el7.x86_64.rpm 
    rpm -ivh mysql-community-server-8.0.13-1.el7.x86_64.rpm
  • 2.初始化
mysqld --initialize

#獲取密碼
grep "root@localhost" /var/log/mysqld.log |awk -F" " '{print $NF}'
#保存密碼
echo -e "root\t$(grep "root@localhost" /var/log/mysqld.log |awk -F" " '{print $NF}')" >> /root/.mysql_passwd 
  • 3.修改mysql db的charset為utf-8

    成都創(chuàng)新互聯(lián)公司專業(yè)為企業(yè)提供北林網(wǎng)站建設(shè)、北林做網(wǎng)站、北林網(wǎng)站設(shè)計(jì)、北林網(wǎng)站制作等企業(yè)網(wǎng)站建設(shè)、網(wǎng)頁設(shè)計(jì)與制作、北林企業(yè)網(wǎng)站模板建站服務(wù),10多年北林做網(wǎng)站經(jīng)驗(yàn),不只是建網(wǎng)站,更提供有價(jià)值的思路和整體網(wǎng)絡(luò)服務(wù)。

    cat >> /etc/my.cnf <
  • 4.啟動(dòng)后報(bào)錯(cuò),查看日志,修改權(quán)限
#啟動(dòng)
]# systemctl start mysqld
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.

#查看日志,ibdata1沒有寫權(quán)限
vim /var/log/mysqld.log 
2018-12-26T02:51:14.894580Z 1 [ERROR] [MY-012271] [InnoDB] The innodb_system data file 'ibdata1' must be writable
2018-12-26T02:51:14.894641Z 1 [ERROR] [MY-012278] [InnoDB] The innodb_system data file 'ibdata1' must be writable
#修改所有mysql目錄及文件屬主為mysql
chown -R mysql. /var/lib/   mysql*
#再次啟動(dòng),成功
systemctl start mysqld 
#查看狀態(tài)
]# systemctl status mysqld
?.mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2018-12-26 10:57:21 CST; 4min 11s ago
  • 5.數(shù)據(jù)庫管理
-- 創(chuàng)建賬號(hào)、分配權(quán)限
CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost' WITH GRANT OPTION
-- 修改密碼,使數(shù)據(jù)庫可以連接Navicat
ALTER USER 'user'@'%' IDENTIFIED WITH mysql_native_password BY 'password';
-- 刷新權(quán)限
FLUSH PRIVILEGES;
-- 顯示賬號(hào)及權(quán)限相關(guān)信息
SHOW GRANTS FOR 'user'@'localhost'; 
    1. redis安裝
      • https://redis.io/download

當(dāng)前標(biāo)題:mysql-community社區(qū)版安裝
文章網(wǎng)址:http://weahome.cn/article/gidehe.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部