91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

centos6.9使用二進制包安裝mysql5.7

發布時間:2020-06-29 23:15:08 來源:網絡 閱讀:2044 作者:飛天喜羊羊 欄目:MySQL數據庫

[toc]

官方文檔:

https://dev.mysql.com/doc/refman/5.7/en/binary-installation.html

安裝步驟:

1、下載并解壓下載的二進制包

tar -xvf mysql-5.7.20-linux-glibc2.12-x86_64.tar
tar xvf mysql-5.7.20-linux-glibc2.12-x86_64.tar.gz

2、移動解壓包到/usr/local 下,并改名為mysql5.7

[root@credithwsx mysql]# mv mysql-5.7.20-linux-glibc2.12-x86_64 /usr/local/mysql5.7

3、安裝依賴包(MySQL依賴于libaio 庫 和numactl)

yum install libaio
yum install numactl

4、要安裝和使用MySQL二進制發行版,命令序列如下所示:

shell> groupadd mysql
shell> useradd -r -g mysql -s /bin/false mysql shell> cd /usr/local shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql shell> mkdir mysql-files shell> chown mysql:mysql mysql-files
shell> chmod 750 mysql-files
shell> bin/mysqld --initialize --user=mysql shell> bin/mysql_ssl_rsa_setup
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server

5、初始化數據庫與密碼

[root@credithwsx mysql5.7]# bin/mysqld --initialize --user=mysql

2017-12-19T09:05:32.278790Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-12-19T09:05:32.279930Z 0 [ERROR] Can't find error-message file '/usr/local/mysql/share/errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2017-12-19T09:05:36.374681Z 0 [Warning] InnoDB: New log files created, LSN=45790
2017-12-19T09:05:37.028680Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2017-12-19T09:05:37.182429Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: c73d1bdd-e49b-11e7-be13-525400e66d7c.
2017-12-19T09:05:37.200319Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2017-12-19T09:05:37.204842Z 1 [Note] A temporary password is generated for root@localhost: =cD1U#t

6、修改my.cnf 配置文件,增加basedir和datadir

vim /etc/my.cnf

basedir=/usr/local/mysql5.7/
datadir=/usr/local/mysql5.7/data

7、添加軟鏈接,直接運行mysql就可以打開 mysql命令

[root@credithwsx mysql5.7]# ln -s /var/lib/mysql/mysql.sock /tmp/

[root@credithwsx mysql5.7]# ln -s $(pwd)/bin/mysql /usr/bin

報錯:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

[root@credithwsx mysql5.7]# ps -aux |grep mysql
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root 1830 0.0 0.0 145024 1620 pts/3 S 15:29 0:00 su - mysql
mysql 1831 0.0 0.0 108324 1868 pts/3 S+ 15:29 0:00 -bash
root 1880 0.0 0.0 102104 4044 ? Ss 15:30 0:00 sshd: mysql [priv]
mysql 1885 0.0 0.0 102104 1896 ? S 15:30 0:00 sshd: mysql@pts/5
mysql 1886 0.0 0.0 108324 1896 pts/5 Ss 15:30 0:00 -bash
root 1987 0.0 0.0 145024 1616 pts/2 S 15:55 0:00 su - mysql
mysql 1988 0.0 0.0 108328 1872 pts/2 S 15:55 0:00 -bash
root 2751 0.0 0.0 106220 1580 pts/6 S 17:08 0:00 /bin/sh /usr/local/mysql5.7//bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/credithwsx.pid
mysql 2915 0.2 2.3 1243240 189952 pts/6 Sl 17:08 0:00 /usr/local/mysql5.7/bin/mysqld --basedir=/usr/local/mysql5.7 --datadir=/var/lib/mysql --plugin-dir=/usr/local/mysql5.7/lib/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/lib/mysql/credithwsx.pid --socket=/var/lib/mysql/mysql.sock
root 2952 0.0 0.0 103332 892 pts/6 S+ 17:11 0:00 grep mysql

8、使用密碼連接不了mysql ?

解決方法: 在/etc/my.cnf 中添加 skip-grant-tables 跳過校驗。(#號是注釋)

centos6.9使用二進制包安裝mysql5.7

進入mysql,修改root帳號的密碼,在重新登錄就好。

mysql -u root -p
use mysql;

ALTER USER 'root'@'localhost' IDENTIFIED BY 'ICKLjPVmClvv1XtuCNoXXXXXXXXX';

如果上述操作不可行,視情況使用:
update user set authentication_string=PASSWORD('newpass') where User='root';

ALTER USER 'root'@'localhost' IDENTIFIED BY 'ICKLjPVmClvv1XtuCNoXXXXXXXX';

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

鸡东县| 图木舒克市| 秦皇岛市| 陆川县| 桂林市| 南澳县| 通许县| 藁城市| 罗山县| 浪卡子县| 富裕县| 岐山县| 柘荣县| 金堂县| 宽城| 汪清县| 抚州市| 舞阳县| 安泽县| 白城市| 筠连县| 六盘水市| 沾益县| 环江| 晴隆县| 衡阳市| 红安县| 石城县| 榆树市| 临漳县| 镇雄县| 大石桥市| 安新县| 麻城市| 新闻| 安陆市| 威宁| 高要市| 江孜县| 陵川县| 遵义市|