mysql8.0.11瀹夎銆佸惎鍔ㄤ笌鍩烘湰璁剧疆
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql8.0.11瀹夎銆佸惎鍔ㄤ笌鍩烘湰璁剧疆相关的知识,希望对你有一定的参考价值。
鏍囩锛?a href='http://www.mamicode.com/so/1/oba' title='oba'>oba
sys log 淇敼 rem community and gre SQL_error姝ゆ婕旂ず鐨勬槸mysql 8.0.11鐨勫畨瑁呫€佸惎鍔ㄤ笌鍩烘湰璁剧疆銆? 涓嬭浇mysql-8.0.11-el7-x86_64.tar.gz
1銆佽В鍘嬪苟閲嶅懡鍚?br/>[[email protected] ~]# cd /data
[[email protected] data]# ls
mysql-8.0.11-el7-x86_64.tar.gz
[[email protected] data]# tar -zxf mysql-8.0.11-el7-x86_64.tar.gz
[[email protected] data]# mv mysql-8.0.11-el7-x86_64 mysql
2銆佸垱寤簃ysql鐢ㄦ埛
[[email protected] data]# useradd -M -s /sbin/nologin mysql
3銆佸垵濮嬪寲鏁版嵁搴?br/>[[email protected] data]# cd mysql/
[[email protected] mysql]# ./bin/mysqld --initialize --user=mysql --datadir=/data/mysql/data
2018-04-26T03:06:01.637456Z 0 [Warning] [MY-011070] [Server] 鈥楧isabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it鈥?is deprecated and will be removed in a future release.
2018-04-26T03:06:01.637709Z 0 [System] [MY-013169] [Server] /data/mysql/bin/mysqld (mysqld 8.0.11) initializing of server in progress as process 53030
2018-04-26T03:06:17.384428Z 5 [Note] [MY-010454] [Server] A temporary password is generated for [email protected]: *wbnbphswv8>K*姝や负鏁版嵁搴撳垵濮嬪瘑鐮? 2018-04-26T03:06:26.959938Z 0 [System] [MY-013170] [Server] /data/mysql/bin/mysqld (mysqld 8.0.11) initializing of server has completed
4銆佺紪杈戦厤缃枃浠?br/>[[email protected] mysql]# vim /etc/my.cnf
[client]
port = 3306
socket = /tmp/mysql.sock
[mysqld]
datadir=/data/mysql/data
socket=/tmp/mysql.sock
port=3306
user=mysql
basedir=/data/mysql
symbolic-links=0
[mysqld_safe]
log-error=/data/mysql/data/error.log
pid-file=/data/mysql/data/mysql.pid
5銆佸惎鍔?br/>[[email protected] mysql]# ./bin/mysqld --defaults-file=/etc/my.cnf &
[1] 53216
[[email protected] mysql]# 2018-04-26T03:18:05.050872Z 0 [Warning] [MY-011070] [Server] 鈥楧isabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it鈥?is deprecated and will be removed in a future release.
2018-04-26T03:18:05.051064Z 0 [System] [MY-010116] [Server] /data/mysql/bin/mysqld (mysqld 8.0.11) starting as process 53216
2018-04-26T03:18:06.208674Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2018-04-26T03:18:06.240611Z 0 [System] [MY-010931] [Server] /data/mysql/bin/mysqld: ready for connections. Version: 鈥?.0.11鈥? socket: 鈥?tmp/mysql.sock鈥? port: 3306 MySQL Community Server - GPL.
6銆佹煡鐪嬭繘绋?br/>[[email protected] mysql]# ps aux| grep mysql
qiang 10783 0.0 0.2 165020 4452 pts/0 S+ 14:38 0:00 /data/mysql/bin/mysql -uroot -p
qiang 12866 0.0 0.0 112664 972 pts/1 R+ 15:19 0:00 grep --color=auto mysql
root 14040 0.0 0.0 113252 1528 ? S 8鏈?7 0:00 /bin/sh /data/mysql/bin/mysqld_safe --datadir=/data/mysql/data --pid-file=/data/mysql/data/baobao.pid
mysql 14231 0.3 20.3 1365424 382536 ? Sl 8鏈?7 14:47 /data/mysql/bin/mysqld --basedir=/data/mysq --datadir=/data/mysql/data --plugin-dir=/data/mysql/lib/plugin --user=mysql --log-error=/data/mysql/data/mysql_error.log --pid-file=/data/mysql/data/baobao.pid --socket=/tmp/mysql.sock --port=13306
7銆佽缃惎鍔ㄨ剼鏈?br/>[[email protected] mysql]# cp ./support-files/mysql.server /etc/init.d/mysqld
淇敼鍚姩鍙傛暟
[[email protected] mysql]# vi /etc/init.d/mysqld
basedir=/data/mysql
datadir=/data/mysql/data
8銆佸叧闂笌鍚姩
鍋滄
[[email protected] data]# /etc/init.d/mysqld stop
Shutting down MySQL... SUCCESS!
鍚姩
[[email protected] ~]# /etc/init.d/mysqld start
Starting MySQL.... SUCCESS!
9銆佹暟鎹簱绠€鍗曡缃?br/>[[email protected] mysql]# ./bin/mysql -uroot -p
Enter password: wbnbphswv8>K
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 9
Server version: 8.0.11
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 鈥榟elp;鈥?or 鈥榎h鈥?for help. Type 鈥榎c鈥?to clear the current input statement.
mysql> show databases;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> alter user [email protected] identified by 鈥?23123鈥?
Query OK, 0 rows affected (0.14 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.10 sec)
mysql>
以上是关于mysql8.0.11瀹夎銆佸惎鍔ㄤ笌鍩烘湰璁剧疆的主要内容,如果未能解决你的问题,请参考以下文章