#yum install -y gcc-c++ cmake vim ncurses-devel wget
創新互聯建站專注于通榆企業網站建設,響應式網站設計,商城網站開發。通榆網站建設公司,為通榆等地區提供建站服務。全流程按需網站制作,專業設計,全程項目跟蹤,創新互聯建站專業和態度為您提供的服務
#useradd MySQL -s /home/nologin
#mkdir /soft/mysql,chown mysql:mysql !$
#mkdir /data/mysql,chown mysql:mysql !$
#tar xvf mysql-5.7.18.tar.gz
#cd mysql-5.7.18
#cmake -DCMAKE_INSTALL_PREFIX=/soft/mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_USER=mysql -DMYSQL_TCP_PORT=3306 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=boost/boost_1_59_0 --將mysql默認字符設置為utf8,并安裝到指定的目錄/soft/mysql,自動下載BOOST庫
#make &&make install
#cd /soft/mysql
#ln /soft/mysql/support-files/mysql.server /sbin/mysqld
#ln /soft/mysql/bin/mysql /sbin/mysql
#bin/mysqld --initialize --記得最后一行生成的密碼
2017-07-15T07:39:36.600876Z 1 [Note] A temporary password is generated for root@localhost: QkaZGfBSL0#v
#mysqld start
Starting MySQL.. SUCCESS!
#mysql -pQkaZGfBSL0#v
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
#ln /soft/mysql/mysql.sock /tmp/mysql.sock
#mysql -pQkaZGfBSL0#v
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.7.18 Source distribution
Copyright (c) 2000, 2017, 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 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
mysql> use mysql;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql>set password=password('123456');
Query OK, 0 rows affected, 1 warning (0.01 sec)
mysql>
mysql> use mysql
Database changed
end
當前文章:源碼編譯安裝mysql5.7.18
文章URL:http://vcdvsql.cn/article32/peposc.html
成都網站建設公司_創新互聯,為您提供、手機網站建設、虛擬主機、全網營銷推廣、企業建站、面包屑導航
聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯